News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Problem with discounts

Started by elthegr, May 22, 2019, 08:00:00 AM

Previous topic - Next topic

elthegr

Joomla! 3.6.4 Stable
When a product is on sale, it is displayed correctly in the product's category with its original price overwritten and the final price.
But on the home page where the offers are shown, only the final price is displayed.
I would also like all the products on sale to have a discount symbol on the photo.
Can you help me?
Thanks :)

StefanSTS

#1
Hello,

you need to specify how you display the offers on your home page, which module type. VM products module or a template solution?
Also VM version and template version would be helpful.

Please do not add your shop's URL here to show your issue, otherwise Joomla 3.6.4 might be hacked in minutes, if your Joomla is not already hacked.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

elthegr

Thanks for your reply!
I'm not sure if the following helps:
It's Nano Virtuemart template compatible with the latest version of Virtuemart 3 for joomla 3.8

VirtueMart 3.0.18

Jörgen

If You can not give more info than this, no one can tell. This is clearly a template issue, please talk to Your template supplier. Test with Protostar. if it still does not show what You want, You will have to adjust settings in VM back end, configuration->prices.

Both Your Joomla and VM versions are outdated please update, on a backup of course.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

check the template used for the home page ( modules or core ?) displays and what sublayout  prices is used etc...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

I just looked at the Nano demo on virtuemarttemplates.net and can see that the code to display prices on the home page is to show only the sale price, but on the product details page it shows  the base and sale prices. You will have to modify the overrides used to change the default display. Or try to get help from the template provider.  But it looks like you may need to update Joomla & VirtueMart versions as well.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

StefanSTS

Nano has the prices in the default.php of the module override. They don't use the prices.php yet. They are still a bit VM2ish.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

StefanSTS

You might want to add this in your templates overrides.
html/mod_virtuemart_product/default.php

<div class="pr-add-left">
   <a class="go-to-product" href="<?php echo $url ?>"><?php echo $product->product_name ?></a>        <?php
   // $product->prices is not set when show_prices in config is unchecked
   if ($show_price and  isset($product->prices)) {
      echo '<div class="product-price">'.$currency->createPriceDiv ('salesPrice', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
      if ($product->prices['salesPriceWithDiscount'] > 0) {
         echo $currency->createPriceDiv ('salesPriceWithDiscount', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
      }
      echo '</div>';
// this part is missing
      if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {
         echo '<div class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</div>";
      }
// end of missing part
   }?>
</div>
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.