Best way to add a default supplier to new products

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!
yeh
Posts: 39
Joined: 27 Jun 2022, 13:26

Best way to add a default supplier to new products

Post by yeh » 19 Jul 2022, 13:41

Hi

My Aimeos setup has multiple sub-sites. I have also created a single supplier for each sub-site. What is the best way of automatically assigning each sub-site's supplier to all newly created products automatically?

e.g. Sub-site 1 is assigned the supplier Supplier-1. I would like all Sub-site 1's products to automatically be assigned Supplier-1 as the supplier.

Would it be better to use a decorator or to override the Aimeos\AdminJQAdm\Product\Supplier\Standard class?

Thanks

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

Re: Best way to add a default supplier to new products

Post by aimeos » 20 Jul 2022, 11:04

The easiest way might be a decorator adding the supplier to the view so it will be displayed by the supplier subpart template and automatically added if it's not removed manually in the supplier sub-panel.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yeh
Posts: 39
Joined: 27 Jun 2022, 13:26

Re: Best way to add a default supplier to new products

Post by yeh » 27 Jul 2022, 08:25

This is a good idea, thank you.

Post Reply