Control inherited products with ai-sites extension

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!
nos3
Posts: 89
Joined: 01 Sep 2015, 13:26

Re: Control inherited products with ai-sites extension

Post by nos3 » 24 May 2021, 08:48

tncgroup wrote: 22 May 2021, 11:32 I want to to control in the administration interface if inherited categories or products are used in the sub-site or not, just like what in `ai-sites` extension is said.

I copied the exact configuration in the readme file of this extension, and I did NOT change `sitelevel` config, and I'm NOT using the `ai-elastic` extension.

For testing the extension, a new empty database is used.
By running the command

Code: Select all

php artisan aimeos:setup --option=setup/default/demo:1
This error happens:
run-demo.png

So I run the setup command without demo option.
Yes, because the demo products are not available for any site by default, so the demo setup can't succeed.

Please note that you need to set the "sitelevel" to at least "1" (inherit data) to make the extension work correctly!
tncgroup wrote: 22 May 2021, 11:32 But by saving products or catalogs this error is shown:
new-product.png
Hard to say from your screenshot. Can you make a video (screencast) of what you've done before?
tncgroup wrote: 22 May 2021, 11:32 And when I try to select in which sites this product can be available there's no option:
product-site.png
You can select "enabled" or nothing in each site. Thus, you have to go to the site first and then select "enabled" if you want to enable the product for that site.

nos3
Posts: 89
Joined: 01 Sep 2015, 13:26

Re: Control inherited products with ai-sites extension

Post by nos3 » 29 May 2021, 06:51

Provided you have configured "sitelevel=1" and have added the "Sites" decorators like described in the "README.md" of the extension, the feature works as like this:

- Create a product at the "default" site
- DON'T set the value in the "Sites" tab to "enabled" for the "default" site
- The product is now not shown anywhere because it's not enabled for any site
- Go to the sub-site of the vendor
- Open the product inherited from the "default" site
- Set the value to "enabled" in the "Sites" tab for that vendor
- The product is now only shown for that vendor

Post Reply