I have a form in flash that is quite complex and calculates the total price of Window Shutters including square area, frame type and so on.
I have HAD to do it this way because the form was way more complex than anything normal Oscommerce product attributes could handle.
I have been able to pass all the product attributes (height, width, frame type etc) and the Shutters price as an attribute to the shopping cart from the form with the help of the following contribution.
Product Attributes - Option Type Feature
http://addons.oscommerce.com/info/160
This works perfectly :thumbsup:
This is what it looks like
Now I would like to get the Shutters price attribute and use it to REPLACE the product price by fetching it from the 'customers basket attributes' table and use to calculate the subtotal for the cart.
I have identified all the code that calculate prices and totals.
For example I have tryed to use the following in includes/classes/shopping_cart.php around line 349.
Instead of the original line of
$products_price = $product['products_price']; //about line 349
I have tryed to set the $products_price by fetching it from the 'customers basket attributes' table
$product_price_query = mysql_query("SELECT products_options_value_text FROM customers_basket_attributes WHERE customers_id = '" . (int)$customer_id . "' AND products_id = '" . (int)$products_id . "' AND products_options_id = '11' ");
$product_price_fetch = mysql_fetch_array($product_price_query);
$products_price = $product_price_fetch[0];
However in it does not seem to work.
Can anyone help.
I am beginning to run out of time on this one. :blush: