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

Sales Tax to show in the shopping cart only

Started by gofer123, November 19, 2014, 03:04:06 AM

Previous topic - Next topic

gofer123

Hi all,
Is it possible (I've tried all sorts of combinations) for the sales tax to be displayed in the shopping cart only?
Cheers
VirtueMart 2.6.10
Joomla! 2.5.24
PHP 5.3.10

AH

Firstly - you should upgrade both your Joomla and VM software
Your versions are reported as insecure.

Secondly,

When you enable tax it shows in the product page and the shopping cart
From your request I think that you want to only show tax in the shopping cart and not on the product pages etc(this is not a configurable option)

Consequently you will need to do a template override for the prices.

Keep the setting to show taxes and then remove the tax price display from the relevant pricing templates

Copy the following files into the relevant template override directories (create the "to" directories if they do not exist!)
components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
to
templates/your-template/html/com_virtuemart/productdetails/default_showprices.php

Then remove or comment out

if ($this->product->prices['discountedPriceWithoutTax'] != $this->product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
} else {
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
}

and

echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);




components/com_virtuemart/views/virtuemart/tmpl/default_products.php
to
templates/your-template/html/com_virtuemart/virtuemart/default_products.php


if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv( 'discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices );
} else {
echo $this->currency->createPriceDiv( 'priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices );
}

and

echo $this->currency->createPriceDiv( 'taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $product->prices );


The tax amount will then not show in the products and category views but will show in the rest of the system
Regards
A

Joomla 3.10.11
php 8.0

gofer123

Thanks very much for your time and help Hutson,
I'll get to work on that today.
Cheers

gofer123

Hi Hutson,
Sorry if this is a really stupid question but do I need to comment out both the original file and the one I've copied into the overrides folder?
The folder structure goes like this;
mytemplate/html/overrides/default_showprices.php
                                           default_products.php
Have I got the right?
Appreciate your help
Cheers

GJC Web Design

folder structure->

mytemplate/html/com_virtuemart->
                                                      /productdetails/default_showprices.php
                                                     /virtuemart/default_products.php

just leave the originals alone
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


gofer123

Sorry Hutson, I just can't crack this, followed your precise instructions but no luck.
What configuration would you in VM configure, pricing? I've tried all sorts of combinations with the15% GST .
Any suggestions?

AH

IN vm configuration

Check Show Tax in Cart

And for prices I have checked

Tax Amount
Sales Price without Tax

As well as some others
Regards
A

Joomla 3.10.11
php 8.0

gofer123

Thank you Hutson, will give it another bash!
Cheers