TinoArts Posted March 8, 2021 Share Posted March 8, 2021 Hello, I would like to achieve something like this (1.7.7): Product has a static price set: e.g. 30 € (price is set per one gram) Product has a static gram to size ratio set: e.g. 1 mm equals 0.046 grams The user chooses the size on the product page (e.g. 45 mm), the product price should be updated with the formula: [static_price]*[static_ratio]*[user_defined_size] 30*0.046*45 = 62.10 € I found various robust modules for dynamic pricing, but it seems like an overkill to be honest. On the other hand I am kind of stuck. I am able to override the product price in Product class, but I don't know how to change it dynamically based on user's input, so that prices will remain correct in cart/checkout as well. Any ideas? Thank you very much. Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2021 Share Posted March 9, 2021 (edited) And why so complicated when you know the price for 1 mm? Set the price to 1.38 and on the Prices tab enter the value 1.38 per 1 mm. Then the customer will only add a value of 45. When I'm at the computer, I'll give you a picture of how to do it. Edited March 9, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
TinoArts Posted March 9, 2021 Author Share Posted March 9, 2021 This actually might work, thank you very much for the tip. However, I will probably still have to go with custom calculation formulas. The product I am talking about are rings and they are always sold in par (for man, for woman), each have different price per unit (mm in this case). The user needs to input both ring diameters on the product page and than sees the final price for both rings. I'm thinking of creating a Product pack, but I'm not sure whether it is not overcomplicated for such a task (I don't need two products in pack, I really just need duplicated unit price fields at this point and display the SUM of them on frontend). Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2021 Share Posted March 9, 2021 (edited) So you will have to reach for a more complex solution, because your requirement is not an easy solution. You should have given your example in the first question. Another possible solution is to create attributes for women and men, There are standardized dimensions of rings. Eg. Edited March 9, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now