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

strikesthrough prices in cart

Started by holanpan7, December 11, 2019, 12:23:25 PM

Previous topic - Next topic

holanpan7

Hello,

I am using joomla! 3.9.13 +VirtueMart 3.6.2 10159

I am trying to have the baseprice strikesthrough in cart if the price has a discount applied on it.
At the moment, the price is crossed out only if the discount is applied on the product after tax.
I want it to be crossed out when the discount is applied on the product before tax.

So i override the default_pricelist.php and modify as below:
if (VmConfig::get ('checkout_show_origprice', 1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['priceWithoutTax'])

replaced by

if (VmConfig::get ('checkout_show_origprice', 1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['basePriceVariant'])

It is working fine, but is it the correct way to do it? because I couldn't find the settings in virtuemart that can achieve this.

Thanks


GJC Web Design

from memory it only works out of the box if you have Vat pricing ...

but it is only a logic to apply a class that has strikethru written in the css so if it works for you its fine
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

holanpan7

I have VAT princing but the crossed out price only works on the product page not on the cart. On the cart it only shows the discounted price.
That's why I had to modify default_pricelist.php

I will leave it as that then. Thanks anyway