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

#   like to have the price with option on top in show\_default template

##

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

Less More

- Posts: 424
- Thank you received: 11
-
-

4 years 11 months ago [\#337018](#337018) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337018 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")* was created by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")*

-- HikaShop version -- : 4..1.1
-- Joomla version -- : 3.10.2
-- PHP version -- : 7.4.x

Hello,
In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???

Hope you can help..
[ ![screenshot-01.bluepoint-concept.nl-2021.11.12-13&#95;15&#95;48.png](/forum/attachment/53866) ](/forum/attachment/53866 "...2-13&#95;15&#95;48.png")

Thanks,

Mark

- [ ![screenshot-01.bluepoint-concept.nl-2021.11.12-13&#95;15&#95;48.png](/forum/attachment/53866) ](/forum/attachment/53866 "...2-13&#95;15&#95;48.png") [ ](/forum/attachment/53866?download=1 "...2-13&#95;15&#95;48.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86321
- Thank you received: 14279
-
-

4 years 11 months ago [\#337020](#337020) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337020 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Hi,

Moving the display of that price elsewhere in the interface is quite easy, you just have to move the "price with option" zone with the layout drag&amp;drop interface when you're editing your show_default view file.
And if you don't have the interface because you've made too many modifications, you can move its code directly: Code:

&lt;!-- PRICE WITH OPTIONS --&gt; &lt;?php if($this-&gt;params-&gt;get('show_price')) { ?&gt; &lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt; &lt;/span&gt; &lt;?php } ?&gt; &lt;!-- EO PRICE WITH OPTIONS --&gt;

Duplicating it is more complex since you can only have one element with the same ID in HTML.
You would have to duplicate that code and change the ID in it, which means that you'll also have to edit the file option.php to add custom javascript code to handle that new ID.
For example, you could duplicate the code: Code:

var target = d.getElementById("hikashop_product_price_with_options_main"); if(target) o.xRequest("'.hikashop_completeLink('product&amp;task=price'.$url_itemid,true,true).'", {mode:"POST",data:"price="+price_with_options.value,update:target});

That would lead to the AJAX request to get the price with options being done twice instead of once each time, so it's not that nice, but it's way easier than modifying the code to copy the data after the AJAX request.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 424
- Thank you received: 11
-
-

4 years 11 months ago [\#337064](#337064) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337064 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Thanks,

This works fine..
Super!! ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 424
- Thank you received: 11
-
-

4 years 11 months ago [\#337148](#337148) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337148 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Hi,
As i said in my previous reply, your solution works fine.. but what i forgot is that if a product only has variants and no options the price of the product is gone.. how can i accomplish that if the product has no options it shows the price without options..
hope you understand what i mean..

[ ![screenshot-01.bluepoint-concept.nl-2021.11.17-09&#95;49&#95;43.png](/forum/attachment/53878) ](/forum/attachment/53878 "...7-09&#95;49&#95;43.png")

- [ ![screenshot-01.bluepoint-concept.nl-2021.11.17-09&#95;49&#95;43.png](/forum/attachment/53878) ](/forum/attachment/53878 "...7-09&#95;49&#95;43.png") [ ](/forum/attachment/53878?download=1 "...7-09&#95;49&#95;43.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86321
- Thank you received: 14279
-
-

4 years 11 months ago [\#337156](#337156) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337156 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Hi,

Well, HikaShop displays the price by default.
So there is nothing to do normally.
Which means that you've removed the display of the default price to only display the price with options. And of course, the price with options doesn't display when there are no options.
The system isn't made to display the price with options when there are no options. That would require complex changes.
I would rather recommand that you display the normal price displayed by HikaShop by default. And then, if you only want to display it when there are no options that's quite easy. You can just have that code like that: Code:

if(empty($this-&gt;element-&gt;options)) { // default code of HikaShop to display the price without the options }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 424
- Thank you received: 11
-
-

4 years 11 months ago [\#337222](#337222) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337222 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Hi Nicolas,

Thanks for the reply. In which file do i need to have this code?
In the view -&gt; product/options.php or the show_default?
Tried both,
but can not get the main price to show up..
Hope you can help a little more..
Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 424
- Thank you received: 11
-
-

4 years 11 months ago [\#337227](#337227) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[like to have the price with option on top in show\_default template](/forum/2-general-talk-about-hikashop/903469-like-to-have-the-price-with-option-on-top-in-show-default-template#337227 "-- HikaShop version -- : 4..1.1 -- Joomla version -- : 3.10.2 -- PHP version -- : 7.4.x  Hello, In the view of the show default template, we now have the price of the product or the product variant on top. In the bottom we get the full price with options. We would like to show the full price on top as well.. how can i accomplish that???  Hope you can help..  Thanks,  Mark")*

Hey Nicolas,

Thanks.. I think i figure it out.. and now it seems like it goes the way we want to have it..

I will check on multiple products to see ..

I am allready happy so far.. ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMzQ2OS1saWtlLXRvLWhhdmUtdGhlLXByaWNlLXdpdGgtb3B0aW9uLW9uLXRvcC1pbi1zaG93LWRlZmF1bHQtdGVtcGxhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.121 seconds

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

[](#top)
