spartacus-storefront

Existing but unused API in SAP Commerce for Store Finder

喜夏-厌秋 提交于 2021-02-11 12:29:08
问题 There are two API’s for SAP Commerce Store which are present in the Swagger API description but are not currently being used by the store finder page in Spartacus: • “/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}”. • “/{baseSiteId}/stores/country/{countryIso}” What is the best approach in Spartacus to add a new call for the following API: “/{baseSiteId}/stores/country/{countryIso}/region/{regionIso}”. 回答1: The OCC API has many endpoints that aren't necessarily used in Spartacus

Is there additional configuration needed to make the breadcrumbs visible in a Spartacus site?

徘徊边缘 提交于 2021-01-29 17:22:01
问题 Is there additional configuration needed to make the breadcrumbs visible in a Spartacus-based site? There is a BreadcrumComponent instance inside the BottomHeaderSlot. If I load the page in the JSP-based site, a breadcrumb like "HOME / Warranty" is displayed for a /warranty page. But when I load the Spartacus-based site, it only shows "HOME". What am I missing? Do I need to edit the CMS controllers or map a breadcrumbBuilder to it? 回答1: I'm updating my answer as I misunderstood earlier, sorry

Extending product model in Spartacus

天大地大妈咪最大 提交于 2021-01-29 08:20:59
问题 I'm trying to extend the product model with a new attribute I created in the -items.xml, but I can't seem to get it in Spartacus front. I added a product.model.ts file with the following code: import { Product as CxProduct } from '@spartacus/core'; export interface Product extends CxProduct { myAttribute: string; } And I imported that file in the pipe where I use the product model, but it appears empty althoughs the product does have data in myAttribute field in backoffice. Is there something

How to provide style for slots inside the template in sap Spartacus

老子叫甜甜 提交于 2021-01-29 04:30:57
问题 I have a new template LandingPage3Template. layoutSlots: { LandingPage3Template: { pageFold: 'Section2B', slots: [ 'Section2A', 'Section2B', 'Section2C', 'Section1', 'Section3', 'Section4', 'Section5' ], } } I just wanted to give styles for the slots. Can someone help me to write a custom CSS style to align it properly? I am using the below-mentioned code but it is not working. %cx-page-layout { // my code here width: 10%; } 回答1: thanks for asking at our SO channel. The CMS page template name

Extend backend models (Data/DTO) and sync with Spartacus

妖精的绣舞 提交于 2021-01-28 11:44:07
问题 What is the approach if want to add a new attribute to the Product(Model/Data/DTO) in SAP Commerce Cloud and wanna to access it in Spartacus (using Spartacus ProductService)? How to introduce the attribute to the Product model in Spartacus and get it populated with the value from the backend? This question can be seen as a general question how to apply this requirement to all models and keeping the models in sync between backend and frontend. Thank you in advance. 回答1: In order to fetch

Can I see spartacus storefront in smartedit preview mode of local environment?

我的梦境 提交于 2020-12-13 04:55:32
问题 I built a local development environment with CX 2005 & spartacus for study purpose. Spartacus storefront works like a charm. Url is http://localhost:4200 But I can't see spartacus storefront in local smartedit's preview mode. (Url is https://localhost:9002/smartedit. Smartdit > Spartacus Electronics Site > Online > Home) So I realized the spartacus storefront's url in iframe src is start with https not http. Could I change this iframe src to http or Can I launch my spartacus server to https

Can I see spartacus storefront in smartedit preview mode of local environment?

谁说我不能喝 提交于 2020-12-13 04:55:13
问题 I built a local development environment with CX 2005 & spartacus for study purpose. Spartacus storefront works like a charm. Url is http://localhost:4200 But I can't see spartacus storefront in local smartedit's preview mode. (Url is https://localhost:9002/smartedit. Smartdit > Spartacus Electronics Site > Online > Home) So I realized the spartacus storefront's url in iframe src is start with https not http. Could I change this iframe src to http or Can I launch my spartacus server to https