- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi
My UDO for order confirmation page include a object for quantity as below,Can i pass the sum of the two arrays for quantity is any tag ,we are currently in codefreeze and cant make any changes to site utag_data.i need to pass quantity = 4 in mapped variables
Solved! Go to Solution.
12-15-2017 04:04 AM - last edited on 12-15-2017 05:42 AM by kathleen_jo
Hello @Anonymous. Create a new javascript extension, read out the array and return the sum of the quantities?
Something like this:
var productarray = utag_data["cart_product_quantity"]; var total = 0; for (i = 0; i < productarray.length; i++) { total += parseFloat(productarray[i]); } utag_data["total_cart_product_quantity"] = total;
Copyright All Rights Reserved © 2008-2023