Cartridges
What is a Cartridge?
A cartridge is a directory structure that is used as a flexible deployment mechanism for customized functionality. A cartridge can contain many different types of files:
static files such as CSS, JavaScript, and images, as well as WSDL files.
There are also folders for Demandware specific files: pipelines, scripts, templates, and form definitions.
A cartridge is fully contained in one directory. Every cartridge has specific sub-
directories where certain file-types must be stored. For instance, all Demandware script files must be stored in a scripts folder.
The storefront.properties file is generated by Studio when a new cartridge is created. This file is required.
Cartridge Path
In order for a site to use a cartridge, the cartridge must be added to the cartridge path in Business Manager.
When a call is made to a file, the Demandware server will look for the file starting with the first cartridge listed in the cartridge path. For instance, if a call is made to an ISML file called product.isml and that file is located in two cartridges that are both in the cartridge path, the Demandware server will use the first one it finds.
Add Cartridge in Cartridge Path
1. Administration -> Sites -> Manage Sites -> {Select Site} -> Settings tab
2. Add Cartridge Path:
Cartridges can be added to the cartridge path by typing a colon (:) between cartridge names. All names here are case sensitive and must match the names of your cartridges in eclipse. There should be no spaces in-between each item.
e.g. training:storefront_richUI:storefront
Cartridge Types
There are three types of cartridges you can create in UX Studio:
1. Storefront cartridge
2. Demandware cartridge
3. Business Manager cartridge (本课不介绍)
Your business needs will determine what type of cartridge you will create in UX Studio. Every new customer will have at least one storefront cartridge.
Storefront Cartridge
A new storefront cartridge contains a copy of the default SiteGenesis cartridge available in the SiteGenesis Demo Site package. Most projects start with this SiteGenesis reference code.
Demandware Cartridges
If you need to build re-usable functionality that is specific to a site when there are multiple sites in a production instance, then you may need to create a new cartridge.
You may want to add a new cartridge when functionality is:
Generic: reusable code used in multiple sites
An integration to an external system
Specific to a localized site: css, images and resource files for a language-specific site.
1) Keep an original SiteGenesis cartridge in your project just for comparison purposes, but don't make it part of the cartridge path
2) Use another storefront cartridge for common code that you intend to
reuse in multiple sites: <client>_core
3) Create cartridges for site-specific functionality that might overwrite the core: app_<site>
4) Any integration code should go in a int_<site> cartridge
View WebDAV cartridge directory in Business Manager
1. Administration -> Site Development -> Development Setup
2. In the WebDAV Access section, click the link for Cartridges.
Create a new version on the server
1. Administration -> Site Development-> Code Deployment.
2. Click Add to create version2. Click Apply.
3. In Studio, open the Demandware-> Change Upload Staging Directory…
Creating a New Cartridge
When you need to segregate (分离) code between sites, you may want to create a new empty cartridge. Creating a new empty cartridge will enable you to add only the code you need for a site or specific sites in an organization.
Create a new empty cartridge
1. File -> New -> Demandware Cartridge.
Creating a Storefront Cartridge
When you create a new storefront cartridge in UX Studio, a copy of the
sitegenesis_storefront_richUI and sitegenesis_storefront_core cartridges will be downloaded to your workspace and renamed with the name you specify. As mentioned before, these reference cartridges have all of the code needed for a SiteGenesis storefront to work in the Demandware platform. As part of the architecture approach since the 12.6 deployment, Demandware will be separating the Site Genesis cartridge into two distinct cartridges based on the following functional guidelines:
1) Core Cartridge
This cartridge will embody (体现) the business layer and contain all of the “server” side components such as Pipelines and Demandware Scripts as well as a non-JavaScript version of the storefront. This cartridge will embody the simple presentation layer and contain ISML templates, Common CSS files, Forms and Resource files. There will be no use of JavaScript, AJAX, or any advanced UI elements inside of this cartridge. As a result the rendering output of Core is just a stream of HTML & CSS assets that represent the page styled to look as close as possible to Site Genesis wireframes today without the use of JavaScript. So at this level the site will be“usable”, and only partially visually esthetic. The goal of this cartridge is to provide a fundamental (基本) starting point for new site development under the circumstances (情况) when the client’s design differs significantly (明显不同) from Site Genesis wireframes. The benefit being that you can start with just the essentials (概要) and not have to “undo” or“separate” any pre-conceived (预想的) Site Genesis UI design.
2) Rich UI Cartridge
This cartridge will hold the overloaded any specific CSS and advanced UI elements required to turn the Core Cartridge into the advanced look and feel of the SiteGenesis storefront as we know it today. That being said, it is important to know that the Rich UI Cartridge does not contain ISML templates, but rather uses an initialization mechanism in order to effect changes to the rendering of Core templates in the client browser.
When you make changes to the new storefront cartridge, your changes will be uploaded to the Demandware server and can be viewed immediately as long as you:
1) Set the cartridge to be uploadedto your workspace server
2) Put the new cartridge in the cartridge path
l Have site caching disabled for the site
Create a New Storefront Cartridge
1.UX Studio: File -> New -> Demandware Storefront Cartridge
相关推荐
New concept: Savestate Cartridges! Store emulator state as Savestate Cartridge files to disk any time (press F8) Savestate Cartridges can be distributed and loaded as normal ROMs Savestate Cartridges ...
该存储库不再维护。 问题报告和拉取请求将不予处理。 WSO2专用PaaS墨盒 分支 建置状态 掌握 盒式磁带提供了向WSO2专用PaaS添加新的运行时,服务和中间件的方法。 它可以是使用以下方式创建的Docker映像或虚拟机...
MATLAB用拟合出的代码绘图墨盒 该软件包包含用于读取和绘制墨盒外壳图像的实用程序。 它对这些图像进行预处理,并实现一种算法来比较这些图像。 它为每个成对比较产生一个相似性得分,并计算偶然获得更高得分的可能...
https://openshift.redhat.com/app/console/application_type/custom?cartridges[]=php-5.4&cartridges[]=mongodb-2&initial_git_url=https://github.com/openshift-quickstart/silex-mongodb-par
要使用部署此应用程序的克隆: rhc app create flask python-2.7 --from-code=https://github.com/ryanj/flask-base.git或者或上: https://openshift.redhat.com/app/console/application_type/custom?cartridges[]...
https://openshift.redhat.com/app/console/application_type/custom?cartridges[]=nodejs-0.10&initial_git_url=https://github.com/ryanj/hapi-base.git 地方发展 安装依赖: npm install 启动本地服务器: ...
将rvw_dev_console添加到业务管理器店面Cartridges路径 安装完成后,您可以在/on/demandware.store/YOUR_SITE_ID/default/Console-Show上的沙盒上访问开发控制台(将YOUR_SITE_ID更改为您的站点ID,例如Sites-Site ...
每个文件应具有绝对路径,并且可以以掩码结尾,即/.../cartridges/app_core/cartridge/static/default/js/* 打开/关闭调试器-只需切换调试器的面板即可。 创建新盒带-打开一个对话框,要求用户输入盒带的名称和...
juandeskgames-pico-8::joystick:我制作的pico 8推车的存储库
tic2bar.js关于此命令行应用程序将TIC-80盒带上传到IPFS,并将URL编码为条形码或QR码(默认)以进行分发。 它还能够将其解码回来,并从IPFS下载盒带。 它将它们通过INFURA网关上传到IPFS 并将上传的哈希值存储在条形...
OpenC64WarpSpeed OpenC64WarpSpeed是适用于Commodore 64和128家用计算机的Open Hardware Fast Loader磁带。 概括 OpenC64WarpSpeed是WarpSpeed盒式磁带的克隆,后者是Alien Technology Group发布并由Cinemaware于...