Configure the cart layout
Configure cart layout records to define functionality for widgets or screens in the shopping cart.
Avant de commencer
Role required: admin
Procédure
Cart layout considerations
When you enable cart layouts, service catalog properties are impacted. Consider the possible outcomes and alter the settings or properties to achieve the cart layout and functionality you require.
Some of these properties are impacted when you use cart layouts. For example, with the order status screen, the When to show prices and sub-totals on the Service Catalog Cart (glide.sc.price.display) property overrides cart layout settings for displaying prices.
| Property | Impact |
|---|---|
| Allow ESS users the option to cancel their requests from the checkout
screen. [glide.sc.checkout.cancel] |
Overridden when the Cancel Request check box in cart layout settings is selected. If this check box is selected, the Cancel button is displayed even if the property is set to No. |
| Enable cloning requests during
checkout. [glide.sc.allow.checkout.clone] |
Not used (deprecated) if cart layouts are enabled. Replaced by the
Clone Checkoutcheck box in cart layout settings. The Clone Checkout check box is cleared by default for new instances. For upgraded instances, the check box is set to the existing value of the glide.sc.allow.checkout.clone property. |
| List of roles (comma-separated) that can use the quantity selector in the
shopping cart [glide.sc.allow.quantity] |
Overrides any relevant cart layout settings. |
| Show the request item number for each line item on the checkout screen (default
false). [glide.sc.checkout.request.number] |
Not used (deprecated) if cart layouts are enabled. Replaced by the Request Item Number column check box in cart layout settings. |
| Show the 'Back to Catalog' button on the two-step checkout
screen. [glide.sc.checkout.twostep.back] |
Not used (deprecated) if cart layouts are enabled. Replaced by the Back to Catalog check box in cart layout settings. |
| When to show prices and subtotals on the Service Catalog
Cart. [glide.sc.price.display] |
Overrides any relevant cart layout settings. |
Configure widget and column macros
Configure macros that define functionality for elements within each widget or screen.
Avant de commencer
Role required: admin
Pourquoi et quand exécuter cette tâche
Some widgets or screens also have column macros that define the horizontal layout and configuration of shopping cart contents.
You can configure these macros to alter the display order of elements, or hide elements, within the widget or screen. You can also create new macros to implement any extra requirements.
Procédure
Create macros for cart layout
Create macros for cart layout records using Jelly scripts to define customized behavior and display within a widget or screen.
Avant de commencer
Role required: admin
Pourquoi et quand exécuter cette tâche
Macros that you create do not affect upgrades because customized widget functionality is isolated from general cart behavior.
Procédure
Exemple
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="ref" value="sc_cart" />
<j:set var="jvar_ref" value="${jvar_cart.getRequestedFor()}" />
<j:set var="jvar_ref_display" value="${jvar_cart.getRequestedForDisplayName()}" />
<tr>
<td colspan="3">
${gs.getMessage('Requested for')}:
</td>
</tr>
<tr>
<td colspan="3" style="padding: 4px;">
<g:catalog_requested_for />
</td>
</tr>
</j:jelly>
Configure cart layout for specific items
Set fields in the Catalog Item form to configure the cart layout for specific items.
Avant de commencer
Role required: admin
Pourquoi et quand exécuter cette tâche
Overrides any general cart layout settings. For example, you can hide the price of an item by setting the Omit price in cart field to true for that item.
Procédure
Override cart layouts for items
Service catalog enables you to use additional methods to configure cart behavior or layouts, which override cart layout record settings.
For example, your cart layout record settings can hide item prices, but you might decide to display the price of the Sales Laptop. In that case, you would set the relevant configuration values on that catalog item. Be aware of the impact of these additional methods, to ensure that your cart behaves in the way you want.
If you are migrating to cart layouts, you can have defined additional settings and properties that impact your cart layout settings.