Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Passing new product price from main product page to shopping cart
 
sakwoya
Jr. Member
 
Total Posts:  12
Joined:  2008-01-20
UK
 

Hi there
I’m working on a javascript widget which acts as a price calculator on a product page (currently utilising a simple product with two custom options).

I have the widget correctly updating the quantity fields for the two options and it will also update the price displayed on the product page (just as happens when you normally select options). However when the ‘add to cart’ button is hit only the default product price is reflected in the cart.

e.g. $5.00 product, no values on the options = $5.00
$5.00 product with $1 on each option = $7.00

Looking at the data passed to the cart it looks like it’s only the quantities of the product and the attributes that get passed -Magento then pulls the appropriate pricing from the database to make the total in the cart.

Any hints as how to get the value across?

Graeme

 
Magento Community Magento Community
Magento Community
Magento Community
 
LeeSaferite
Guru
 
Avatar
Total Posts:  322
Joined:  2007-08-31
Lake City, FL
 

You don’t pass a price for the product when adding it to the cart.  That would be a very bad idea.  I could easily come along behind you and edit the page to give me everything for $1 instead of the real price.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top