Reputation: 141
I followed those steps:
https://wiki.hybris.com/pages/viewpage.action?pageId=294094418
Changing mystoreinitialdata/coredata
impexes
After those steps, I can see my content, product and classification
on catalog/catalogs
on backoffice.
But when I go to wcms/websites
, i see 5 items. apparelde, uk, electronics, powertools and my newly created mystore.
mystore does not have name , active=true and content catalogs
is empty.
I want to add my catalog to website by programmatically.
I think it is about coredata , not sampledata.
when I search
mystore site
it can be found only here
# Language
$lang=en
# Create CMS Site
UPDATE CMSSite;uid[unique=true];name[lang=$lang];locale[lang=$lang]
;mystore;"Mystore Site";en_GB
import/coredata/stores/mystore/site_en.impex
But powertools has two more powertools site
# CMS Navigation Nodes
UPDATE CMSNavigationNode;$contentCV[unique=true];uid[unique=true];title[lang=$lang]
;;AcceleratorNavNode;"Accelerator"
;;FollowUsNavNode;"Follow Us"
;;HybrisNavNode;"Hybris"
;;MyAccountNavNode;"My Account"
;;PowertoolsNavNode;"Powertools Site"
;;SiteRootNode;"SiteRoot"
##-- level 2. children of SiteRoot --##
INSERT_UPDATE CMSNavigationNode;uid[unique=true];$contentCV[unique=true];name;parent(uid, $contentCV);links(&componentRef);&nodeRef
;PowertoolsNavNode;;Powertools Site;SiteRootNode;;PowertoolsNavNode
which are in cms-content and cms-content en impexes.
Should I add them or another way ?
Because apparel does only have one too , same folder as mystore
# Language
$lang=en
# Create CMS Site
UPDATE CMSSite;uid[unique=true];name[lang=$lang];locale[lang=$lang]
;apparel-de;"Apparel Site DE";en_GB
Upvotes: 1
Views: 995
Reputation: 1168
You have to set the catalogs per impex files. The correct impex files for this is under:
\src\hybris\bin\custom\xx\xxinitialdata\resources\xxinitialdata\import\coredata\stores\xxSite\site.impex
An than with the following impex line you set the catalog to the site:
# CMS Site
INSERT_UPDATE CMSSite;uid[unique=true];theme(code);channel(code);stores(uid);contentCatalogs(id);defaultCatalog(id);defaultLanguage(isoCode);siteMapConfig(&siteMapConfigId);urlPatterns;active;previewURL;startingPage(uid,$contentCV);urlEncodingAttributes;defaultPromotionGroup(Identifier)[default=$promoGrp];salesOrg(code)[default=$siteUid];
;$siteUid;blue;B2C;$storeUid;$contentCatalog;$productCatalog;$defaultLanguage;$storeUidSiteMapConfig;$cmsSiteUrlPattern;true;$storefrontContextRoot/?site=$siteUid;homepage;storefront,language;
It is exactly this expession:
INSERT_UPDATE CMSSite;uid[unique=true];contentCatalogs(id);defaultCatalog(id)
;$siteUid;$contentCatalog;$productCatalog
Upvotes: 1