1

I am working with a simple product with custom options.

I am updating the base price of the simple product with custom logic (height and width inputs). This is working fine.

Now here comes my problem. If I add a custom option with Price Type = Percent, this is calculated of the old base price (before my update), not the new base price.

Example.

The Baseprice of the simple product = 100

Custom options look like this:

enter image description here

This gives me a price of the custom options as 10 (10% of 100) and 20 (20% of 100). But since the product page has loaded initially, the base price has changed to 150, and I would like to show 15 (10% of 150) and 30 (20% of 150).

What would be the best approach to accomplish this?

0

Your Answer

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

Browse other questions tagged or ask your own question.