Skip to content

Commit 00c84a3

Browse files
authored
Merge pull request #1 from LIN3S/fix/sylius-product-price-per-unit
Sylius product price sending total instead of per unit in checkout DL
2 parents f5a2d45 + 01a5ae7 commit 00c84a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/enhanced-ecommerce-sylius/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lin3s-react-analytics-enhanced-ecommerce-sylius",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"author": "LIN3S",
55
"license": "MIT",
66
"description": "Transformations to turn Sylius objects into Enhanced Eccomerce Data Layers",

packages/enhanced-ecommerce-sylius/src/transforms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const transformProducts = (items, params) => items.map(item => ({
1919
name: item.product.name,
2020
id: item.product.code,
2121
variant: item.product.variants[0].code,
22-
price: item.total / 100,
22+
price: (item.total / item.quantity) / 100,
2323
brand: item.brand || params.brand,
2424
category: getCategoryForProduct(item.product),
2525
quantity: item.quantity,

0 commit comments

Comments
 (0)