4

The sitecore commerce server adds a base product template (CommerceProduct /sitecore/templates/Commerce/Catalog/CommerceProduct) as inheritance template to the AdHoc generated products templates.

products templates inheritance

If all products should have the same layout, we could set the layout and all renderings in the BaseTemplate (CommerceProduct).

Or how is that thought, to define the layout for products?

And, how do you do this when different layouts are required each product template? Or each category template? Or in a multisite Solution?

2 Answers 2

2

yes - you should set it on the base template - overriding using the data-provided items in the catalog part of the content editor.

for at multi-site solution - if you need different layouts, you should do virtual catalogs in the Commerce Solution - so you actually have the product in different catalogs (giving you multi Sitecore items) to override

1
  • Where / how can the basetemplate be configured?
    – Christoph
    Sep 19, 2017 at 9:56
1

I don't recommend to modify BaseTemplate (CommerceProduct) in Sitecore (add new fields, change existing fields types and etc.). Because you will lose your changes after

The better way - all modifications you should do in Commerce Server Catalog and Inventory Schema Manager application. Then you need navigate to Property Definition and check OnSale property.

enter image description here

As you see, if you want to have a shared custom property for all products you need to create a new one and check Assign To All Products Types checkbox. After that you can sync your templates in Sitecore.

Regarding layout, will be better to use Wildcard Product Details custom page for each different layout (if you want). There you can set your specific layout and this solution will protect you from sync problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.