VAT price separate styling

  • Posts: 198
  • Thank you received: 7
7 years 4 months ago #273734

-- HikaShop version -- : 3.1.1

I like to have a separate class for the VAT price. For now on the price with and without VAT is on one line.

How can this be done?


Kind regards René.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #273738

Hello,

You'll need to perform a view override to change how the "listing price" is made.
When you want to perform an override and you don't know which view is concerned, the best is to use the "view files" advanced setting :
www.hikashop.com/support/documentation/5...g.html#advanced_main

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 198
  • Thank you received: 7
7 years 4 months ago #273769

Hi Jerome


I already did, but the code is complicated. I only need an class for the VAT prices, any suggestion?

Kind regards René

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

  • Posts: 4753
  • Thank you received: 644
  • MODERATOR
7 years 4 months ago #273793

Hello,

You have to know that html & php knowledge, in order to guide you, follow these steps :
- Go to Main HikaShop Configuration (in Components => HikaShop => Configuration), and in Advanced tab, set this :



- Go to your concerned front-end page, put your mouse on your element and right click, then select inspect (or inspector tool change from navigator)
=> You will be able to see your Html element and sometimes, existing class, copy your it and look for it in your code view (Ctrl + F), that will help you to find your element to modify.

Note : This tutorial will help you.

Regards

Attachments:
Last edit: 7 years 4 months ago by Philip.

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

  • Posts: 198
  • Thank you received: 7
7 years 4 months ago #273837

Hi Philip it is clear to me witch file is responsible for the price output, but i tried a lot but with no luck.

<span class="hikashop_product_price_full<?php echo $class; ?>"><?php
But i can't find a way to assign a separate class to the Ex VAT price......

Please give me a hint and you make my day :-)

Kind regards René

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #273849

Hello,

No, you need to change the " $classes " variable just before that line :

echo '<span class="'.implode(' ',$classes).'"'.$attributes.'>';
And you need to do it only if the price will be display with taxes.
But if all your prices will be display with taxes, you can directly put your extra class in the mentioned line.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 198
  • Thank you received: 7
7 years 4 months ago #273941

Hi Jerome,

When i look in de source is see this:

<span class="hikashop_product_price_full"><span class="hikashop_product_price hikashop_product_price_0" itemprop="price" content="24.2">€ 24,20 incl. BTW (€ 20,00 ex. BTW) </span>

What i want to achieve is this:
<span class="hikashop_product_price_full"><span class="hikashop_product_price hikashop_product_price_0" itemprop="price" content="24.2">€ 24,20 incl. BTW</span> <span class="withvat"> (€ 20,00 ex. BTW) </span>[

The code is to complex for me, i'm just a stupid Dutchman :-)

regards René

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #273943

Hello,

PRICE_BEFORE_TAX=" ("
PRICE_AFTER_TAX=" excl VAT) "
You can add the closing and opening span directly in the translations.
Please note that for HTML content, you need to not use double quotes but simple quotes instead.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum