VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rage76 on June 06, 2020, 13:19:49 PM

Title: Show "Price includes Tax" on all product pages
Post by: rage76 on June 06, 2020, 13:19:49 PM
Hi, is there a way to show a field/customfield "price includes tax" on all product pages in a single go? (So I donot have to add the fields in every product manually) It should show as a default.

J:3.9.19
VM: 3.8
Title: Re: Show "Price includes Tax" on all product pages
Post by: pinochico on June 06, 2020, 13:22:49 PM
Sure :)

You don't need customfield.

On the demo I see price with Tax, you don't? - http://demo.virtuemart.net/dress-shirt-with-tie-detail
And you can looking inside for setup - http://demo.virtuemart.net/administrator/index.php

Have you tried or just written a post for others to solve a problem for you?

Title: Re: Show "Price includes Tax" on all product pages
Post by: rage76 on June 06, 2020, 13:50:24 PM
Dear Pinochico

I think I wasn't able to explain well. I donot want to show "price with tax or Price without tax". My site already shows price including tax. I just want to convey to the customer that the prices are inclusive of tax.

Best wishes
Title: Re: Show "Price includes Tax" on all product pages
Post by: jenkinhill on June 06, 2020, 15:02:06 PM
@rage76 all you need to do is add your required text into (for example) /components/com_virtuemart/sublayouts/prices.php - and save it as an override. If you already override that file then edit that one.  The text will then appear for each product on the category page and productdetails.
Title: Re: Show "Price includes Tax" on all product pages
Post by: pinochico on June 06, 2020, 15:04:37 PM
And someone is preventing you from changing the label (language constant)
Sales price
to
Sales Price with TAX

Why do you need a customfield?

Best Wishes too :)

P.S.
And of course, you can change code in override for prices.php (how wrote jenkhill). But I think simply solution is best.
Title: Re: Show "Price includes Tax" on all product pages
Post by: rage76 on June 08, 2020, 13:59:19 PM
Thank you Jenkinhill & pinochico for your inputs. But I believe, my template is modded. It doesn't show "sales price" or "sales price with tax". It just shows the price (no text before or after)

I eve tried to enable "Show tax message with product price" in the configuration but nothing changed.

I have tried customfields, it works. But that means doing it for every product manually  :'(
Title: Re: Show "Price includes Tax" on all product pages
Post by: pinochico on June 08, 2020, 14:32:49 PM
NO, I think you have to change override inside your template.

Example: Sometimes, We use joomlart template and override for virtuemart we must changed.
Title: Re: Show "Price includes Tax" on all product pages
Post by: jenkinhill on June 08, 2020, 15:01:34 PM
As it seems you already have overrides the file you should look at first is templates/[your-joomla-template]/html/com_virtuemart/sublayouts/prices.php
Title: Re: Show "Price includes Tax" on all product pages
Post by: rage76 on June 08, 2020, 20:07:43 PM
Well, I was unable to figure out anything, so I simply added this line:

<div style ='font:11px/21px Ubuntu,sans-serif;color:#56534e'>GST Inclusive</div>

to the bottom of "default_showprices.php" in the overrides folder. It seems to be working. Hope it won't cause any issues?
Title: Re: Show "Price includes Tax" on all product pages
Post by: Jörgen on June 09, 2020, 00:04:42 AM
As long as ALL your prices are GST inclusive it won' t. But it a kind of a thread generator, next time You will maybe display prices without GST ...

Jörgen @ Kreativ Fotografi
Title: Re: Show "Price includes Tax" on all product pages
Post by: rage76 on June 09, 2020, 08:55:00 AM
Thanks for replying Jörgen

All prices on my site are GST inclusive. Kindly explain "thread generator"?

Warm regards
Title: Re: Show "Price includes Tax" on all product pages
Post by: Jörgen on June 09, 2020, 09:03:57 AM
Next time You will change the setup to prices excluding tax, maybe depending on country as the usual setup in most shops are, you will by then have forgotten that you made this unusual change in Your overrides.

It will then generate a new thread asking how to solve this, hence "thread generator".

kind regards

Jörgen @ Kreativ Fotografi