When I format the prices using CSS for the product detail page (.PricesalesPrice, .PricediscountAmount etc) the formatting is also applied to these prices on the cart page but I cannot see where to stop this from happening. On the product detail pages I want the price nice and big, but just standard size on the cart page.
Thanks for your help
Edit one of the price display templates (or both) to add an additional class or id to more accurately apply your styles. Unless you are already using overrides the templates are
components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
components/com_virtuemart/views/cart/tmpl/default_pricelist.php
Be sure to use the edited files as template overrides so that they are preserved during VM updates.
Thanks - yes I am using template overrides and was expecting to be able to apply a different class in the default_pricelist.php template. I'm pretty comfortable with CSS but not so much with php. The code in question would be around line 210
echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE, $prow->quantity) ?>
but I can't see how to apply a different class as the .PricesalesPrice class seems to be dynamically generated
I need a link to help you. And you probably still need a Firebug (check FAQs in this forum section) to help yourself.
You just need to be more specific with your style selectors, work back through the classes within the same div to find a class unique to the template you want to restyle. eg the following works with defaul VM templates to set the price font size on the product details page only:
.spacer-buy-area .PricesalesPrice {font-size:20px;}
Quote from: jenkinhill on August 17, 2013, 11:12:24 AM
You just need to be more specific with your style selectors, work back through the classes within the same div to find a class unique to the template you want to restyle. eg the following works with defaul VM templates to set the price font size on the product details page only:
.spacer-buy-area .PricesalesPrice {font-size:20px;}
Fantastic - thanks!