VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: stargazer1682 on December 22, 2015, 07:37:16 AM

Title: Display Finale Price only in the Shopping Cart?
Post by: stargazer1682 on December 22, 2015, 07:37:16 AM
Is there a way to hide the final price in the product pages, or in the list of prices in the category listings?  I only want to show the base price and "tax" (Renamed and configured for shipping costs) when displaying products by category or in each individual product page, but when the Finale Price option is turned off in the shopper groups, it's not showing the grand totals in the cart.  I've also gone through the pricing options under Configuration, unchecking Final Price there, but leaving it on in the shopper group, but that didn't appear to affect anything.


http://simuride.com/jupgrade/our-store (http://simuride.com/jupgrade/our-store)
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: jenkinhill on December 22, 2015, 10:56:48 AM
Edit and override components/com_virtuemart/sublayouts/prices.php
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: stargazer1682 on December 23, 2015, 01:29:57 AM
Can you, or anyone, please point me to a resource with additional information on this? I haven't done any overrides for anything; however I did try to modify prices.php before posting here, and the changes stripped out the formatting of the entire template, and I had to undo what I changed to make the site functional again.
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: GJC Web Design on December 23, 2015, 01:56:43 AM
http://docs.virtuemart.net/tutorials/templating-layouts.html

but u seem to know where to do the over rides.. if your attempt was unsuccessful with prices.php then your code (php, html etc) must have been at fault..
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: stargazer1682 on December 23, 2015, 04:53:13 AM
Okay, found that taking out, 'salesPrice', from line 49; appears to have the affect I want.

Changing
echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);

to
echo $currency->createPriceDiv ( 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);

The "final price" line disappeared from the categories display, as well as the individual products pages; while remaining in the cart.

What I'm still not clear on is how to create an override for the prices.php.  I looked through that reference link provided, and found information on create language overrides, and some info on template CSS overrides, but I'm either blind or missing something else; I don't know how to apply that change to create an override for the php file.
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: jenkinhill on December 23, 2015, 13:42:52 PM
The edited prices.php file goes into templates/[your-joomla-template]/html/com_virtuemart/sublayouts/
Title: Re: Display Finale Price only in the Shopping Cart?
Post by: stargazer1682 on December 23, 2015, 18:46:51 PM
i had to create the com_virtuemart/sublayouts directories for the template, but I put the file there, reverted the original and the changes held.  It worked!
Thanks