CSS for price with and without tax

  • Posts: 1055
  • Thank you received: 11
  • Hikashop Business
3 weeks 4 days ago #364153

-- HikaShop version -- : 5.1.1

Hi!

How can i use seperate CSS for both prices? Price with tax and price without?
Right now it looks the same, same font size, color etc so i want to make them different. Problem is that the class span.hikashop_product_price.hikashop_product_price_0 applys to both prices.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 weeks 4 days ago #364154

Hi,

You have these translations around the price without taxes:

PRICE_BEFORE_TAX=" ("
PRICE_AFTER_TAX=" excl VAT) "
So you could use translation overrides to add an HTML element around it.
For example:
PRICE_BEFORE_TAX=" <span class='price_without_tax'>("
PRICE_AFTER_TAX=" excl VAT)</span> "
So you can use .hikashop_product_price .price_without_tax to target the price without taxes.
For example:
/* price with taxes will be red */
.hikashop_product_price{ color: red; }
/* price without taxes will be blue */
.hikashop_product_price .price_without_tax{ color: blue; }

More information on translation overrides:
www.hikashop.com/download/languages.html#modify

Last edit: 3 weeks 4 days ago by nicolas.
The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 1055
  • Thank you received: 11
  • Hikashop Business
3 weeks 3 days ago #364163

That worked thank you!
Can i change what price to display first? I would like for the without tax price to display 1st and then with tax.
For example: 700 (990 include VAT)

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
3 weeks 3 days ago #364168

Hello,

This will require an override view (learn here how to process), for your needs you have to create your override from the product/listing_price.
And swap the codes that manage the different versions of prices.

Regards

Last edit: 3 weeks 3 days ago by Philip.
The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum