0

enter image description hereI am currently struggling with accessing a custom product attribute (zshortname), which is defined in magento admin panel, in my custom javascript file and send it to google tag manager over dataLayer. I could not find any documentation, tutorial or anything else on how to do it. I would really appreciate if someone helps me out. Thank you!

enter image description here

4
  • From where? write some detail. Commented Jan 11 at 3:07
  • explain in some more details, what you are trying to do, so we can help you with that one. Commented Jan 13 at 4:35
  • If you console log your item do you have your attribute in the object ? If yes, just retrieve it from JS object; if no then you might have to make a custom ajax call sending the item id and then retrieve the data from php iteself. The GTM part itself is irrelevant to the main issue. Commented Jan 13 at 15:28
  • I did console.log and there is unfortunately no custom attribute "zshortname". How can i make a custom ajax call? Commented Jan 14 at 7:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.