Skip to main content

Is there any way to add or remove product manually using AJAX

8 years 7 months ago #290713 by manoj.infowind
I want to know way I can add an item to cart manually using AJAX, and get modules corresponding modules to be refreshed automatically using AJAX.

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

8 years 7 months ago #290716 by nicolas
Hi,

You want to use the window.hikashop.addToCart and window.hikashop.deleteFromCart functions that you can find in media/com_hikashop/js/hikashop.js
These functions automatically refresh the cart modules on the page so you don't have to worry about that.

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

8 years 7 months ago #290795 by manoj.infowind
Is there any way I can have "Add to Cart" button instead of "Choose option" in case of product option for "Gift Wrap", as it require one additional step for customer to add item to cart.
Is any I can have "Add to Cart" button instead of or with the "Choose option" to add specific item to cart with default value of option.

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

8 years 7 months ago #290796 by nicolas
Hi,

Not with just the options.
You would have to edit the view file displaying the add to cart button to add hidden input fields similar to the input fields for the options on the product page so that the javascript add to cart would be able to take it into account.

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

8 years 7 months ago - 8 years 7 months ago #290848 by manoj.infowind
Will it be not a great feature to give ability "Add to Cart" button along with the "Choose Option" button that make it easy to add item to cart with default option value.

Hope you like the idea.

Thanks
Last edit: 8 years 7 months ago by manoj.infowind.

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

8 years 7 months ago #290858 by nicolas
Wouldn't it be better in that case to have the options directly on the listing in that case ?

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

8 years 7 months ago #290923 by manoj.infowind
No because in that user have to do two selection like quantity and option. I feel user wont like that.

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

8 years 7 months ago #290933 by nicolas
Hi,

For your case, maybe, but I'm talking about any kind of shops you could make with HikaShop. When we add a feature, we need to think about the big picture.

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

8 years 7 months ago #291006 by manoj.infowind
BTW I have implemented it on my site.

Thanks for support.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum