I'll try to explain it in details as it's quite tricky.

Let's say I have configurable product X with price 10, and color variations red and green with fixed price +5 and -5. So the final price for the red X would be 15 and for the green X would be 5 while for other X colors would be 10.

Now we also apply a catalog rule on the configurable X, for example let's say -3.

So now the final prices would be: red X: 12 green X: 2 other X colors: 7

I can get the final price of the Configurable(7) by using


but how can I get the final prices for the other attribute options as well? Should I recalculate looping through the attributes and their pricing_value and applying them to the discounted price of the base product or is there any easier way?

moreover: if catalog rule has disabled discount to sub-products then above logic works. Get the base price with the catalog rules applied and apply super attributes prices on top. but if discount to sub-products is enabled, then how can I get the "pricing_value" of an attribute with catalog rules applied?


Your Answer

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