2

I have added a product option with a percentage discount. check the below screenshot.

Zinc-Table-Tops-Products-Inventory-Catalog-Magento-Admin

And it is showing perfectly on the front end. check the below screenshot.

Screenshot-from-2021-04-21-17-19-41

By default, Magento applies custom option price to base price. but I want to apply the custom option price to the final price, not to the base price.

For Ex: I have 2 custom option Option X and option Y, option X has 2 value 345 and 410(product default base price is 345) And Option Y has 2 value 0.00(percent) and 15.00(percent)

Now when I select the value of option X = 410 then product price is 410 and then select option Y value = 15.00(percent) then it will apply the 15% to base price(345) not the final price 410, so I want to apply the custom option price to the final price(410) not the base price(345).

So can anyone help me out this how can I achieve this thing? Any help would be appreciated!

========================================================================== EDIT :

@Marius

It is doesn't matter what is the order of select the custom options. actually, I want to calculate the percentage of the final price of the product after selected the custom option.

For Ex:

I have 2 custom options:

  1. Option A[Fixed amount] (which have 2 values)
    • 345
    • 410
  2. Option B[Percent amount] (which have 2 values)
    • 0%
    • 15%

Now in the case when select option A = 345 and option B = 15% then product price will display (345 X 15/100 = 51.75)+(345) = 396.75

And in the case when select option A= 410 and option B = 15% then product price should be display (410 X 15/100 = 61.5)+(410) = 471.5 but it is displaying (345 X 15/100 = 51.75)+(410) = 461.7

Because by default Magento calculates the custom option percentage to the base price(345) of the product not the final price(410) of the product.

So basically how many options you have selected and what is the order of selected custom option it doesn't matter. But I just want when I select the percentage custom option then I want to calculate the final price (which is displaying after selecting options) of percentage.

1
  • Hi Chirag, are you able to list more setting:what is the base currency, the locale currency I take is dollar. What is the currency rate you have, finally, what if the prince in the backend at the moment: I believe your price is 410 in the backend? – Herve Tribouilloy Apr 28 at 12:02
1

I may be wrong on this, but I think that this is not easily achievable. The magento custom option system considers custom options to behave independently so it's not important which is the order in which you apply the custom options.
So if you select them in the order 1 and then 2 or if you select first #2 and the #1.

So in your case if you first select the second option and you apply 15% to the base price, what should happen after you select the first option that should add a fixed value

1
  • Thanks for the answer and explain the scenario. I have updated the question can you check and update me does it possible? if possible then how? – Chirag Patel Apr 29 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.