how to add item to cart using ajax?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

how to add item to cart using ajax?

Post by parmonov98 » 12 Oct 2020, 12:20

how to add item to cart using ajax?

I enabled basket-add in config. it works but I need customers to be able add items to cart without going to basket after click add to cart btn.
How can I do that? Once, I read about cline-jsonapi. is that what I need? if yes, please point me again! :) :D
https://imgur.com/CLxmcuM

User avatar
aimeos
Administrator
Posts: 7885
Joined: 01 Jan 1970, 00:00

Re: how to add item to cart using ajax?

Post by aimeos » 13 Oct 2020, 06:47

You can use the JSON API but the easier solution is to use jQuery to display an overlay for the basket.
This is already implemented and works as long as you've not changed the CSS selectors:
https://github.com/aimeos/ai-client-htm ... 1279-L1290
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

Re: how to add item to cart using ajax?

Post by parmonov98 » 16 Oct 2020, 03:42

I'm not willing to use your css and other themes. I'm developing it with my own layouts/templates.

Post Reply