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

#   Customise Cart module template

##

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

Less More

- Posts: 237
- Thank you received: 5
-
-

6 years 1 week ago [\#326074](#326074) by [ltempest](/forum/user/1784-ltempest "View ltempest's Profile")  *[Customise Cart module template](/forum/26-product-category-display/901249-customise-cart-module-template#326074 "-- HikaShop version -- : 4.30 -- Joomla version -- : 3.9.22  Help! How can I create two different views for the product page and the Cart module. When I turn on the files view, it shows that the same template is being loaded in both the product page and the cart module, specifically the product/listing&#95;price.php file. See the attached screenshot. I want to simplify the cart module display and only include the non tax price in the module. However, when I edit the listing&#95;price.php template file it affects the main product display which I wish to keep as it currently displays. I know I could use CSS such as display:none but that does not seem to be the 'correct' way!  Thanks Lee")* was created by *[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")*

-- HikaShop version -- : 4.30
-- Joomla version -- : 3.9.22

Help!
How can I create two different views for the product page and the Cart module. When I turn on the files view, it shows that the same template is being loaded in both the product page and the cart module, specifically the product/listing_price.php file. See the attached screenshot. I want to simplify the cart module display and only include the non tax price in the module. However, when I edit the listing_price.php template file it affects the main product display which I wish to keep as it currently displays. I know I could use CSS such as display:none but that does not seem to be the 'correct' way!

Thanks
Lee

- [ ![Screenshot2020-11-18at17.01.51.png](/forum/attachment/51088) ](/forum/attachment/51088 "...at17.01.51.png") [ ](/forum/attachment/51088?download=1 "...at17.01.51.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDEyNDktY3VzdG9taXNlLWNhcnQtbW9kdWxlLXRlbXBsYXRlP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

6 years 1 week ago [\#326081](#326081) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customise Cart module template](/forum/26-product-category-display/901249-customise-cart-module-template#326081 "-- HikaShop version -- : 4.30 -- Joomla version -- : 3.9.22  Help! How can I create two different views for the product page and the Cart module. When I turn on the files view, it shows that the same template is being loaded in both the product page and the cart module, specifically the product/listing&#95;price.php file. See the attached screenshot. I want to simplify the cart module display and only include the non tax price in the module. However, when I edit the listing&#95;price.php template file it affects the main product display which I wish to keep as it currently displays. I know I could use CSS such as display:none but that does not seem to be the 'correct' way!  Thanks Lee")*

Hi,

It's indeed the same view file used in both places.
In listing_price.php you can have such code: Code:

if(!empty($this-&gt;element-&gt;cart_id)) { echo 'I am in the cart'; } else { echo 'I am not in the cart'; }

That way, you can display the prices differently based on where you are.

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

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

Less More

- Posts: 237
- Thank you received: 5
-
-

6 years 1 week ago -  6 years 1 week ago [\#326122](#326122) by [ltempest](/forum/user/1784-ltempest "View ltempest's Profile")  Replied by *[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")* on topic *[Customise Cart module template](/forum/26-product-category-display/901249-customise-cart-module-template#326122 "-- HikaShop version -- : 4.30 -- Joomla version -- : 3.9.22  Help! How can I create two different views for the product page and the Cart module. When I turn on the files view, it shows that the same template is being loaded in both the product page and the cart module, specifically the product/listing&#95;price.php file. See the attached screenshot. I want to simplify the cart module display and only include the non tax price in the module. However, when I edit the listing&#95;price.php template file it affects the main product display which I wish to keep as it currently displays. I know I could use CSS such as display:none but that does not seem to be the 'correct' way!  Thanks Lee")*

Nicolas,
Thanks for the quick reply. I kinda understand your code, but where in the listing_price.php file would this be added? Can you advise around which line number?

Thanks

UPDATE: I think i found it around line 135 and changed to:

if(!empty($this-&gt;element-&gt;cart_id)) {
echo '&lt;span class="hikashop_price_exvat"&gt;&lt;span class="hikashop_price_figure"&gt;'.$this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value, $price-&gt;price_currency_id).'&lt;/span&gt;'.JText::_('PRICE_BEFORE_TAX').'&lt;/span&gt;';
} else {
echo '&lt;span class="hikashop_price_exvat"&gt;&lt;span class="hikashop_price_figure"&gt;'.$this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value, $price-&gt;price_currency_id).'&lt;/span&gt;'.JText::_('PRICE_BEFORE_TAX').'&lt;/span&gt;';
echo '&lt;span class="hikashop_price_withvat"&gt;'.$this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value_with_tax, $price-&gt;price_currency_id).'&amp;nbsp;'.JText::_('PRICE_WITH_TAX').'&lt;/span&gt;';
}

Last edit: 6 years 1 week ago by [ltempest](/forum/user/1784-ltempest "View ltempest's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDEyNDktY3VzdG9taXNlLWNhcnQtbW9kdWxlLXRlbXBsYXRlP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

6 years 1 week ago [\#326132](#326132) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customise Cart module template](/forum/26-product-category-display/901249-customise-cart-module-template#326132 "-- HikaShop version -- : 4.30 -- Joomla version -- : 3.9.22  Help! How can I create two different views for the product page and the Cart module. When I turn on the files view, it shows that the same template is being loaded in both the product page and the cart module, specifically the product/listing&#95;price.php file. See the attached screenshot. I want to simplify the cart module display and only include the non tax price in the module. However, when I edit the listing&#95;price.php template file it affects the main product display which I wish to keep as it currently displays. I know I could use CSS such as display:none but that does not seem to be the 'correct' way!  Thanks Lee")*

Hi,

Yes this sounds good.

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

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