CyberStore Documentation
System Improvements

Add PAGE_CATEGORY, PAGE_ITEM, and PAGE_CAT_ITEMS variables to the DOM as global constants (#10517)

Example
Copy Code
// NOTE: Code example beautified and annotated for readability
// from page .../Ecommerce/product/a100/15-speed-mountain-bike-boys
<script type="text/javascript">
//<![CDATA[
const PAGE_CATEGORY = -1;        // no category in context for page
const PAGE_ITEM = 579;           // Item_ID = 579
const PAGE_CAT_ITEMS = {         // object of item membership of category
  directItems: true,
  directModels: false,
  directSKUs: false,
  directStockCodes: true,
  childItems: true,
  childModels: false,
  childSKUs: false,
  childStockCodes: true
};
const SITE_PATHS = {
    application: '/Ecommerce',
    theme: '/Ecommerce/site/Themes/',
    content: '/Ecommerce/site/Content/',
    itemImages: '/Ecommerce/site/images/',
    itemDetailImages: '/Ecommerce/site/images/item-detail',
    categoryImages: '/Ecommerce/site/images/PHOTO1',
    hotSpotDiagrams: '/Ecommerce/site/images/Diagrams',
    characteristicImages: '/Ecommerce/ecommerce/site/images/Characteristics/' };
//]]>
</script>