News:

Support the VirtueMart project and become a member

Main Menu

Show tax included

Started by Funtshirts, June 22, 2016, 11:59:39 AM

Previous topic - Next topic

Funtshirts

Hello guys,

I would like to display the text "tax included" under my product price (without the tax amount, just the text)
IS this possible? And how would i be able to do that?

My website: www.funtshirts.nl
I use Joomla 3.5.1
php 7.0.7.
And Virtuemart 3.0.17

AH

You can show the sales price label  by setting this in the VM configuration and change the name given to that salesprice label using a language override to the language variable COM_VIRTUEMART_PRODUCT_SALESPRICE

OR

You can override the prices.php display  in your template and add the text you require in the position that best suits your template

\templates\YOURTEMPLATE\html\com_virtuemart\sublayouts\prices.php

Regards
A

Joomla 4.4.5
php 8.1

jenkinhill

You can edit the template to add a new language constant, but I prefer to use css ::after selector to do something like this.

See  http://forum.virtuemart.net/index.php?topic=130778.msg452380#msg452380
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

AH

@jenkin

I would like to display the text "tax included" under my product price

The key part of this for my answer was "under"

I think that the use of css selector ::after  does not give you much control over the position.
Regards
A

Joomla 4.4.5
php 8.1

GJC Web Design

??

span.PricesalesPrice::after {
   content: "<br />plus VAT";
}
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

AH

#5
You cannot render HTML in the ::after or ::before selectors

You will get:

<br />plus VAT
Regards
A

Joomla 4.4.5
php 8.1

jenkinhill

Use escaped A to give a line feed in css.

span.PricesalesPrice::after {
   content: "\A plus VAT";
}
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

Funtshirts

Guys thank you very much for all the replies. Very helpful.

The code i got now that works:

span.PricesalesPrice::after {
   content: "\A incl. BTW";
    font-size:x-small;
}

(incl. BTW is the Dutch translation)


Only thing i don't get to work is to get it below the price.
You already helped me out, but if someone knows how to to get it below the price, thats a bonus.

GJC Web Design



span.PricesalesPrice::after {
  content: "\a incl. BTW";
  white-space: pre;
font-size:x-small;
}
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

Funtshirts

Hello GJC thanks for that.

Is there a way to make the space inbetween smaller? I don't mind if its almost against the price.
If not i'll leave it as was with the previous code.

GJC Web Design

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

Funtshirts

Thanks for the reply. You helped me out.

Did a lot of custom css the last few days. Maybe im starting to get the hang of it haha;)

Thanks again guys.