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

#   Hika cart module not hidden when empty

##

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

Less More

- Posts: 34
- Thank you received: 1
-
-
-

6 years 11 months ago [\#313975](#313975) by [sandvalley2019](/forum/user/58125-sandvalley2019 "View sandvalley2019's Profile")  *[Hika cart module not hidden when empty](/forum/27-checkout/898850-hika-cart-module-not-hidden-when-empty#313975 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25 -- Browser(s) name and version -- : every browser -- Error-message(debug-mod must be tuned on) -- : no error message  No error message, but the Hikashop Cart Module (&quot;Winkelmandje&quot;) is not hidden, even when I set the &quot;hide when emtpy&quot; option in the module.")* was created by *[sandvalley2019](/forum/user/58125-sandvalley2019 "View sandvalley2019's Profile")*

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.25
-- Browser(s) name and version -- : every browser
-- Error-message(debug-mod must be tuned on) -- : no error message

No error message, but the Hikashop Cart Module ("Winkelmandje") is not hidden, even when I set the "hide when emtpy" option in the module.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5ODg1MC1oaWthLWNhcnQtbW9kdWxlLW5vdC1oaWRkZW4td2hlbi1lbXB0eT90bXBsPW1hcmtkb3du) 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 11 months ago [\#313980](#313980) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hika cart module not hidden when empty](/forum/27-checkout/898850-hika-cart-module-not-hidden-when-empty#313980 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25 -- Browser(s) name and version -- : every browser -- Error-message(debug-mod must be tuned on) -- : no error message  No error message, but the Hikashop Cart Module (&quot;Winkelmandje&quot;) is not hidden, even when I set the &quot;hide when emtpy&quot; option in the module.")*

Hi,

The "the cart is empty" message is removed.
However, you still need the area with the HTML of the cart module so that when you add something to the cart, the ajax process can dynamically update the area with the content of the cart.
Also, the text "Winkelmandje" is the title of the module which is displayed by the template, not HikaShop. If you don't want the the title of the module when the cart is empty, you should turn off the display of the title in the settings of the module, and instead edit the file "cart" of the view "product" via the menu Display&gt;Views and add the title there, before the code: Code:

&lt;?php echo $this-&gt;notice_html; if(!empty($this-&gt;element-&gt;messages)) { foreach($this-&gt;element-&gt;messages as $msg) { if(empty($msg['type'])) $msg['type'] = 'success'; hikashop_display($msg['msg'], $msg['type']); } }

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

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

Less More

- Posts: 34
- Thank you received: 1
-
-
-

6 years 11 months ago [\#314098](#314098) by [sandvalley2019](/forum/user/58125-sandvalley2019 "View sandvalley2019's Profile")  Replied by *[sandvalley2019](/forum/user/58125-sandvalley2019 "View sandvalley2019's Profile")* on topic *[Hika cart module not hidden when empty](/forum/27-checkout/898850-hika-cart-module-not-hidden-when-empty#314098 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25 -- Browser(s) name and version -- : every browser -- Error-message(debug-mod must be tuned on) -- : no error message  No error message, but the Hikashop Cart Module (&quot;Winkelmandje&quot;) is not hidden, even when I set the &quot;hide when emtpy&quot; option in the module.")*

Hi Nicolas,

Thanks, this works. One more thing: the function $this-&gt;countModules( 'moduleposition' ) in my template always return true, even if the cart is empty. But I suppose there needs to be some code in order to add a product dynamicaly via Ajax.

Regards,
Peter

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

6 years 11 months ago [\#314107](#314107) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Hika cart module not hidden when empty](/forum/27-checkout/898850-hika-cart-module-not-hidden-when-empty#314107 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25 -- Browser(s) name and version -- : every browser -- Error-message(debug-mod must be tuned on) -- : no error message  No error message, but the Hikashop Cart Module (&quot;Winkelmandje&quot;) is not hidden, even when I set the &quot;hide when emtpy&quot; option in the module.")*

Hello Peter,

Even if your cart is empty, if you have published your cart module on that position, then that method should return "true" or &gt;1 regardless of the number of products in your cart.

Kind regards,
Mohamed.

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

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

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