Questions tagged [spartacus-storefront]
Use the spartacus-storefront tag for questions related to the SAP Commerce "Project Spartacus" storefront (see https://github.com/SAP/cloud-commerce-spartacus-storefront)
572
questions
0
votes
0
answers
4
views
country is getting appended twice in storefront URL(spartacus)
I'm having trouble with the basesite service. We currently have three websites: global, cn (China), and tw (Taiwan) (Taiwan)
To pick the region, we have a drop-down menu on the global site. Using ...
2
votes
1
answer
19
views
How to install Spartacus (and Angular) in a specific version
How can I create an Angular app in specific version (e.g. v12)? And then how to install Spartacus in specific version (e.g. v4)?
The docs of Spartacus describe only how to install the latest version ...
0
votes
0
answers
12
views
Configure smartedit component attribute editor
Hi I created a new type which extends from SimpleCMSComponent. This type has an attribute of type "variantProduct" which extends from the ootb Product.
If I edit this RandomComponent in ...
-2
votes
0
answers
19
views
Angular SSR Error: TypeError: this._removeListenerFns.pop(...) is not a function
I'm trying to enable Universal SSR on my Angular Project, but when I run in production mode, I have the following error:
TypeError: this._removeListenerFns.pop(...) is not a function
at ...
1
vote
1
answer
53
views
Adding Spartacus - Package has unmet peer dependencies
I just created a brand new project using the newest angular CLI 13.3.6 (node 16.15.0, yarn 1.22.15). I'm trying to add spartacus as described here: https://sap.github.io/spartacus-docs/building-the-...
0
votes
0
answers
20
views
how to add/enable product configurator button in Spartacus?
I don't know where to start , I have to add product configurator to customize the cart of Spartacus
I have tried following https://sap.github.io/spartacus-docs/cpq-configurable-products-integration/
...
0
votes
0
answers
20
views
Spartacus - Expired Token sent along with basesites API call breaks storefront load
We have an issue with Spartacus B2B 4.2 running with CSR and early login enabled that after the oauth token expires and user opens the website, a blank page is displayed.
Here goes the scenario to ...
0
votes
1
answer
43
views
How does Spartacus lazy-load CSS styles?
We are working with ASM, and we noticed that Spartacus lazy-loads ASM styles. We could not find any documentation on how this is done in Spartacus.
This would be useful for us, since we have our ...
0
votes
0
answers
12
views
Spartacus - Apple Pay and Google Pay using SAP Digital Payment Add-on and Stripe as PSP
I am using Spartacus 4.2, SAP Commerce 2105 and SAP Digital Payment Add-on. I already configured Stripe as PSP and I am able to register regular credit and debt cards in Spartacus. I completed the ...
0
votes
1
answer
23
views
Spartacus - Is applying LAZY LOADING OF CMS COMPONENTS is correct when having many custom CMS components?
My Storefront application have more than 50 custom CMS components.
SSR build creates separate JS files for each CMS component when applying LAZY LOADING OF CMS COMPONENTS approach.
Does it won't ...
0
votes
0
answers
30
views
Using a separate Spartacus CDC configuration for each SAP Commerce Cloud environment
According to the documentation, the Spartacus CDC plugin can be configured as followed:
provideConfig(<CdcConfig>{
[CDC_FEATURE]: [
{
baseSite: 'electronics-spa',
...
0
votes
0
answers
29
views
Spartacus - breadcrumbs on checkout
On MultiStepCheckoutSummaryPageTemplate (e.g. checkout page) breadcrumbs are disabled.
Even if we create a ContentPageMetaResolver and provide it in our custom checkout module, breadcrumbs are not ...
1
vote
1
answer
90
views
Page loading skeleton - Spartacus
We would like to implement the page loading skeleton in our Spartacus project, however we have faced some issues.
One every page load, the first two requests ('/basesites' and '/pages') are fired ...
0
votes
0
answers
13
views
SAP Spartacus: Fallback handler if no base site matches URL
We have configured multiple base sites in our setup, with different URL Patterns as matchers (think of "/<country/", where different countries are mapped to different base stores). This ...
0
votes
1
answer
36
views
How to override a specific Spartacus component
I am using the same component twice in Spartacus but with different data.
I am trying to override this component but if I override it with the type code they will both be identical while I need them ...
1
vote
1
answer
45
views
spartacus 4.2.1 B2B site in CX 2105.3 not able to add to cart
I'm new to Spartacus. When I try to add a product to the cart. I'm getting the following message. enter image description here
The error occurs in the anonymous user and Logged in User.
I have tried ...
1
vote
1
answer
58
views
How to save spartacus auth information in session storage instead of local storage?
I have a requirement that User must log into Spartacus app every time. After doing some research I got to know that if we use 'session storage' instead of using 'local storage' then this can be ...
1
vote
1
answer
47
views
PDP per product type
Is it possible to have few PDP's, so for example based on some Product attribute or Product type display different product details pages? If it's not possible OOTB, can somebody from spartacus team ...
0
votes
1
answer
46
views
How to create custom event for updating Query state?
I am trying to create a custom event for Query to reload and refresh the query state when the event happens.
I need a custom event similar to Spartacus' OrderPlacedEvent. My custom event actually ...
0
votes
1
answer
62
views
Orika data mapping error after installing cmsoccaddon on custom commercewebservices on Hybris 2005
We are using the custom commercewebservice extended from ycommercewebservice. We are not using the CMS API as of now but we have we need CMS APIs for spartacus.
I have install cmsoccaddon on our ...
0
votes
1
answer
90
views
I want to customize AddedToCartDialogComponent which has selector cx-added-to-cart-dialog
I want to customize AddedToCartDialogComponent and add some new elements to this dialog window.
I've read documentation of Spartacus.
I'm not really sure why it's doesn't work.. Because I don't see ...
0
votes
1
answer
75
views
SAP Spartacus - Sparta-Theme requesting Open Sans by default - not DSGVO compliant
since January 2022 there is a court decision in germany which states that using Google Fonts over their web api is no longer data protection compliant.
Spartacus requests the Open Sans font initially ...
1
vote
1
answer
58
views
Spartacus Breakpoint Configuration
I am trying to use a custom breakpoint config. Since there is no real documentation, I checked the code of the BreakpointService. As far as I understand, I should be able to do a custom breakpoint ...
0
votes
0
answers
38
views
Spartacus error 'BaseSiteActivationError' and can't load site
I'm new with Spartacus.
When I changed the name and image of existing product I've got an error 400:
message: "The application has encountered an error"
type: "BaseSiteActivationError&...
0
votes
1
answer
50
views
How to show login page by default after logout?
I want to show my login screen after logout.
Currently without LogoutModule after logout my page is redirecting to a blank screen and if I implement it as per the documentation, it redirects to ...
0
votes
1
answer
83
views
Do we really need to do a system initialization to get Spartacus to work?
We have a B2B store running on 2105 and now we want to integrate spartacus on it. So, do we really need to do system initialization during installing spartacus (adding spartacussampledata) on the ...
0
votes
0
answers
34
views
Spartacus - Component Mapping ONLY for B2B sites
HI i'm quite new to Spartacus and one of the many tasks i have is to customize the PDP page.
However, this customization should only happen on B2B stores only.
I tried mapping components and this ...
1
vote
2
answers
112
views
ConfigModule.withConfig or provideConfig in Spartacus
What is the difference between those two configs and which should be used when?
ConfigModule.withConfig({})
and
provideConfig({})
The documentation didn't provide the clear answer to this question.
...
0
votes
0
answers
97
views
SAP Hybris- Spartacus Initialization error using ant initialize
Getting the below error while performing the ant initialize command as part of setting up Spartacus storefront. The build is getting failed. PFB the details of the error.
Noted this issue on Hybris ...
0
votes
0
answers
28
views
How to use SAP commerce cloud static files on SPARTACUS storefront
Hello Is it possible for Spartacus to access any properties set in the cloud via static files with hcs_common?
I'm referring to how to use files a commerce cloud platform manager could load without ...
-1
votes
1
answer
40
views
Custom validations in spartacus
I am new to spartacus and am using the registration form with custom validations for name. I have added the validation in the .ts file as
firstName: ['', [Validators.required, Validators.pattern('^[a-...
1
vote
0
answers
39
views
How enable SSO(SAML or OpenID)for spartacus
Recently we are trying to enable SSO login for spartacus(on CCV2). Would you have any guidance on this.
0
votes
2
answers
110
views
spartacus deployement with ccv2 and backend.occ.baseUrl value
From what I've understood from the documentation, I need to set
<meta name="occ-backend-base-url" content="OCC_BACKEND_BASE_URL_VALUE">
in index.html
I've done just that, ...
0
votes
1
answer
48
views
OOTB Spartacus SASS build is failing
I'm having this issue below just today. would you know how to fix this? This is the SASS version installed in my Spartacus
sass "1.22.9"
sass-loader "7.2.0"
I'm using Angular8 and ...
0
votes
1
answer
76
views
Login to Spartacus 2 ways - SAML for Internal users and CDC for External users
I am trying to build an application where the requirement is to integrate Spartacus with CDC for all the external users and use SAML SSO for ASM users. CDC is working great out of the box with ...
0
votes
1
answer
76
views
CMS component configuration using provideConfig changes all similar components
You can provide a CMS component configuration using provideConfig. The following configuration shows how to configure a custom Angular component for the CMS BannerComponent:
provideConfig({
...
0
votes
0
answers
101
views
Issues with Smartedit in Development environment
I an using SAP hybris 2105 and having a few issues with Smartedit. Smartedit works fine on localsetup but it does not let me edit in Development or Production environment. I noticed that the below api ...
0
votes
0
answers
58
views
Add a Guard for PDP/PLP pages
I am trying to write an AuthGuard where any user trying to access any of the PDP/PLP pages is verified for credit issues before access. I believe I have to use the OOTB "ProductDetailsPageModule&...
0
votes
1
answer
83
views
Retrieve current B2B Unit for Customer in Spartacus
I want to show current B2B Unit name in the header.
What would be the correct way to retrieve B2B Unit for current customer?
What I found so far, there is a payload for /current? endpoint which is ...
0
votes
0
answers
47
views
Drag and drop functions not working in SmartEdit
Section1 (CMSFlexComponent)
In SmartEdit we are able to drag and drop Section1 in other sections. But we cannot change the content of the individual CMSParagraphComponents within the section itself.
...
1
vote
1
answer
150
views
Spartacus : Access Occ url on the NgModule inside Spartacus.configuration.module.ts file
I have experience on Jquery but Angular is very new to me and so is spartacus. I have been trying to configure our Spartacus to be used across multiple environments. The only solution that I could ...
0
votes
1
answer
61
views
how to have dynamic translation in spartacus?
I am using Spartacus 4.2 . I want to serve translations using my own custom endpoint. I am making the api call using APP_INITIALIZER token. My question is how will I set the result in provideConfig(). ...
1
vote
1
answer
44
views
AsmComponentsModule does not have exported components
Our team needs to add custom code to the ASM module in order to make SSO login possible in our project, and we realised the AsmComponentsModule doesn't export its declared components. This made it ...
0
votes
1
answer
58
views
How to add additional query parameters in cms page content api call
we want to append the cms page content api used out of box by spartacus for cart page
current: cms/pages?pageType=ContentPage&pageLabelOrId=/cart
required to add some additional query parameter
...
0
votes
1
answer
110
views
Spartacus add to cart
With Spartacus I have been able to change the PDP call to take an extra parameter which is the store code and its working fine. But when I add the product to the cart the api call fails because the ...
0
votes
0
answers
61
views
SAP- Spartacus - custom event reload trigger issue
I have created the custom event :
export class DistributorSetEvent extends CxEvent {
/**
* Event's type
*/
static readonly type = 'DistributorSetEvent';
distributorName!: string;
}
...
0
votes
1
answer
61
views
Skipping Specific Component Styles
I try to do something realy basic what is described in spartacus documentation https://sap.github.io/spartacus-docs/css-architecture/#skipping-specific-component-styles
At file src/styles.scss:
$...
1
vote
2
answers
93
views
Spartacus custom styling - order of SCSS imports
I am working on custom styles for my Spartacus application and struggling with the order of the CSS rendered. Despite the order of imports in my styles.scss, my custom CSS rules are rendered in the ...
0
votes
0
answers
69
views
Spartacus: TypeError: Cannot read properties of undefined (reading 'pipe') Karma test case
In Spartacus, I try to write a test case for the below scenario. But I couldn't find the solution for the error "TypeError: Cannot read properties of undefined (reading 'pipe')".Below are ...
0
votes
1
answer
82
views
Amazon Alexa link account redirect url not working
I want to integrate an Amazon Alexa skill with a b2c shop with spartacus frontend deployed in dev stage with localtunel and hybris backend deloyed with ngrok.
In order to do that I need the bellow ...