Dynamic pricing based on textbox product attributes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi everyone,

I'm wondering if there is a way to calculate a price of a product based on textbox input. I know you can update prices via dropdown lists or radio buttons (like in the "build your own computer" demo http://demo.nopcommerce.com/build-your-own-computer).
Is there a easy way to do this?
If you need to write code to achieve this, what would you suggest me to do?


Example:
There's a textbox on the product page where you can type in your name. Based on the users input there is a formula which calculates the price, for example: price = 1.5*textboxstring.Length + 5

Thanks!
7 years ago
Does anybody know how to manipulate/override prices before putting a product to the cart? Nopcommerce is doing that e.g. in the "Build your own pc" example by adding the selected values to the base price of a product.

thanks
7 years ago
You can allow customer to add text as given in http://demo.nopcommerce.com/custom-t-shirt .
For calculation you have to make some code changes in AddProductToCart_Details(int productId, int shoppingCartTypeId, FormCollection form) action of ShoppingCartController.
7 years ago
when you create a product attribute for a particular product and save it a "values" field is created. In here you can add different fields like color, or a dimension, etc.

When you create this value you can make a price adjustment as well (up or down)

When a customer selects the product and selects this particular attribute the price is adjusted accordingly.

Hope that helps
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.