News:

Looking for documentation? Take a look on our wiki

Main Menu

Show product discount only at selected products

Started by cvrak, October 05, 2020, 10:04:42 AM

Previous topic - Next topic

cvrak

Hi,
I've set a discount rule for a specific products category. Products of this category shows price before discount and price after discount.

The problem is that the products of other categories without discount show both prices (before and after discount) which are the same. How can i show only the final price for these products?

Joomla 3.9.21
php 7.3.22
VM 3.8.4

Jörgen

Does this have anything to do with the discount rule ? If you take the discount away does it still show duplicates ?

If not, You have a setup mismatch in VM configuration->Prices

Please check Your settings.
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jenkinhill

Use a template/sublayout override for the discount category only.
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

cvrak

Quote from: Jörgen on October 05, 2020, 10:22:33 AM
Does this have anything to do with the discount rule ? If you take the discount away does it still show duplicates ?

If not, You have a setup mismatch in VM configuration->Prices

Please check Your settings.

I unpublished the rule and I see duplicates. Attached you see my prices settings. Do I have to change some setting?

cvrak

Quote from: jenkinhill on October 05, 2020, 10:24:47 AM
Use a template/sublayout override for the discount category only.

Do I have to change some code? Pls can you explain?
Thanks

jenkinhill

You would have to edit a couple of sublayout template files (probably products.php and prices.php) and use the edited files as overrides. See http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
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

Jörgen

If I understand this correctly you only have to publish the right prices. Play around with the available prices and see what You get published. Compare the discounted category and see if You see any differences to the other categories.
Should You not find a suitable mix of price display, then first You will have to edit products.php and prices.php

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