Question

I'm using Magento 2.3.5, and have noticed my incl/excl tax prices are the same, but only when clicking a swatch (I assume JS somewhere is at fault, but scratching my head)

I've tested disabling all extensions, clearing static files then using Luma, same result.

Image 1: On page load, it's correct (also correct in Cart/Checkout)

this is when first loading the page (so it

Image 2: When a swatch has been clicked. It's like some javascript updates all price elements to the same, but there's no custom js enabled here.

this is when clicking a swatch option

Any help greatly appreciated

Was it helpful?

Solution

Turned out it was the tax_class_id attribute setting

I'd migrated this attribute from Magento 1 to Magento 2.

On magento 1, it can have the 'used in product listing: no' and works, on m2 this breaks it.

Solution; 'used in product listing: yes' fixes the configurable and swatch tax calcs.

This was debugged when I saw ->addAttributeToSelect('tax_class_id') somewhere on the price blocks, It made me think that 'used in product listing: no' may prevent that from working (e.g. omit it from collection)

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top