What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello all, I am trying to remove the 'DE' and 'AT' store in the spryker b2b demo shop and replace
Hello all,
I am trying to remove the 'DE' and 'AT' store in the spryker b2b demo shop and replace it with an 'INT' store. So far, I have tried changing the deploy.dev.yml file to
version: '0.1' namespace: xyz_b2b_dev tag: dev environment: docker.dev image: environment: { SPRYKER_PRODUCT_CONFIGURATOR_HOST: date-time-configurator-example.spryker.local, SPRYKER_PRODUCT_CONFIGURATOR_PORT: 80, SPRYKER_AOP_INFRASTRUCTURE: '{ "SPRYKER_MESSAGE_BROKER_HTTP_SENDER_CONFIG": {}, "SPRYKER_MESSAGE_BROKER_SQS_RECEIVER_CONFIG": {} }', SPRYKER_AOP_APPLICATION: '{ "APP_DOMAINS": [], "STORE_NAME_REFERENCE_MAP": {}, "APP_CATALOG_SCRIPT_URL": "" }', SPRYKER_AOP_AUTHENTICATION: '{ "AUTH0_CUSTOM_DOMAIN": "", "AUTH0_CLIENT_ID": "", "AUTH0_CLIENT_SECRET": "" }', SPRYKER_DEFAULT_STORE: INT, SPRYKER_ACTIVE_STORES: INT } imports: de: { template: _base.deploy.template.yml, parameters: { env: local, store: INT, region: INT, namespace_kvs: 0, namespace_zed: 1, namespace_yves: 2, domain: xyz.local } }
And added a store_config_INT.php file but it doesn't seem to be working. Can someone please advice? As I can not find anything useful in the Spryker's documentation.
Comments
-
Basics fist: Have you added the store to the
stores.php
? Removing DE store will also need a adjustment indefault_store.php
You can check tablespy_store
as well.0 -
@U01F7P3D9NH I assumed stores.php is reading SPRYKER_ACTIVE_STORES constant and then reads the configuration from /stores/store_config_INT.php which I already created.
0 -
Ah, I see. There is some new approach in the stores and config files which we donΒ΄t have in our project. But still I see the definition of $stores[] which should define your storefront, Would you mind sharing the stores.php or explain how you removed the other stores? Without adjustments it should be kinda search for 'DE' and replace it with 'INT' thing
0 -
@U01F7P3D9NH yes of course. This is stores.php
<?php declare(strict_types = 1); use Aep\Shared\ActiveStore\ActiveStoreConstants; use Spryker\Shared\Kernel\Store; // ---------------------------------------------------------------------------- // ------------------------------ STORE-TEMPLATE ------------------------------ // ---------------------------------------------------------------------------- $template = require __DIR__ . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_PREFIX . 'default' . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_EXTENSION; $environmentActiveStores = (string)getenv('SPRYKER_ACTIVE_STORES'); $stores = []; if (!empty($environmentActiveStores)) { $activeStores = array_map('trim', explode(',', $environmentActiveStores)); foreach ($activeStores as $store) { $stores[$store] = $template; $fileName = __DIR__ . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_PREFIX . $store . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_EXTENSION; if (file_exists($fileName)) { $stores[$store] = include $fileName; } } } if (empty($stores) && !empty(Store::getDefaultStore())) { $fileName = __DIR__ . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_PREFIX . Store::getDefaultStore() . ActiveStoreConstants::ACTIVE_STORE_CONFIG_FILE_EXTENSION; $stores[Store::getDefaultStore()] = file_exists($fileName) ? include $fileName : $template; } return $stores;
0 -
Just to make sure variables are set correct, I would add the store like at the end of https://github.com/spryker-shop/b2b-demo-shop/blob/master/config/Shared/stores.php
0 -
Also double check the
config/install/
deploy files0 -
@U01F7P3D9NH Right. But basically I want to remove all other stores and set INT as default.
0 -
Yeah, I got that. But still you need a definition of the INT one. In the demo shop you have three stores and all have a definition of context. So you remove f.e. AT and US and rename the stuff of the DE is what you need, not getting rid of everything
0 -
@U01F7P3D9NH Thanks. Do I have to reset docker to make it work?
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 65 Spryker News
- 879 Developer Corner
- 743 Spryker Development
- 84 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random