VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: jk15060 on January 04, 2018, 21:40:15 PM

Title: Blowout Sale Rule & how to configure VM
Post by: jk15060 on January 04, 2018, 21:40:15 PM
Joomla 3.8.3
VirtueMart 3.2.12

I created a rule for 50% off category called Sale Items.
Type of Arithmetic Operation:  Price modifier before tax
Math Operation:  -%
Value:  50
Currency:  US Dollar

I added a single product to the Sale Items category to test it.  It works great, but is there a way to make the sales price stand out more, like perhaps make the Sales Price bold, red, or both?

I found this article VERY helpful because of the Shop Configuration | Pricing information in it.  I didn't have sales price or anything else in that section checked.   Very helpful:  https://forum.virtuemart.net/index.php?topic=96175.0

I even tried to use this code below in my template.css file but it didn't work.  I might be adding it in the wrong spot, not to mention the fact that I'm discounting the cost of the item pre-tax.

.PricebasePriceWithTax .red {
text-decoration: line-through; }

To see how it looks on my client's website, here's the product page:   https://www.nancygoodalldesigns.com/shop-nancy-goodall-designs/pendants.html  (Well Spok'n - a pendant - is the only item discounted at the moment)

Questions:
1)   Any way to bold and/or use red to make those discount prices stand out? 
2)   Any way to NOT display Sales Price on items that are NOT on sale?  These are the checkboxes in Shop Configuration | Pricing.
      OR is it possible to configure just the Sale Items to display Sales Prices?  Appears to be an all or none option in the Configuration | Pricing area.


Basically I have the Sales Prices working.  Now I just need to make it a bit more prominent if at all possible. 

Thank you for any help that might be out there today.  Now going to add the other sale items to see how they look on their own separate page.
Title: Re: Blowout Sale Rule & how to configure VM
Post by: Jörgen on January 05, 2018, 00:15:27 AM
Hello
Play around with the different prices in config, and activate the discount. Then You can look at the created html and change the css to make discounted products stand out.
You may have to modify the template files for prices, sublayout prices.php.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Blowout Sale Rule & how to configure VM
Post by: GJC Web Design on January 07, 2018, 13:20:44 PM
something like

.PricesalesPrice.vm-price-value > span {
   color: red !important;
   font-size: 18px !important;
}

.PricebasePrice.vm-price-value > span {
   text-decoration: line-through;
}

but your right .. there is a problem with showing the "on sale" price if u don't uses taxes..
In that case the on sale shows always even if there is no discount..
I always edit manually in the over ridden sublayouts/prices.php -- check if the on sale is NOT equal to the retail and if show display
You need a bit of php there

From memory the logic all works correctly if you are using taxes - i.e. the on sale will only show if it is a discount