Itemid is not respected

  • Posts: 410
  • Thank you received: 15
1 year 1 month ago #349861

Hi, now I do tests with Joomla 4 and found this problem. When the Empty the Cart, the page will be reloaded, but it will not retain itemid even though it is entered. In the demo with Joomla 3 works properly. It may have affected the features - Set As Current Cart and Delete Cart in User control panel>Carts.

hikashop_completeLink('cart&task=remove&cid='.$cart->cart_id.'&'.hikashop_getFormToken().'=1&Itemid='.$Itemid)

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #349868

Hi,

Note that this is the URL to empty the cart. Once the cart is empty, the system will automatically redirect to the "URL where to redirect when the cart is empty" configured in the HikaShop configuration.
So check that setting. If that setting is empty, HikaShop should try to keep the current Itemid if it's a HikaShop menu item type. If not, it will automatically select another one.

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 15
1 year 1 month ago #349983

Hi, I want to ask if there is a way to make after executing the function to be redirected to a given url.
For example

hikashop_completeLink('cart&task=remove&cid='.$cart->cart_id.'&'.hikashop_getFormToken().'=1&Itemid='.$Itemid.
'&redirect=another url address')
or something like this,

Last edit: 1 year 1 month ago by neo191987.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #349988

Hi,

There is no direct parameter you can use for that.
However, in a plugin of the group "hikashop" or "system", you can implement the event onAfterCartDelete(&$ids) and in it, you can redirect the user wherever you want before HikaShop redirects to the "URL where to redirect when the cart is empty".

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum