Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create multiple cloud services #117

Open
geertsmichael opened this issue Apr 10, 2020 · 6 comments
Open

Unable to create multiple cloud services #117

geertsmichael opened this issue Apr 10, 2020 · 6 comments

Comments

@geertsmichael
Copy link

Expected Behaviour

My Magento & AEM set-up consists out of multiple locales and multiple store views.
I am under the impression that I need multiple cloud services to connect per locale to the correct store view.

Actual Behaviour

I can only create 1 single CIF cloud service per /conf/brand folder. All my locales share the same /conf/brand folder. I need to configure the store view on the cloud service and this cloud service is applied to all my locales. So I cannot use different store views anymore.

Steps to Reproduce

  1. Create a cloud service for the gb-en site, pointing to store view gb.
  2. Create a cloud service for the us-en site, pointing to the store view us.

Platform and Version

CIF connector 0.10.0
AEM 6.4.5

@cjelger
Copy link
Contributor

cjelger commented Apr 14, 2020

@dplaton Can you please check if this is documented? If not, we should add an example to explain how to setup multiple stores. Thank you.

@dkuntze
Copy link

dkuntze commented Apr 16, 2020

to me this looks like the
libs/commerce/gui/components/configuration/page/_cq_dialog/.content.xml
file changes the name of cq:magentoStore to 'magentoStore' (minus the cq:) which makes it impossible to have multiple stores since the java constant looks for cq:magentoStore - and if it cannot find it, it returns 'default'.

@okassa
Copy link

okassa commented Apr 23, 2020

We've found the same issue today that @dkuntze explained. Hopefully, we have also found a temporary workaround by using the GraphQL client. We have added to the default OSGI config (com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl ) for a the GraphQL client
a default HTTP header like Store:name_of_the_store,and it works fine. It make sense only for a single store, it's less flexible we will wait for the fix.

The master branch contains the fix as per [0] and [1], but for the tag cif-connector-reactor-0.10.0 there is a bug as per [2].

[0] https://github.com/adobe/commerce-cif-connector/blob/master/bundles/cif-connector-graphql/src/main/java/com/adobe/cq/commerce/graphql/resource/Constants.java
[1] https://github.com/adobe/commerce-cif-connector/blob/master/bundles/cif-virtual-catalog/src/main/java/com/adobe/cq/commerce/virtual/catalog/data/Constants.java
[2] https://github.com/adobe/commerce-cif-connector/blob/cif-connector-reactor-0.10.0/bundles/cif-connector-graphql/src/main/java/com/adobe/cq/commerce/graphql/resource/Constants.java

@dkuntze
Copy link

dkuntze commented Apr 23, 2020

@okassa the easiest fix, without changing code, is just to have both properties on the node. Open up CRXDE and add cq:magentoStore with the same value as the other.

@okassa
Copy link

okassa commented Apr 24, 2020

@dkuntze you're right, it's far much easier ;-) this fix is OK for local development i think. I'm not sure if going through CRXDE for each and very update in the cloud configuration is flexible enough. I don't like people to do manual updated on non local servers like qa,pre-prod,prod this a bad habit.
I'll rather go for a temporary SlingPostProcessor which will update magentoStore property whenever the cq:magentoStore property is changed on a configuration.

@cjelger
Copy link
Contributor

cjelger commented Apr 24, 2020

IIUC, the problem you have should be fixed by #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants