How to auto-redirect to cart after adding product to cart

  • Posts: 121
  • Thank you received: 2
3 years 10 months ago #328363

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3.25
-- Browser(s) name and version -- : Firefox

How can I configure HikaShop to automatically redirect to the cart after the customer has added an item to the cart?

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #328379

Hi,

You can do so in the settings of the HikaShop cart notification plugin via the joomla plugins manager.

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

  • Posts: 121
  • Thank you received: 2
3 years 10 months ago #328413

The redirection only works when the product is added to the cart from the HikaShop full article view page. However, if it's added from a Joomla content page with the "add to cart" selector embedded, neither notification nor redirection occurs.How can that be fixed?

Last edit: 3 years 10 months ago by andrewwinkler.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #328414

Hi,

It works fine on our end when adding add to cart buttons to Joomla articles using the content tags described on this page:
www.hikashop.com/support/documentation/1...-product-insert.html
So if it doesn't on your website, we would need a link to such a page to be able to check on the situation.

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

  • Posts: 121
  • Thank you received: 2
3 years 10 months ago #328444

The Hikashop Product TAG plulgins are enabled on the site. On the page with the three product variants for different subscription periods on infinitymind.consulting/component/hikash...t/15-standard-server the redirection popup is working beautifully.


However, for the other product pages such as
infinitymind.consulting/products/site-development
or on
infinitymind.consulting/products/extensions
no added-to-cart message nor redirection occurs, even though the items are added to the cart.
This problem only occurs, if I add the items from the Joomla page. If I add them from the category product list page, popup and redirection take place after adding the product to the cart.

Attachments:
Last edit: 3 years 10 months ago by andrewwinkler.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #328452

Hi,

It seems that the problem is linked to the way the content tag plugin replaces the add to cart tags (it must add dynamically javascript to the page to handle the popup and notification), and the optimization extension you have set up on your website which process the CSS, HTML and javascript to compress it, cache it, etc.
So I would first recommend trying deactivatoing completely that optimization extension to see if it then works fine. If so, that will confirm my theory on the issue. Then, it's a matter of configuring that extension to have as much as optimization possible without preventing the content tag plugin from properly adding the javascript to the page.

The following user(s) said Thank You: andrewwinkler

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

  • Posts: 121
  • Thank you received: 2
3 years 10 months ago #328469

Good suggestion. I disabled the JCH Optimize plugin. Now the site development products redirect works on

infinitymind.consulting/products/site-development

in addition to the managed hosting products page on

infinitymind.consulting/products/managed-hosting

which was already working before, as far as adding items from the joomla page.

However, the add-to-cart message/redirect still doesn't work for the extension products page on

infinitymind.consulting/products/extensions

The technology products page, at this stage, is no problem, because no products have been added in that category as yet.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #328482

Hi,

Try add the HikaShop cart module to these pages in a position of your template (you can hide it in CSS if necessary).
It's probably an issue with Hikashop not being loaded on these pages, leading to the cart notification plugin not adding its javascript to handle the notification.

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

  • Posts: 121
  • Thank you received: 2
3 years 10 months ago #328500

It turns out the reason was that - even though I had the HikaShop Product TAG translation plugin enabled, the setting "Load Hikashop on all pages" was not enabled. After doing so, the redirection is working fine on all pages, even with JCH Optimize enabled.

Last edit: 3 years 10 months ago by andrewwinkler.
The following user(s) said Thank You: nicolas

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

Time to create page: 0.058 seconds
Powered by Kunena Forum