How to add html-code inside price

  • Posts: 6
  • Thank you received: 0
11 years 6 hours ago #170808

-- url of the page with the problem -- : ferrometiz.ru/dbg1
-- HikaShop version -- : HikaShop Essential 2.3.2
-- Joomla version -- : 3.3.3 Stable
-- PHP version -- : 5.4.31

Hello! I'm building my site according schema.org - product descriptions, addesses, etc.
So i need to add some html insertions before and after price and currency separately.
For each product there is only one price - no taxes, discounts, variants.
But i cann't find view where to make changes...
Please help!

Beforehand thank you!

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #170813

Hi,

To edit the price part you have to edit the view "product / listing_price".

The following user(s) said Thank You: Omoot

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

  • Posts: 6
  • Thank you received: 0
10 years 11 months ago #170882

Xavier, thank you!
As I understand, in this file i can add something before and after price and currency. But i need to insert some code between price value and price currency.
I think i have to edit this function (which i cann't find):

echo $this->currencyHelper->format($price->price_orig_value,$price->price_orig_currency_id);

The html-output of this function have to be the following:
<span itemprop="price">60,00</span><span itemprop="priceCurrency" content="RUB"> RUB</span>

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #170883

Hi,

This function is in "administrator/components/com_hikashop/classes/currency.php".
Then you will see that there is an format_override variable, you can potentially add desired code before calling that function, add a format override, and add code after this function to have what you are looking for.

Or just edit the content of this function to what you need ;)

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

Time to create page: 0.068 seconds
Powered by Kunena Forum