duplicate config in stores.php?

victor.vanherpt
victor.vanherpt Spryker Solution Partner Posts: 10 🧑🏻‍🚀 - Cadet

I can't help but notice that in the demoshop stores.php, the contents is almost duplicated, having a if (getenv('SPRYKER_ACTIVE_STORES')) { statement at the beginning of the first block.
I don't seem to find any documented explanation to this behaviour. Can someone explain why is this?

Best Answer

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 60 🏛 - Council (mod)
    edited February 6 Answer ✓

    That file is to be deprecated as stores would be stored in the database. Just useful as a fallback if not in a Dynamic Multistore as for Dynamic MultiStore you´d have the DataImport for your stores and the Backoffice

Answers

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 60 🏛 - Council (mod)

    Hi,

    What do you mean by duplicated ?

    If there is that en variable, then the stores array is returned , otherwise there is the fallback configuration fo DE ,AT and US.

    If you search for the env variable inside the docker folder, you´re going to see that they´re set in there according to the regions´ settings in the deploy file

  • victor.vanherpt
    victor.vanherpt Spryker Solution Partner Posts: 10 🧑🏻‍🚀 - Cadet

    Hi @Hidran Arias ! Yes, my point being why do we need a fallback configuration at all?

    Within the docker sdk I saw that spryker_active_stores is just collecting al stores defined in the deployment file regions.

    I think having this fallback configuration just creates more confusion than needed, and I don't see related documentation (might be an old topic now anyways, as dynamic multistore will probably kill that part of the code).

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 60 🏛 - Council (mod)
    edited February 6 Answer ✓

    That file is to be deprecated as stores would be stored in the database. Just useful as a fallback if not in a Dynamic Multistore as for Dynamic MultiStore you´d have the DataImport for your stores and the Backoffice