Multi Vendor Setups Only

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!
rhand
Posts: 23
Joined: 12 Apr 2024, 03:06

Multi Vendor Setups Only

Post by rhand » 30 May 2024, 06:54

I read at https://aimeos.org/docs/2024.x/laravel/ ... e-new-site that

Code: Select all

php artisan aimeos:setup <site code> [<template site>]
can be used to create a multi vendor site. If we do not want a general site for the whole site does that mean we should not run

Code: Select all

php artisan aimeos:setup
? Or is still needed for general setup?

Two, what kind of site code should be added? And what template site data? Assume it is not

Code: Select all

php artisan aimeos:setup domain.com my-template 
or is it?

When I read
The value for <site code> can be either a new site code for creating a new site or an existing site code for updating a site. The <template site> code is optional and tells the setup command which site template to use as reference when creating a new site (currently "default", "unittest" and "unitperf" are available as templates). If no value for <template site> is given, "default" is used.
I think we can use

Code: Select all

php artisan aimeos:setup <site code> default
but not sure what to add for site code. What to add? When I check

Code: Select all

vendor/aimeos/aimeos-laravel/src/Command/SetupCommand.php
I see

Code: Select all

if( ( $site = $this->argument( 'site' ) ) === null ) {
	$site = config( 'shop.mshop.locale.site', 'default' );
}
but not sure where that view or part `shop.mshop.locale.site` goes to. And that is for when no site is set so only for core shop or shop without vendors.. But in config/shop.php I do see

Code: Select all

'mshop' => [
        'locale' => [
          // 'site' => '<custom site code>', // used instead of "default"
        ],
Three , if I just want to add database data for a multi vendor user so he can add products and load data using JSOn on our own editor grid, how would I go about that? Can I run a command to just do database data setup and then use some JSON call?

rhand
Posts: 23
Joined: 12 Apr 2024, 03:06

Re: Multi Vendor Setups Only

Post by rhand » 30 May 2024, 10:00

Did a test

Code: Select all

php artisan aimeos:setup domein.nl default --v=vv
Initializing or updating the Aimeos database tables for site "domein.nl"
Migrating: vendor/aimeos/aimeos-core/setup/TypesMigrateColumns.php
Migrate type columns
  Add new type columns
    Checking table "mshop_attribute": 
    Checking table "mshop_attribute_list": 
    Checking table "mshop_attribute_property": 
    Checking table "mshop_catalog_list": 
    Checking table "mshop_customer_list": 
    Checking table "mshop_customer_property": 
    Checking table "mshop_media": 
    Checking table "mshop_media_list": 
    Checking table "mshop_media_property": 
    Checking table "mshop_plugin": 
    Checking table "mshop_price": 
    Checking table "mshop_price_list": 
    Checking table "mshop_product": 
    Checking table "mshop_product_list": 
    Checking table "mshop_product_property": 
    Checking table "mshop_service": 
    Checking table "mshop_service_list": 
    Checking table "mshop_stock": 
    Checking table "mshop_supplier_list": 
    Checking table "mshop_tag": 
    Checking table "mshop_text": 
    Checking table "mshop_text_list": 
  Drop old unique indexes
    Checking index "unq_msattr_sid_dom_cod_tid": 
    Checking index "unq_msattli_sid_dm_rid_tid_pid": 
    Checking index "unq_msattpr_sid_tid_lid_value": 
    Checking index "unq_mscatli_sid_dm_rid_tid_pid": 
    Checking index "unq_mscusli_sid_dm_rid_tid_pid": 
    Checking index "unq_mcuspr_sid_tid_lid_value": 
    Checking index "unq_msmedli_sid_dm_rid_tid_pid": 
    Checking index "unq_msmedpr_sid_tid_lid_value": 
    Checking index "unq_msplu_sid_tid_prov": 
    Checking index "unq_msprili_sid_dm_rid_tid_pid": 
    Checking index "unq_msproli_sid_dm_rid_tid_pid": 
    Checking index "unq_mspropr_sid_tid_lid_value": 
    Checking index "unq_msserli_sid_dm_rid_tid_pid": 
    Checking index "unq_mssto_sid_pcode_tid": 
    Checking index "unq_mssupli_sid_dm_rid_tid_pid": 
    Checking index "unq_mstag_sid_dom_tid_lid_lab": 
    Checking index "unq_mstexli_sid_dm_rid_tid_pid": 
  Migrate typeid to type
    Checking table "mshop_attribute": 
    Checking table "mshop_attribute_list": 
    Checking table "mshop_attribute_property": 
    Checking table "mshop_catalog_list": 
    Checking table "mshop_customer_list": 
    ...
    
Not sure yet where that new vendor site was added or will be loaded from. But command seemed to have done some work. And that on top of `php artisan aimeos:setup` I ran earlier.

How would I load JSON data from that shop into a Vue component or how do I add products from what url to this shop now?

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

Re: Multi Vendor Setups Only

Post by aimeos » 30 May 2024, 12:29

This updates the database structure for all sites:

Code: Select all

php artisan aimeos:setup
This creates (or updates) a new site and adds the required default data, e.g. the types:

Code: Select all

php artisan aimeos:setup domain.nl
This creates (or replaces) a site for unit testing:

Code: Select all

php artisan aimeos:setup test unittest
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rhand
Posts: 23
Joined: 12 Apr 2024, 03:06

Re: Multi Vendor Setups Only

Post by rhand » 31 May 2024, 00:11

I see. Thanks for explaining the commands . Did not know they were for setting up general Aimeos and updating database. And that that is the same for the separate site.

Post Reply