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

Deleting Discount in checkout

Started by gofer123, November 25, 2014, 07:35:45 AM

Previous topic - Next topic

gofer123

Hi all,
I've been struggling with this all day, managed to delete the name at the top of the column but it is still showing a discount amount which the client doesn't want. Also the $-17.25, I can't find where I can remove
the  hyphen after the Dollar symbol.
Please look here:  www.satoriwebstudio.co.nz/sky-test/index.php/sample-sites-2/cart
Cheers

VirtueMart 3.0
Joomla! 3.3.6
PHP 5.3.10

gofer123

Sorry, I should have included this image with my first post.

[attachment cleanup by admin]

GJC Web Design

its all in components\com_virtuemart\views\cart\tmpl\default_pricelist.php

but as it's tables you have to not only remove the td displaying the discount but also all the empty ones above and below (i.e. the column count to be the same)
you just have to suck and see exactly where it displays as it is a complex bit of code with lots of if/else etc

but what happens if you remove the price displays in the VM admin -> configuration->pricing?
This is a global setting

to remove the minus without a core hack use str_replace where you find the discount display

something like.

echo str_replace('-','',$this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE));

might work


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

gofer123

Thanks very much for your help, I tried unchecking all boxes in configuration - pricing, the damn thing still showed up (discount amount) !
I've gone through all files in the cart folder but still no luck, getting a bit desperate, we are about to launch the site and the client definitely doesn't want a discount.
Would this be a bug? Virtuemart developers please help.
Cheers

GJC Web Design

No - you can't call the inability to do something thru a GUI a bug..

The code is there in that file - that is where you remove it -- if you haven't the skills then you employ someone
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

jenkinhill

#5
For the discount to show like that at checkout you must have a discount of 5% per bill set up and published in the BE. If you are not using discount at all then you should unpublish the rule under Taxes & Calculation Rules.

If you do want a discount but just don't want to display it then you must edit override the template file as described by GJC.

Removing the minus sign for discounts can be done in the BE, under Currency Details editor for the currency you use you should edit  Negative Format  to remove {sign}
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

GJC Web Design

QuoteRemoving the minus sign for discounts can be done in the BE, under Currency Details editor for the currency you use you should edit  Negative Format  to remove {sign}

ah - excellent - didn't know that
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

gofer123

Fantastic!  that fixed the critter, sorry, I should have found that myself.
Many thanks
cheers