Calculating form in product description

Heywood

Avatar: Heywood

2011-02-26 14:15

Ahoi!

I am having a problem: I have product with form where i can calculate product price with different values.
How can i show this calculated price in the price field, and after add this to my basket?

Calculation is done by javascript: var result=document.getElementById('Total');

» Quick.Cart v3.x

http://raudselt.puustjapunaseks.ee

beholder

Avatar: beholder

2011-02-28 02:03

can you specify which product do you mean and what values there will be? So I can imagine better what you actually need..

Heywood

Avatar: Heywood

2011-02-28 09:52

Ahoi!

I want to calculate product price in product description page.
I have three values: lenght, width and material. (LxWxM=Total)
Javascript will do the calculatoin and gives
So client can see what the actual price will be and this calculated price (Total) will appear in price field. after that he makes the order with this price.

also i need those 3 values in the order, but first, how can i show the calculated new price in the price field.

I understood, that i must create a new template for this product.

Here is not working example:
http://raudselt.puustjapunaseks.ee/?Calculation,15

http://raudselt.puustjapunaseks.ee

beholder

Avatar: beholder

2011-03-22 02:42

Hi, I'm sorry for not replying for so long, I guess I lost track of the threads I should keep my eyes on.

I would do it by submitting more variables in the add-product form (currently only quantity of 1 and iProduct is submitted). Then in actions_client/p.php the specific calculation can be done and product price can be carried to addToBasket() function where it will be written to db/orders_temp.php db file.

It's probably that simple, although if you don't know PHP then you will be lost I guess.

Back to top
about us | contact