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

#   404 error in cart pop-up in some pages

##

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

Less More

- Posts: 29
- Thank you received: 2
-
-

13 years 9 months ago [\#89104](#89104) by [wirthconsulting](/forum/user/3837-wirthconsulting "View wirthconsulting's Profile")  *[404 error in cart pop-up in some pages](/forum/3-bug-report/78155-404-error-in-cart-pop-up-in-some-pages#89104 "We currently have an issue with Hikashop 2.1.0 (but the same occured in 1.6 before we upgraded):  We have two main categories for products: Online Shop and Library. The Online shop is publicly accessible and the Library is accessible only to a registered users group called 'Members'.  We have the following settings configured in the Configuration -&gt; Cart section:  &#42; After a product is added to the cart: stay and display a popup notice  &#42; Notice popup display time: 2000 ms  When a person adds something to their cart in the Online Shop area, the pop-up displays an error message: &quot;404 - Page not found : notice&quot;  If we login and add a product to our cart in the Library section, the error does not appear.  So, we changed the Library menu item from 'Member' access to 'Public' access thinking that perhaps that would help - it didn't. We also removed all customisations from the test site to ensure the code changes weren't causing an issue but that didn't help either.  Next we tried the SEO settings:  In backend -&gt; global configuration -&gt; site -&gt; SEO settings and set  Search Engine Friendly URLs = No Use URL rewriting = No  Now the cart pop-up works fine on all categories.  My developers investigated further and found that if we change the following code, it works OK with SEF settings on:  File Path : /administrator/components/com&#95;hikashop/helpers/Cart.php  Original Code :  Updated code :  Any thoughts on why this might be?  thanks, B.")* was created by *[wirthconsulting](/forum/user/3837-wirthconsulting "View wirthconsulting's Profile")*

We currently have an issue with Hikashop 2.1.0 (but the same occured in 1.6 before we upgraded):

We have two main categories for products: Online Shop and Library. The Online shop is publicly accessible and the Library is accessible only to a registered users group called 'Members'.

We have the following settings configured in the Configuration -&gt; Cart section:

- After a product is added to the cart: stay and display a popup notice
- Notice popup display time: 2000 ms

When a person adds something to their cart in the Online Shop area, the pop-up displays an error message:
"404 - Page not found : notice"

If we login and add a product to our cart in the Library section, the error does not appear.

So, we changed the Library menu item from 'Member' access to 'Public' access thinking that perhaps that would help - it didn't.
We also removed all customisations from the test site to ensure the code changes weren't causing an issue but that didn't help either.

Next we tried the SEO settings:

In backend -&gt; global configuration -&gt; site -&gt; SEO settings and set

Search Engine Friendly URLs = No
Use URL rewriting = No

Now the cart pop-up works fine on all categories.

My developers investigated further and found that if we change the following code, it works OK with SEF settings on:

File Path : /administrator/components/com_hikashop/helpers/Cart.php

Original Code :
Code:

echo '&lt;div style="display:none;"&gt;'. '&lt;a rel="{handler: \'iframe\',size: {x: 480, y: 140}}" id="hikashop_notice_box_trigger_link" href="'.hikashop_completeLink('checkout&amp;task=notice'.$url_itemid,true).'"&gt;&lt;/a&gt;'. '&lt;a rel="{handler: \'iframe\',size: {x: 480, y: 140}}" id="hikashop_notice_wishlist_box_trigger_link" href="'.hikashop_completeLink('checkout&amp;task=notice&amp;cart_type=wishlist'.$url_itemid,true).'"&gt;&lt;/a&gt;'. '&lt;/div&gt;';

Updated code :
Code:

echo '&lt;div style="display:none;"&gt;'. '&lt;a rel="{handler: \'iframe\',size: {x: 480, y: 140}}" id="hikashop_notice_box_trigger_link" href="/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notice&amp;tmpl=component"&gt;&lt;/a&gt;'. '&lt;a rel="{handler: \'iframe\',size: {x: 480, y: 140}}" id="hikashop_notice_wishlist_box_trigger_link" href="'.hikashop_completeLink('checkout&amp;task=notice&amp;cart_type=wishlist'.$url_itemid,true).'"&gt;&lt;/a&gt;'. '&lt;/div&gt;';

Any thoughts on why this might be?

thanks,
B.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83ODE1NS00MDQtZXJyb3ItaW4tY2FydC1wb3AtdXAtaW4tc29tZS1wYWdlcz90bXBsPW1hcmtkb3du) 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: 86564
- Thank you received: 14311
-
-

13 years 9 months ago [\#89342](#89342) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[404 error in cart pop-up in some pages](/forum/3-bug-report/78155-404-error-in-cart-pop-up-in-some-pages#89342 "We currently have an issue with Hikashop 2.1.0 (but the same occured in 1.6 before we upgraded):  We have two main categories for products: Online Shop and Library. The Online shop is publicly accessible and the Library is accessible only to a registered users group called 'Members'.  We have the following settings configured in the Configuration -&gt; Cart section:  &#42; After a product is added to the cart: stay and display a popup notice  &#42; Notice popup display time: 2000 ms  When a person adds something to their cart in the Online Shop area, the pop-up displays an error message: &quot;404 - Page not found : notice&quot;  If we login and add a product to our cart in the Library section, the error does not appear.  So, we changed the Library menu item from 'Member' access to 'Public' access thinking that perhaps that would help - it didn't. We also removed all customisations from the test site to ensure the code changes weren't causing an issue but that didn't help either.  Next we tried the SEO settings:  In backend -&gt; global configuration -&gt; site -&gt; SEO settings and set  Search Engine Friendly URLs = No Use URL rewriting = No  Now the cart pop-up works fine on all categories.  My developers investigated further and found that if we change the following code, it works OK with SEF settings on:  File Path : /administrator/components/com&#95;hikashop/helpers/Cart.php  Original Code :  Updated code :  Any thoughts on why this might be?  thanks, B.")*

Hi,

That sounds like a SEF/menu issue.
The modification you made removes the Itemid from the popup page URL.
So the SEF system of Joomla will user the default menu as current menu to display the popup page while without the modification, it will display the popup with the current Itemid (menu).
If the current menu is not a HikaShop page based on your website/server SEF settings Joomla might not be able to know that it's a hikashop page and will display a 404 error.
So I suppose that you must be in that website/server SEF case and that the page from which you're adding the product is neither a product menu page, nor a products listing menu page nor a category listing menu page. So basically you're adding the product to the cart from a products listing module on a non Hikashop page or in a joomla article page or something like that.
Am I right ?

The solution in your case is easy, the problem is that it's quite complex to put in place by default as HikaShop cannot really guess which menu should be the one which should be used.

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

13 years 9 months ago -  13 years 9 months ago [\#90527](#90527) by [wirthconsulting](/forum/user/3837-wirthconsulting "View wirthconsulting's Profile")  Replied by *[wirthconsulting](/forum/user/3837-wirthconsulting "View wirthconsulting's Profile")* on topic *[404 error in cart pop-up in some pages](/forum/3-bug-report/78155-404-error-in-cart-pop-up-in-some-pages#90527 "We currently have an issue with Hikashop 2.1.0 (but the same occured in 1.6 before we upgraded):  We have two main categories for products: Online Shop and Library. The Online shop is publicly accessible and the Library is accessible only to a registered users group called 'Members'.  We have the following settings configured in the Configuration -&gt; Cart section:  &#42; After a product is added to the cart: stay and display a popup notice  &#42; Notice popup display time: 2000 ms  When a person adds something to their cart in the Online Shop area, the pop-up displays an error message: &quot;404 - Page not found : notice&quot;  If we login and add a product to our cart in the Library section, the error does not appear.  So, we changed the Library menu item from 'Member' access to 'Public' access thinking that perhaps that would help - it didn't. We also removed all customisations from the test site to ensure the code changes weren't causing an issue but that didn't help either.  Next we tried the SEO settings:  In backend -&gt; global configuration -&gt; site -&gt; SEO settings and set  Search Engine Friendly URLs = No Use URL rewriting = No  Now the cart pop-up works fine on all categories.  My developers investigated further and found that if we change the following code, it works OK with SEF settings on:  File Path : /administrator/components/com&#95;hikashop/helpers/Cart.php  Original Code :  Updated code :  Any thoughts on why this might be?  thanks, B.")*

Hi Nicolas,

No the page from which items are added to cart are normal Hikashop Product Listing pages i.e. we have published two menu items and both link to the 'Product Listing' menu type for the Hikashop component - the menu items just link to different categories.

Any further ideas?

thanks
Bianca

Last edit: 13 years 9 months ago by [wirthconsulting](/forum/user/3837-wirthconsulting "View wirthconsulting's Profile"). Reason: spelling error

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83ODE1NS00MDQtZXJyb3ItaW4tY2FydC1wb3AtdXAtaW4tc29tZS1wYWdlcz90bXBsPW1hcmtkb3du) 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: 86564
- Thank you received: 14311
-
-

13 years 8 months ago [\#90786](#90786) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[404 error in cart pop-up in some pages](/forum/3-bug-report/78155-404-error-in-cart-pop-up-in-some-pages#90786 "We currently have an issue with Hikashop 2.1.0 (but the same occured in 1.6 before we upgraded):  We have two main categories for products: Online Shop and Library. The Online shop is publicly accessible and the Library is accessible only to a registered users group called 'Members'.  We have the following settings configured in the Configuration -&gt; Cart section:  &#42; After a product is added to the cart: stay and display a popup notice  &#42; Notice popup display time: 2000 ms  When a person adds something to their cart in the Online Shop area, the pop-up displays an error message: &quot;404 - Page not found : notice&quot;  If we login and add a product to our cart in the Library section, the error does not appear.  So, we changed the Library menu item from 'Member' access to 'Public' access thinking that perhaps that would help - it didn't. We also removed all customisations from the test site to ensure the code changes weren't causing an issue but that didn't help either.  Next we tried the SEO settings:  In backend -&gt; global configuration -&gt; site -&gt; SEO settings and set  Search Engine Friendly URLs = No Use URL rewriting = No  Now the cart pop-up works fine on all categories.  My developers investigated further and found that if we change the following code, it works OK with SEF settings on:  File Path : /administrator/components/com&#95;hikashop/helpers/Cart.php  Original Code :  Updated code :  Any thoughts on why this might be?  thanks, B.")*

Hi,

Mmm, that sounded like a nice theory for your case.

What if you change :
"/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notice&amp;tmpl=component"

by:
"/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notice&amp;tmpl=component'.$url_itemid.'"

Does it work ?

Could you do a screenshot of the joomla options of your menu ?

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

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