Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to cart event - product prices #86

Open
Alphaegen opened this issue Nov 17, 2022 · 2 comments
Open

Add to cart event - product prices #86

Alphaegen opened this issue Nov 17, 2022 · 2 comments

Comments

@Alphaegen
Copy link

Alphaegen commented Nov 17, 2022

PHP Version

8.1

Shopware Version

6.4.16.1

Expected behaviour

We changed the add-to-cart event datalayer to support GA4 as closely as possible and we're using {{ cartaddprice(item.id, item.quantity, item.type, item.referencedId, item.stackable, item.removable) }} for grabbing the price.

Actual behaviour

The price doesn't get returned. Probably because of the SessionUtility class only supporting $dLayer['ecommerce']['add']['products'] in a foreach loop. We're not sure whether this is the full reason.

How to reproduce in a demoshop

This is our datalayer:
image

This is the price:
image

We've also added a response route, because we're using an add-to-cart modal:
image

@Alphaegen
Copy link
Author

@wbm-sbasler @runelaenen @alpox @M-arcus Any updates on this?

@stfnschrmr
Copy link

Can confirm this issue still occurs in current version 2.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants