Passing option price to e-cart after option is selected from Menulist.
I just can't seem to get my head wrapped around this one, so I'm hoping I can get some information to get me started down the right path.
I am implementing product options in a dynamic product details page. I have 2 tables to define the options, one is option categories, and the other is option values.
In the Option values table, I have fields for option ID, option name, option price and a textarea field for later use.
On the detail page I have successfully added a menulist to the add to cart button for the option and it displays the option names properly for each product based on the option category defined to the product. The option name passes to the cart page for the product OK.
What I can't seem to figure out is how to assign the option price to the proper ecart field, when the option is picked from the menu, so it can be passed to the cart page. I have the calculation set up to add the option price to the product price, but the option price is staying at 0. The option price field in the ecart object is set to currency.
more info... On my details page I have 2 recordsets. One is the WADAProducts recordset that was created when the details page was created. The second is one I added for the dynamic menulist for the option..
SELECT prod.ProdID, prod.ProdRuleGrpID1, oc1.OptCatID, oc1.OptCatName, ov1.OptValueID, ov1.OptValueName, ov1.OptValuePrice, ov1.OptValueTxt, ov1.OptOptCatID
FROM products AS prod LEFT JOIN optionvalues AS ov1 ON prod.ProdRuleGrpID1 = ov1.OptOptCatID LEFT JOIN optioncategory AS oc1 ON prod.ProdRuleGrpID1 = oc1.OptCatID
WHERE ProdName = ParamProdName OR ( -1= ParamProdName2 AND ProdName= ParamSessionProdName)
I know I left off the parameter statements, but the menulist is performing as I expect it to.
I am very new to PHP and MYSQL, and I may be handling this in the wrong way. I have followed the ecommerce help that was in the help documentation, but it didn't touch on including price changes with the options.
Thanks for the help.