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

#   Change product page to show price twice.

##

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

Less More

- Posts: 32
- Thank you received: 1
-
-

12 years 3 months ago [\#166496](#166496) by [loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")  *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#166496 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")* was created by *[loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : All major browsers
-- Error-message(debug-mod must be tuned on) -- : No error message!

Dear Hikashop users, admins and contributors.

We have changed the product page layout completely but can't get one thing to work. We are editing the following file:

product / show_default.php

In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:

So basically our page looks as follows:

TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE
LEFT PART BEGINS &#124; RIGHT PART BEGINS
PRICE &#124; OPTIONS
BOTTOM PART &#124; PRODUCT CHARACTERS
LEFT PART ENDS &#124; RIGHT PART ENDS

But we want to have it like this:

TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE
LEFT PART BEGINS &#124; RIGHT PART BEGINS
PRICE &#124; OPTIONS
BOTTOM PART &#124; PRODUCT CHARACTERS
LEFT PART ENDS &#124; RIGHT PART ENDS
PRICE &lt;== Only visible for mobile users through css.

We already tried to copy the part that calculates the price and this works only for a small part because the price is not visible but the quantity field and add to cart buttons are showing.

The first price is working but the second is not visible.
Any help would be greatly appreciated.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE5MS1jaGFuZ2UtcHJvZHVjdC1wYWdlLXRvLXNob3ctcHJpY2UtdHdpY2U/dG1wbD1tYXJrZG93bg==) 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: 86360
- Thank you received: 14296
-
-

12 years 3 months ago [\#166502](#166502) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#166502 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

Hi,

The price is displayed with that code: Code:

$this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate();

It's not linked with the quantity or add to cart, so I'm not sure what is the link with them and your problem ?
You just need to add that code at the end of the view file in order to get the price to display a second time at the bottom. Then you probably want to add some CSS on it to only display when needed.

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

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

Less More

- Posts: 32
- Thank you received: 1
-
-

12 years 3 months ago [\#166703](#166703) by [loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")  Replied by *[loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")* on topic *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#166703 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

Thank you for that answer. But a new issue arrived.

We added this text and it shows the product price. But the product price is 0 (FREE) because the product price is basically made up out of options and characters. For instance you can choose the option small, medium and large with as characters red, green, blue and 30 more characters.

The price that is shown first says: Price with options: € 100,00
The second price (on the bottom of the page) says FREE

Can we change 'listing_price' to something else to show the price with options?

Thanks for helping.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE5MS1jaGFuZ2UtcHJvZHVjdC1wYWdlLXRvLXNob3ctcHJpY2UtdHdpY2U/dG1wbD1tYXJrZG93bg==) 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: 86360
- Thank you received: 14296
-
-

12 years 3 months ago [\#166711](#166711) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#166711 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

You can't do that by changing listing_price or calling listing_price a second time.
Instead, you need to add a span tag with a specific id and modify the javascript of the "option" view file so that it doesn't only update the span with the id hikashop_product_price_with_options_main but also the span with your specific id.
That's the JS for the default price with option display:
var totalPrice = window.document.getElementById('hikashop_product_price_with_options_main'); if(totalPrice) totalPrice.innerHTML = result;

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

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

Less More

- Posts: 32
- Thank you received: 1
-
-

12 years 2 months ago [\#167870](#167870) by [loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")  Replied by *[loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")* on topic *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#167870 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

Thank you very much Nicolas.

We have a bit of a problem with finding the 'option' view file. We have looked in display&gt;views and we found two option files but both does not have the var totalPrice in it.

View: product &#124; File: option
View: product &#124; File: option_price

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE5MS1jaGFuZ2UtcHJvZHVjdC1wYWdlLXRvLXNob3ctcHJpY2UtdHdpY2U/dG1wbD1tYXJrZG93bg==) 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: 86360
- Thank you received: 14296
-
-

12 years 2 months ago [\#167872](#167872) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#167872 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

It's the first one. You can see that variable 20 lines from the end of the file.

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

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

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

Less More

- Posts: 32
- Thank you received: 1
-
-

12 years 1 month ago [\#173333](#173333) by [loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")  Replied by *[loginsecure](/forum/user/20349-loginsecure "View loginsecure's Profile")* on topic *[\[SOLVED\] Change product page to show price twice.](/forum/4-how-to/870191-change-product-page-to-show-price-twice#173333 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : All major browsers -- Error-message(debug-mod must be tuned on) -- : No error message!  Dear Hikashop users, admins and contributors.  We have changed the product page layout completely but can't get one thing to work. We are editing the following file:  product / show&#95;default.php  In this we moved the bottom part inside the left container. The right container stayed the same. We are currently showing the price just above the bottom part in the left container:  So basically our page looks as follows:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS  But we want to have it like this:  TITLE TITLE TITLE TITLE TITLE TITLE TITLE TITLE LEFT PART BEGINS | RIGHT PART BEGINS PRICE | OPTIONS BOTTOM PART | PRODUCT CHARACTERS LEFT PART ENDS | RIGHT PART ENDS PRICE ")*

Dear Nicolas,

Thank you for your suggestions and tips. Everything is working fine now. Superb support as always.

Greetings LoginSecure.

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

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