[Skip to main content](#vessel-content)

#   Separate price and currency

##

- **[kun333](/forum/user/35195-kun333 "View kun333's Profile")**
- [![kun333's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35195-kun333 "View kun333's Profile") Topic Author
- [ Offline](/forum/user/35195-kun333)

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#200665](#200665) by [kun333](/forum/user/35195-kun333 "View kun333's Profile")  *[Separate price and currency](/forum/26-product-category-display/876764-separate-price-and-currency#200665 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Hello! I'm need to display separately &quot;price&quot; and &quot;currency&quot; because i want to insert microdata for &quot;offers/price&quot; and &quot;offers/priceCurrency/&quot; How i can display price and currency in individual 's?  like this:  Hello! I'm need to display separately &quot;price&quot; and &quot;currency&quot; because i want to insert microdata for &quot;offers/price&quot; and &quot;offers/priceCurrency/&quot; How i can display price and currency in individual 's?  like this:  View - option price.php")* was created by *[kun333](/forum/user/35195-kun333 "View kun333's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Hello!
I'm need to display separately "price" and "currency" because i want to insert microdata for "offers/price" and "offers/priceCurrency/" How i can display price and currency in individual 's?

like this:

Hello!
I'm need to display separately "price" and "currency" because i want to insert microdata for "offers/price" and "offers/priceCurrency/" How i can display price and currency in individual &lt;span&gt;'s?

like this: Code:

&lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt; &lt;span class="hikashop_option_price_title"&gt;Цена:&lt;/span&gt; &lt;span class="hikashop_option_price_value"&gt;&lt;span itemprop="price"&gt;4 000,00&lt;/span&gt; &lt;span itemprop="currency"&gt;USD&lt;/span&gt; &lt;/span&gt;

View - option price.php

Last edit: 11 years 5 months ago by [kun333](/forum/user/35195-kun333 "View kun333's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY3NjQtc2VwYXJhdGUtcHJpY2UtYW5kLWN1cnJlbmN5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 5 months ago [\#200670](#200670) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Separate price and currency](/forum/26-product-category-display/876764-separate-price-and-currency#200670 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Hello! I'm need to display separately &quot;price&quot; and &quot;currency&quot; because i want to insert microdata for &quot;offers/price&quot; and &quot;offers/priceCurrency/&quot; How i can display price and currency in individual 's?  like this:  Hello! I'm need to display separately &quot;price&quot; and &quot;currency&quot; because i want to insert microdata for &quot;offers/price&quot; and &quot;offers/priceCurrency/&quot; How i can display price and currency in individual 's?  like this:  View - option price.php")*

Hi,

HikaShop already has microdata which supports prices with their currency. You can simply enable the microdata plugin via the Joomla plugins manager for that.
So you shouldn't have to do that.

If nevertheless you want to do it with custom code, you should do differently and instead of separating the price and the currency, you should add such tag in the views where the prices are added: Code:

&lt;?php $currency_id = hikashop_getCurrency(); $null = null; $currencyClass = hikashop_get('class.currency'); $currencies = $currencyClass-&gt;getCurrencies($currency_id,$null); $data=$currencies[$currency_id]; ?&gt; &lt;meta itemprop="priceCurrency" content="'.$data-&gt;currency_code.'" /&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY3NjQtc2VwYXJhdGUtcHJpY2UtYW5kLWN1cnJlbmN5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.105 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
