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

#   Show main Price

##

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320127](#320127) by [davec](/forum/user/7092-davec "View davec's Profile")  *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320127 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")* was created by *[davec](/forum/user/7092-davec "View davec's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18

Hi

I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.

Thanks

Dave ![B)](/media/kunena/emoticons/9.png "B)")

- [ ![Screenshot&#95;2020-06-02-PUBG-Battlegrounds-1-12-SSG001-by-Soldier-Story.jpg](/forum/attachment/49581) ](/forum/attachment/49581 "...dier-Story.jpg") [ ](/forum/attachment/49581?download=1 "...dier-Story.jpg")

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

6 years 5 months ago -  6 years 5 months ago [\#320133](#320133) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320133 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hello,

For this I see **2** solutions :
**1.** Directly add the main price in the description part, and if needed some html tag
**=&gt;** This solution will be enough **IF** there are for **all you customers the same price**, I mean not location specific taxes from different area.
**2.** The other solution is create an **override view**, this will required **html &amp; php knowledge**.
**=&gt;** See [ **this tutorial**](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout), and in details you will have to find the part that manage the main price, and duplicate it to add it where you need it, before description part.

Hope this will help you to get what you need.
Regards

Last edit: 6 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320180](#320180) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320180 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Philip

I had found that code already. However copying it to the another position displays the deposit price which is the first characteristic. I need the full price displayed only at the top. The site is live and has a fairly large inventory so adding it as part of the description is not really an option.

Thanks

Dave

- [ ![Screenshot&#95;2020-06-03FalconerPredatorPXbyHiYa.png](/forum/attachment/49600) ](/forum/attachment/49600 "...orPXbyHiYa.png") [ ](/forum/attachment/49600?download=1 "...orPXbyHiYa.png")

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

6 years 5 months ago -  6 years 5 months ago [\#320184](#320184) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320184 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hello,

I'm not sure to follow you can you what do you mean by the first characteristics price ? And the difference in your mind with the full price ?

But I will details the override process in order to guide you.
**1.** Have a look from **Main HikaShop Configuration**, in **Advanced** tab, and in first **Advanced settings** part
[ ![alt](https://i.imgur.com/b6LNGEH.png) ](https://i.imgur.com/b6LNGEH.png "alt")

This option will add on the **frontend view reference** that display each part.
**2.** From this in the **show\_default** view you will have some code that call the view **listing\_price** view, the idea is to add this "**view call**" to have the main price display, by main I mean default product variant but I'm awaiting news from you to better understand this point.

Hope this will help you to progress on your subject.
Regards

Last edit: 6 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320230](#320230) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320230 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Philip

I have this code but when adding it to the default show it displays the lower price as this is set as the default in the characteristics.
Code:

&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt;&lt;?php if(empty($this-&gt;row-&gt;prices)) { echo JText::_('FREE_PRICE'); } else { $first = true; echo JText::_('PRICE_BEGINNING'); $i = 0; if(!empty($show_msrp)) { echo '&lt;span class="hikashop_product_our_price_title"&gt;'.JText::_('PRODUCT_MSRP_AFTER').'&lt;/span&gt; '; } if($this-&gt;params-&gt;get('price_with_tax', 3) == 3) { $this-&gt;params-&gt;set('price_with_tax', (int)$config-&gt;get('price_with_tax')); } $microDataForCurrentProduct = false; foreach($this-&gt;row-&gt;prices as $k =&gt; $price) { if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(!empty($this-&gt;unit) &amp;&amp; isset($price-&gt;unit_price)) { $price =&amp; $price-&gt;unit_price; } if(empty($price-&gt;price_currency_id)) continue; $start = JText::_('PRICE_BEGINNING_'.$i); if($start != 'PRICE_BEGINNING_'.$i) { echo $start; } if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $price-&gt;price_min_quantity &gt; 1) { echo '&lt;span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price-&gt;price_min_quantity.'"&gt;'; } $classes = array('hikashop_product_price hikashop_product_price_'.$i); if(!empty($this-&gt;row-&gt;discount)) { $classes[]='hikashop_product_price_with_discount'; } if(!empty($this-&gt;row-&gt;discount)) { if(in_array($this-&gt;params-&gt;get('show_discount'), array(1, 4))) { echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount, 0, 5) !== 0) { echo $this-&gt;currencyHelper-&gt;format( -1 * $this-&gt;row-&gt;discount-&gt;discount_flat_amount, $price-&gt;price_currency_id); } elseif(bccomp($this-&gt;row-&gt;discount-&gt;discount_percent_amount, 0, 5) !== 0) { echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } if(in_array($this-&gt;params-&gt;get('show_discount'), array(2, 4))) { echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax, $price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax') == 2 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax')) { echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount, $price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)) { echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')) { echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax, $price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax') == 2 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount)) { echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount, $price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } elseif($this-&gt;params-&gt;get('show_discount') == 3) { } } $attributes = ''; if(!empty($this-&gt;element-&gt;product_id) &amp;&amp; !$microDataForCurrentProduct) { $round = $this-&gt;currencyHelper-&gt;getRounding($price-&gt;price_currency_id, true); $prefix = 'data-'; $microDataForCurrentProduct = true; if(empty($this-&gt;displayed_price_microdata)) { $this-&gt;displayed_price_microdata = true; $prefix = ''; } if($this-&gt;params-&gt;get('price_with_tax')) { $attributes = ' '.$prefix.'itemprop="price" '.$prefix.'content="'. str_replace(',','.',$this-&gt;currencyHelper-&gt;round($price-&gt;price_value_with_tax, $round, 0, true)) .'"'; } else { $attributes = ' '.$prefix.'itemprop="price" '.$prefix.'content="'. str_replace(',','.',$this-&gt;currencyHelper-&gt;round($price-&gt;price_value, $round, 0, true)) .'"'; } } echo '&lt;span class="'.implode(' ',$classes).'"'.$attributes.'&gt;'; if($this-&gt;params-&gt;get('price_with_tax')) { echo $this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value_with_tax, $price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax') == 2 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax')) { echo $this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value, $price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)) { echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')) { echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax, $price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax') == 2 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value, $price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit', 1)) { if($price-&gt;price_min_quantity &gt; 1) { echo '&lt;span class="hikashop_product_price_per_unit_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;'; } else { echo '&lt;span class="hikashop_product_price_per_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;'; } } if($this-&gt;params-&gt;get('show_price_weight')){ if(!empty($this-&gt;element-&gt;product_id) &amp;&amp; isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp($this-&gt;row-&gt;product_weight, 0, 3)) { echo JText::_('PRICE_SEPARATOR').'&lt;span class="hikashop_product_price_per_weight_unit"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ $weight_price = $price-&gt;price_value_with_tax / $this-&gt;row-&gt;product_weight; echo $this-&gt;currencyHelper-&gt;format($weight_price, $price-&gt;price_currency_id).' / '.JText::_($this-&gt;row-&gt;product_weight_unit); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax') == 2 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax')) { $weight_price = $price-&gt;price_value / $this-&gt;row-&gt;product_weight; echo $this-&gt;currencyHelper-&gt;format($weight_price, $price-&gt;price_currency_id).' / '.JText::_($this-&gt;row-&gt;product_weight_unit); } if($this-&gt;params-&gt;get('price_with_tax') == 2) { echo JText::_('PRICE_AFTER_TAX'); } echo '&lt;/span&gt;'; } } if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $price-&gt;price_min_quantity &gt; 1) { echo '&lt;/span&gt;'; } $end = JText::_('PRICE_ENDING_'.$i); if($end != 'PRICE_ENDING_'.$i) { echo $end; } $i++; } echo JText::_('PRICE_END'); } ?&gt;&lt;/span&gt;

The full price would be £19.99 for instance the default characteristics price is £0.01 which is what is displayed if I add the code.

Thanks

Dave

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDAwNTItc2hvdy1tYWluLXByaWNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

6 years 5 months ago [\#320239](#320239) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320239 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi,

In product / show.php $this-&gt;row is likely the last variant of the product.
While the main product information is in $this-&gt;element-&gt;main (if the product has variants), or $this-&gt;element (without variants).
So I think you want to adapt that variable in your custom code.

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320259](#320259) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320259 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Nicolas

yes the products have a variant. The variant lower price is the default. The main price is £79.99 for instance this is what I would like to display at the top of the description.

Thanks

David

- [ ![Screenshot&#95;2020-06-04Administration-Products-price.png](/forum/attachment/49615) ](/forum/attachment/49615 "...ucts-price.png") [ ](/forum/attachment/49615?download=1 "...ucts-price.png")
- [ ![Screenshot&#95;2020-06-04-Administration-Products-variant.png](/forum/attachment/49616) ](/forum/attachment/49616 "...ts-variant.png") [ ](/forum/attachment/49616?download=1 "...ts-variant.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDAwNTItc2hvdy1tYWluLXByaWNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

6 years 5 months ago [\#320266](#320266) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320266 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi,

I think you can just use this code then: Code:

&lt;?php echo $this-&gt;currencyHelper-&gt;format($this-&gt;element-&gt;prices[0]-&gt;price_value_with_tax, $this-&gt;element-&gt;prices[0]-&gt;price_currency_id); ?&gt;

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago -  6 years 5 months ago [\#320291](#320291) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320291 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Nicolas

sorry but that code displays the deposit amount which is what I am trying to avoid. Please see the screenshot.

This message contains confidential information

Basically the code like others I have tried displays the lowest price variant price where as I need to show the full price.

Thanks

David

- [ ![Screenshot&#95;2020-06-05UltimateGuardFigureStand34mmBigPeg.png](/forum/attachment/49622) ](/forum/attachment/49622 "...34mmBigPeg.png") [ ](/forum/attachment/49622?download=1 "...34mmBigPeg.png")

Last edit: 6 years 5 months ago by [davec](/forum/user/7092-davec "View davec's Profile"). Reason: add information

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDAwNTItc2hvdy1tYWluLXByaWNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

6 years 5 months ago [\#320293](#320293) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320293 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi,

The code I gave displays the price of the default variant.
If the full price is in the main product (which I'm guessing from your messages), then you can use this code instead: Code:

&lt;?php echo $this-&gt;currencyHelper-&gt;format($this-&gt;element-&gt;main-&gt;prices[0]-&gt;price_value_with_tax, $this-&gt;element-&gt;main-&gt;prices[0]-&gt;price_currency_id); ?&gt;

The following user(s) said Thank You: [davec](/forum/user/7092-davec "View davec's Profile")

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320403](#320403) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320403 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Nicolas

thanks very much for the code, spot on!! ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

David

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320523](#320523) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320523 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Nicolas

sorry the code hasn't quite fixed it for me. If there are no variants then the price shows as 0. Please see attached screenshot. Would appreciate your help?

Thanks

David

- [ ![Screenshot2020-06-09at18.48.55.png](/forum/attachment/49664) ](/forum/attachment/49664 "...at18.48.55.png") [ ](/forum/attachment/49664?download=1 "...at18.48.55.png")

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

6 years 5 months ago -  6 years 5 months ago [\#320575](#320575) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320575 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hello,

Maybe you can add a check condition in order to adapt the code to display from current product configuration :
**if (isset($variants)) {
=&gt; Use custom code
}
else {
=&gt; Use default code
}**
Hope this will help you.
Regards

Last edit: 6 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320580](#320580) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320580 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi Philip

Can you please provide a full code as I cannot see how this can be implemented?

Thanks

David

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDAwNTItc2hvdy1tYWluLXByaWNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

6 years 5 months ago [\#320584](#320584) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320584 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Hi,
Code:

&lt;?php if (isset($this-&gt;element-&gt;main)) { echo $this-&gt;currencyHelper-&gt;format($this-&gt;element-&gt;main-&gt;prices[0]-&gt;price_value_with_tax, $this-&gt;element-&gt;main-&gt;prices[0]-&gt;price_currency_id); } else { echo $this-&gt;currencyHelper-&gt;format($this-&gt;element-&gt;prices[0]-&gt;price_value_with_tax, $this-&gt;element-&gt;prices[0]-&gt;price_currency_id); } ?&gt;

The following user(s) said Thank You: [davec](/forum/user/7092-davec "View davec's Profile")

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

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

Less More

- Posts: 447
- Thank you received: 20
-
-

6 years 5 months ago [\#320598](#320598) by [davec](/forum/user/7092-davec "View davec's Profile")  Replied by *[davec](/forum/user/7092-davec "View davec's Profile")* on topic *[Show main Price](/forum/26-product-category-display/900052-show-main-price#320598 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hi  I have products with variants and use the dropdown to select the price options. I would like to display the main price at the top of the product description, ideally below the ETA field as per the attachment.  Thanks  Dave B)")*

Morning Nicolas

all seems to be working now as expected. Thanks very much for your help with this ![B)](/media/kunena/emoticons/9.png "B)")

Dave

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDAwNTItc2hvdy1tYWluLXByaWNlP3RtcGw9bWFya2Rvd24=) 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.088 seconds

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