on ‎2020 Sep 15 3:35 PM
Hello,
I am trying to make custom ycommercewebservices based extension
Asked question https://answers.sap.com/questions/13134081/extending-userscontroller-hybris-commerce.html and followed the proposed solution. However this is conflicting with cmsocc that uses commercewebservices
I need it to be able to load pages in spartacus. How can i do that?
Thanks in advance
Request clarification before answering.
Hi Noha,
if you haven't find a solution I can provide you a fix to solve your problem.
Basically what's suggested in the proposed solution is correct. Let's suppose you have your own OCC extension generated from the ycommercewebservices template and called zcommercewebservices.
Add the following extensions to your localextensions.xml:
<extension name="zcommercewebservices" />
<extension name="cmsoccaddon" />Add cmsoccaddon to your OCC extension:
ant addoninstall -Daddonnames="cmsoccaddon" -DaddonStorefront.ycommercewebservices="zcommercewebservices"Modify the file /zcommercewebservices/extensioninfo.xml:
<!-- <webmodule jspcompile="false" webroot="/zcommercewebservices" /> -->
<webmodule jspcompile="false" webroot="/occ" />Then compile (ant clean all) and restart hybris.
Provided that you have defined the occ endpoint in the Spartacus configuration file spartacus-configuration.module.ts:
...
providers: [provideConfig(layoutConfig), provideConfig(mediaConfig), ...defaultCmsContentProviders, provideConfig(<OccConfig>{
backend: {
occ: {
baseUrl: 'https://localhost:9002/',
}
},
}), provideConfig(<SiteContextConfig>{
context: {
currency: ['USD'],
language: ['en'],
baseSite: ['---your base site---'],
},
...This solution works in my project. We were able to use the our customized OCC services with Spartacus.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
We are facing the same issue. Did you find any solution?
Thanks,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.