Is it possible to make each product in the basket to be individual order?

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!
shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Is it possible to make each product in the basket to be individual order?

Post by shainanand » 28 Oct 2023, 06:53

Hi Aimeos, need your expertise in this requirement. I would like to make each product in the basket to be placed as individual order instead of putting multiple products in each order. Is this possible right now? If not, what would be the best approach to achieve this?

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

Re: Is it possible to make each product in the basket to be individual order?

Post by aimeos » 31 Oct 2023, 10:53

That's difficult because the payment handling afterwards expects only one order. If payment gateways aren't used, you could extend the order manager to create several orders in its save() method instead of just one.

Why do you want to split up the order per product? Maybe there's a better way to achieve your goal if you can describe your requirements.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Re: Is it possible to make each product in the basket to be individual order?

Post by shainanand » 31 Oct 2023, 14:57

Our requirement is to have different shipping cost for each product and we want to track each product individually. So we are thinking of splitting the products in the baskets to multiple orders. Any other way to achieve this?

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

Re: Is it possible to make each product in the basket to be individual order?

Post by aimeos » 31 Oct 2023, 15:03

That's achievable much simpler. Write a (delivery) service decorator that calculates the shipping for each product and sets that as costs in the order product item. Add the tracking information as order product attributes.

See: https://aimeos.org/docs/latest/providers/service/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Re: Is it possible to make each product in the basket to be individual order?

Post by shainanand » 02 Nov 2023, 03:47

Thanks, that really help. On continuation to this, since we have multiple shipping service, how can I add one more delivery service into this object? Currently it has only one.
Image
Attachments
Image 6.png
Image 6.png (8.81 KiB) Viewed 3483 times

shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Re: Is it possible to make each product in the basket to be individual order?

Post by shainanand » 02 Nov 2023, 14:41

I have managed to create multiple delivery service array but when saving the basket delivery services, it is saving both th delivery service with same code and name. However before saving my delivery service had different code and name.
Image
Attachments
Image 9.png
Image 9.png (6.57 KiB) Viewed 3456 times

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

Re: Is it possible to make each product in the basket to be individual order?

Post by aimeos » 03 Nov 2023, 07:31

The service options with the different names must be created in the backend. If you just use one service item and set different values, they will be overwritten.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Re: Is it possible to make each product in the basket to be individual order?

Post by shainanand » 03 Nov 2023, 10:30

But I noticed that before the processPayment(), the delivery items are saved with different codes. But after that, the codes got overwritten. Could you please help to point our where exactly the overwriting takes place?

Post Reply