Hi Guys
Just thought id share some code that was making me go insane for ages in case anyone found it useful.
im currently developing a site that sells beds and has a load of different configurations for each product (mattress sizes etc)
im using the built in zen cart attributes for this - but the problem i had is that zen cart dosent stick wrappers around the price so you cant style the attributes price seperatley.
thankfully i found out how to!
in includes/modules/attributes.php find this codethen change it to thisPHP Code:$products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .
$currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX ;
note that i called the wrapper attribpricewrapper but you can call it anything - you can then style it in your stylesheet.PHP Code:$products_options_display_price= '<div class="attribpricewrapper">' . ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .
$currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX . '</div>' ;
hope this maybe of help to someone!


Reply With Quote
