I wanted to use attributes to display the whole price only and not add to the base price but every time I put in the base price it would add regardless of what attributes I set. When I take out the base price and set the attribute price it works correctly but the lowest price does not display as designed. In my code I found the SQL error in the function.
****Make Backup*****
In case anyone runs into this in the future open the includes/functions/functions_prices.php
Look for this code (123,124 for me)
In order to do what I described you have to remove the bold text so your new code should reflect the followingPHP Code:// do not select display only attributes and attributes_price_base_included is true
$product_att_query = $db->Execute("select options_id, price_prefix, options_values_price, attributes_display_only, attributes_price_base_included, round(concat(price_prefix, options_values_price), 5) as value from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and attributes_display_only != '1' [B]and attributes_price_base_included='1'[/B]". " order by options_id, value");
Now the lowest price of the attributes will display correctly.PHP Code:// do not select display only attributes and attributes_price_base_included is true
//Modified 1-15-11 MLL Lowest price not displaying fix
$product_att_query = $db->Execute("select options_id, price_prefix, options_values_price, attributes_display_only, attributes_price_base_included, round(concat(price_prefix, options_values_price), 5) as value from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and attributes_display_only != '1'". " order by options_id, value");
**DISCLAIMER** It's your code, you fix it. I will not fix your mistakes DON'T ASK


Reply With Quote
