Author Topic: Problem with discounts  (Read 516 times)

elthegr

  • Beginner
  • *
  • Posts: 2
  • A beginner
Problem with discounts
« on: May 22, 2019, 08:00:00 am »
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

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 460
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Problem with discounts
« Reply #1 on: May 22, 2019, 08:51:52 am »
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

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: Problem with discounts
« Reply #2 on: May 22, 2019, 09:39:50 am »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 2389
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Problem with discounts
« Reply #3 on: May 22, 2019, 09:51:25 am »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9142
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Problem with discounts
« Reply #4 on: May 22, 2019, 10:44:49 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27543
  • Always on vacation
    • Jenkin Hill Internet
Re: Problem with discounts
« Reply #5 on: May 22, 2019, 13:55:09 pm »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.3.10163 on Joomla 3.9.12 PHP 7.0.33

StefanSTS

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 460
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Problem with discounts
« Reply #6 on: May 22, 2019, 14:35:05 pm »
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

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 460
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Problem with discounts
« Reply #7 on: May 22, 2019, 14:45:14 pm »
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.