SiteGenesis Promotions
The Salesforce B2C Commerce promotion feature is implemented in the SiteGenesis application.
Element | Files | Comments |
---|---|---|
Pipeline |
|
Processes the cart, which shows promotions along with any prices. The
Cart-Calculate subpipeline calls the cart/CalculateCart.ds script
before returning to the calling subpipeline. |
COShipping.xml
|
Processes customer shipping details. Uses checkout/shipping/singleshipping to check for shipping promotions. Calls checkout/shipping/shippingmethodsjson for the shipping method. | |
COShipping-RequiresMultiShipping.xml
|
Handles shipping orders to multiple locations with multiple shipping methods. Uses checkout/shipping/multishippingshipments to check for shipping promotions. | |
Product.xml
|
Processes the product details and shows them on the storefront. It uses
product/product.isml, which includes promotions in the generated
information.
|
|
Script |
|
Implements a typical shopping cart calculation algorithm. You can customize this code to meet your specific needs and requirements. This script does the following:
|
cart/CheckForNewBonusDiscountLineItem.ds
|
See SiteGenesis Choice of Bonus Product Implementation. | |
cart/GetBonusDiscountLineItem.ds
|
See SiteGenesis Choice of Bonus Product Implementation. | |
cart/ParseBonusProductsJSON.ds
|
See SiteGenesis Choice of Bonus Product Implementation. | |
cart/RemoveBonusDiscountLineItemProducts.ds
|
See SiteGenesis Choice of Bonus Product Implementation. | |
cart/ValidateCartForCheckout.ds
|
Implements a typical shopping cart checkout validation against specific conditions:
This script validates product availability for all products. |
|
Templates |
|
Shows the bonus product alert on the Billing page. |
checkout/cart/bonusdiscountlineitems.isml
|
Shows the select bonus product message. | |
checkout/cart/cart.isml
|
Embeds promotions on the cart page within the price column. | |
checkout/cart/minicart.isml
|
Shows the bonus product alert. | |
checkout/summary/summary.isml
|
Shows bonus items and coupons in the summary. | |
checkout/shipping/multishipping/multishippingshipments.isml
|
Visualizes the second step of the multi shipping checkout scenario. It renders a list of all shipments (created by distinct shipping addresses) and provides a shipping method selection per shipment. It shows all applicable shipping promotions. | |
checkout/shipping/singleshipping.isml
|
Visualizes the second step of the single shipping checkout scenario. It renders a list of all shipments (created by distinct shipping addresses) and provides a shipping method selection per shipment. | |
components/order/orderdetails.isml
|
Implements the isorderdetails custom tag. Renders the order details. If it's a bonus product, renders the word Bonus. | |
components/order/orderdetailsemail.isml
|
Implements the isorderdetailsemail custom tag. Renders the order details in the email. If it's a bonus product, renders the word Bonus. | |
product/components/bonusproduct.isml
|
Is the rendering template for a bonus product. | |
product/bonusproductgrid/bonusproductgrid.isml
|
Is the main template that shows all bonus products used in the bonus product window. | |
product/components/ subbonusproduct/subbonusproduct.isml
|
Renders any subproduct of a bundle or product set. Used in the product/components/bonusproduct.isml template. | |
product/bonusproductjson.isml
|
Renders a bonus discount line item in JSON format. Not used in any template. | |
Resource files |
|
|
product.properties
|
||
locale.properties
|
||
CSS |
style.css
|
Contains promotion-related style definitions (static/default/css) for bonus products lists and bonus line items. |
Related Links
See the SiteGenesis Wireframes and Functional Specifications for additional details.
See the B2C Commerce API documentation.