Skip to content

Instantly share code, notes, and snippets.

@maximgatilin
Last active February 12, 2017 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximgatilin/23a6f3b283ec32a9bfd323d2f0ca5062 to your computer and use it in GitHub Desktop.
Save maximgatilin/23a6f3b283ec32a9bfd323d2f0ca5062 to your computer and use it in GitHub Desktop.
Test impex to create and paste CMS Component #tags:hybris
# Создается CMS компонент(если просто добавить то он будет мертвым, просто висеть в базе)
INSERT_UPDATE AccessoriesCMSComponent;$contentCV[unique=true];uid[unique=true];name;title
;;AccessoriesComponent;Accessories;Аксессуары
# Созается position и какие типы может принимать
INSERT_UPDATE ContentSlotName;name[unique=true];template(uid,$contentCV)[unique=true][default='ProductDetailsPageTemplate'];validComponentTypes(code);compTypeGroup(code);
;AccessoriesContainer;;AccessoriesCMSComponent;wide;
# Создаем ContentSlot и привязываем к нему компонент и position (При многократном добавлении cmsComponents нужно указываеть через лист, чтобы не перезаписать)
INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;active;cmsComponents(uid,$contentCV);
;;AccessoriesContainerSlot;Accessories Container Slot;true;AccessoriesComponent;
# Привязываем contentSlot к шаблону/странице(При многократном добавлении cmsComponents нужно указываеть через лист, чтобы не перезаписать)
INSERT_UPDATE ContentSlotForTemplate;$contentCV[unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,$contentCV)[unique=true][default='ProductDetailsPageTemplate'];contentSlot(uid,$contentCV)[unique=true];allowOverwrite
;;AccessoriesContainer-ProductDetails;AccessoriesContainer;;AccessoriesContainerSlot;true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment