Modify add to basket behavior

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
malik_kat
Posts: 8
Joined: 09 Jan 2024, 09:20

Modify add to basket behavior

Post by malik_kat » 06 Feb 2024, 14:52

Hello,

PHP Version 8.2.12
Laravel version: 10
Aimeos version: 2023.10
Environment: windows (XAMPP cross-platform web server).


How i can change a behavior to procedure add product to basket .
I want when user click on button "add to basket".
The product will be add to basket without show checkout popup

Gagik
Posts: 38
Joined: 05 Dec 2023, 06:58

Re: Modify add to basket behavior

Post by Gagik » 07 Feb 2024, 06:17

Hi

Default implementation:
https://github.com/aimeos/ai-controller ... d.php#L330

You should overwrite this class.

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

Re: Modify add to basket behavior

Post by aimeos » 07 Feb 2024, 07:35

malik_kat wrote: 06 Feb 2024, 14:52 How i can change a behavior to procedure add product to basket .
I want when user click on button "add to basket".
The product will be add to basket without show checkout popup
If you only want to avoid the popup and pass the customer directly to the basket, overwrite this JS method and simply return "true":
https://github.com/aimeos/ai-client-htm ... #L362-L378
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

malik_kat
Posts: 8
Joined: 09 Jan 2024, 09:20

Re: Modify add to basket behavior

Post by malik_kat » 07 Feb 2024, 10:14

I dont need pass the customer directly to the basket when click on button add to basket .
I need him to continue shopping and when he finished the shopping press on basket button to checkout and payment.

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

Re: Modify add to basket behavior

Post by aimeos » 08 Feb 2024, 10:22

Then just remove the createOverlay() and createContainer() from the mentioned onAddBasket() method
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

malik_kat
Posts: 8
Joined: 09 Jan 2024, 09:20

Re: Modify add to basket behavior

Post by malik_kat » 08 Feb 2024, 14:02

Thanks for this replies @aimeos

It worked.

Post Reply