VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: slycrespo on September 30, 2016, 16:35:58 PM

Title: Disable/Remove Discount form cart
Post by: slycrespo on September 30, 2016, 16:35:58 PM
Hello!
How can I remove or disable the Discount from shopping cart? I'm using VirtueMart 3.0.12 and can't find this in the settings.. Please help!

(http://www4.slikomat.com/13/0930/uw7-screen.jpg)
Title: Re: Disable/Remove Discount form cart
Post by: jenkinhill on September 30, 2016, 16:42:57 PM
Looks like you are using template overrides already so should probably edit templates/[yourJoomlaTemplate]/html/com_virtuemart/cart/default_pricelist.php

Or maybe hide using css - use Firebug to check this.  http://forum.virtuemart.net/index.php?topic=116620.0

VM3.0.12 is old, you should probably be using at least VM3.0.16 by now. http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: Disable/Remove Discount form cart
Post by: slycrespo on September 30, 2016, 17:17:10 PM
I don't know which part of the code should I edit in: templates/[yourJoomlaTemplate]/html/com_virtuemart/cart/default_pricelist.php
And if I update virtuemart to the newer version, does  it have the settings for that (disabling discount)?
Title: Re: Disable/Remove Discount form cart
Post by: jenkinhill on September 30, 2016, 17:44:19 PM
I have no idea what you should remove in your override because I do not know how it is coded. But this is the code in the VM default default_pricelist.php template.

<?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('billDiscountAmount', '', $this->cart->cartPrices['billDiscountAmount'], FALSE) . "</span>" ?>

Do you actually offer discount in your store to be charged on the bill total? If not then unpublish the relevant tax/calculation rule. Then the line will not appear.

Version updates are made for a reason. For example to fix security issues or bugs. Importantly current Joomla version is 3.6.2 and emails will not be sent on checkout with  J! versions after 3.6.1 and your old VM version.  See http://forum.virtuemart.net/index.php?topic=118683.0
Title: Re: Disable/Remove Discount form cart
Post by: slycrespo on September 30, 2016, 17:52:17 PM
"If not then unpublish the relevant tax/calculation rule. Then the line will not appear."  ---> this was the reason. Thank you werry much!
Title: Re: Disable/Remove Discount form cart
Post by: GJC Web Design on September 30, 2016, 20:58:33 PM
lordy....
Title: Re: Disable/Remove Discount form cart
Post by: jenkinhill on September 30, 2016, 23:10:20 PM
I am guessing a quick install package.....
Title: Re: Disable/Remove Discount form cart
Post by: GJC Web Design on September 30, 2016, 23:39:40 PM
prob .. but hard to think of the reasoning behind configuring discounts in a quickbreak install  :(