Closed stevenou closed 12 months ago
$(document).ready(function() { $do.get('.shipped-widget', function() { const shippedWidget = new Shipped.Widget(localShippedConfig); let subtotal = 0; customerData.get('cart')().items.map((item)=>{ subtotal += item.product_price_value * item.qty; } );
customerData.get('cart') does not work (the first time) in incognito.
customerData.get('cart')
possibly relevant
https://developer.adobe.com/commerce/php/development/cache/page/private-content/ https://magento.stackexchange.com/questions/361015/unable-to-access-custom-data-section-using-customerdata-get-inside-knockoutjs
resolved by using checkoutConfig instead of customerData.get('cart')
checkoutConfig
customerData.get('cart')
does not work (the first time) in incognito.