How to setup a second site
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
How to setup a second site
Hello,
I read the (sparse) documentation about the sites on https://aimeos.org/docs/User_Manual/Adm ... with_sites , but this doesn't answer all questions in my mind:
* "The easiest way is to run the setup/update script and passing a new site code." -> Is this the script call?
typo3cms aimeos:setup mysecondsite
* For creating the page tree, the site name needs to be set with tx_aimeos.mshop.locale.site . Correct?
* The second site will have the same layout like the first (=default) site. They will have different products. Also, they will have different functionality in the cart and detail pages. All of this is currently implemented in my own extension, which I then added ("include static") in the template. My idea now is to create another extension for the second site, put the changes in this one and then add both the initial and the second extension as include static in the second site. Is this the recommended way?
* In the admin area, I can provide options and values for the site. What are these options for?
Claudia
I read the (sparse) documentation about the sites on https://aimeos.org/docs/User_Manual/Adm ... with_sites , but this doesn't answer all questions in my mind:
* "The easiest way is to run the setup/update script and passing a new site code." -> Is this the script call?
typo3cms aimeos:setup mysecondsite
* For creating the page tree, the site name needs to be set with tx_aimeos.mshop.locale.site . Correct?
* The second site will have the same layout like the first (=default) site. They will have different products. Also, they will have different functionality in the cart and detail pages. All of this is currently implemented in my own extension, which I then added ("include static") in the template. My idea now is to create another extension for the second site, put the changes in this one and then add both the initial and the second extension as include static in the second site. Is this the recommended way?
* In the admin area, I can provide options and values for the site. What are these options for?
Claudia
Re: How to setup a second site
Yes
Yes, as PageTS to show the right categories and attribute type in the flexforms
Yes, should work well.cnoelker wrote: ↑07 Apr 2020, 12:09 * The second site will have the same layout like the first (=default) site. They will have different products. Also, they will have different functionality in the cart and detail pages. All of this is currently implemented in my own extension, which I then added ("include static") in the template. My idea now is to create another extension for the second site, put the changes in this one and then add both the initial and the second extension as include static in the second site. Is this the recommended way?
All or nothing. It depends what you are doing in your code with it
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to setup a second site
Thanks for confirming my assumptions. I will try this out.
Concerning my last question, about the config options for the site: Do you have some examples for typical use cases? And how can I access the entered values programmatically? I would like to get an idea how to make use of this.
Concerning my last question, about the config options for the site: Do you have some examples for typical use cases? And how can I access the entered values programmatically? I would like to get an idea how to make use of this.
Re: How to setup a second site
You could use them for settings specific for that site if you don't want to configure them globaly via TS or in the php config files. To access the key/values pairs, you should use:
2019.x:
2020.x
2019.x:
Code: Select all
$context->getLocale()->getSite()->getConfigValue( 'key', '<default>' );
Code: Select all
$context->getLocale()->getSiteItem()->getConfigValue( 'key', '<default>' );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to setup a second site
Thanks a lot!