Answer the question
In order to leave comments, you need to log in
How to change the formula for calculating the total amount in the basket for a certain category of goods???
Hello. Help a newbie please. I'm just learning wp and wc. The store has 2 categories of products. Beer and snacks. Beer is priced per liter. Snacks are priced at 50 grams. For snacks, the quantity step in the basket input is 50 grams (50,100,150, etc.), but when the price for 50 grams is 20 UAH. for example, when choosing 200 grams in the input, the price of 80 UAH should be displayed, but in fact it turns out 20 UAH * 200 = 4000 UAH.
Question 1. Is it possible to change the calculation formula in the shopping cart for the snack category. It turns out that the total in the line should be divisible by 50. [4000/50=80 UAH] (if we take the example above).
The photo is attached to make it more clear :)
Thank you in advance for your help!!!
Question 2. Maybe there is another way out? Set a price of 20 UAH per 50 grams for the snack category and after that everything will be clearly calculated when we choose 50,100,150,200, etc.?????
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question