Alternative Hikashop Add to Cart notification Plugin ?

  • Posts: 17
  • Thank you received: 0
6 years 11 months ago #267098

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0.10

I read somewhere:

"Hi,

The option "After a product is added to the cart" only works with the legacy checkout. With the new checkout system, it's the "Hikashop Add to Cart notification Plugin" which is in charge of displaying notifications on the page and if the plugin isn't displaying any notification (because it's disabled or has a bug), then there is a fallback mechanism which redirects the customer to the checkout.
Could you provide a screenshot of the settings of the plugin and a link to the shop so that we can look at the issue ? "


Where is this fallback defined?

I created a custom 'Hikashop Add to Cart notification Plugin' to use UIkit notifications (override / update save) which all works fine, but because only the system now redirects me to checkout.

Any ideas else how to solve this?

Last edit: 6 years 11 months ago by mindgem.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
6 years 11 months ago #267108

Hello,

The fallback functions are defined (and added) but the HikaShop cart helper.
But the code which call these function is directly in the HikaShop main javascript file.

	var triggers = window.Oby.fireAjax(cart_type+'.updated', {id: cart_id, el: el, product_id: product_id, type: cart_type, resp: resp});
	if(triggers !== false && triggers.length > 0)
		return true;
	if(window.localPage && cart_type == 'cart' && window.localPage.cartRedirect && typeof(window.localPage.cartRedirect) == 'function')
		return window.localPage.cartRedirect(cart_id, product_id, resp);
	if(window.localPage && cart_type == 'wishlist' && window.localPage.wishlistRedirect && typeof(window.localPage.wishlistRedirect) == 'function')
		return window.localPage.wishlistRedirect(cart_id, product_id, resp);

The goal of the fallback is to do something if you do not have the "cart notify" plugin, or another plugin which react to the javascript events.
In order to not let the fallback be processed, your custom JS function must return "true" in order to indicate that you did something

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 17
  • Thank you received: 0
6 years 11 months ago #267144

Thanks. All working ok now here with UIKit. But good to have some background info as I'm still searching for stuff.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum