Line item edit blocks
The Line item edit block offers customers the ability to adjust the contents of their cart directly in checkout. When active, an Edit button displays beneath each line item, and when clicked, displays a pop-out box containing the features you've chosen to activate, such as a quantity selector or Remove button. Unlike other types of content block which can display on multiple sections of the checkout, this block displays only in the checkout order summary within the Items in cart section.
By default, this block displays in checkout to all customers, on all applicable products. Although this can be helpful in a variety of situations, you might want to limit certain options depending on the product. You can use display rules to accomplish such scenarios, and set up multiple line item blocks depending on the cart contents.
On this page
Supported options for line item edit blocks
You can activate multiple options for editing line items. The following options are currently supported for line item edit blocks:
- Line item content blocks: Display dynamic line-item-specific content, such as 'final sale' messaging.
- Variant selector: Displays a variant selector to allow customers switch product variants.
- Quantity: Displays a quantity selector to allow customers to increase or decrease their purchase quantity.
- Remove button: Displays a Remove button to allow customers to remove the line item from their checkout. This only displays when a cart contains 2 or more line items.
- Selling plan selector (subscriptions): Allows customers to change their subscription frequency, as well as opt-in or out of a subscription entirely. This only displays when a cart contains a product with a subscription available. This feature isn't compatible with Recharge.
You can activate multiple options in the same line item edit block when you want the same display rules to apply to all options.
Create a line item edit block
You can create and configure a line item edit block in the Checkout Blocks app. After you create a line item edit block, you must add it to the checkout.
Steps:
- From your Shopify admin, go to Sales channels > Checkout Blocks.
- Click Blocks, and then click Create block.
- Click Line item edit.
- In the Block name section, enter a name for the block. This isn't displayed to your customers.
- In the Display rules section, configure your block display rules:
- To display the block to all customers and on all line items, leave the Display rules section empty.
- To create a display rule, click ⊕ Add display rule, and then configure your rule. Add as many display rules as required.
- In the Content section, activate any number of the supported block options, such as a variant selector or a Remove button.
- Optional: In the Styles section, click Show expanded by default when you want to display options (such as variant or quantity selectors) in full by default during checkout.
- Optional: In the Publishing section, click the pencil icon to select the markets and checkout pages that you want the block to display in.
- Click Save.
Your block is saved as Draft by default. When you're ready to publish the block, in the Status section, select Active from the drop-down menu.
Add a line item edit block to checkout
You only need to add the line item edit block one time to the checkout in order for all applicable edit options and line item content blocks to display their content. If you add the line item edit block multiple times, then the block content is duplicated.
If you create multiple line item edit blocks, then the block with the highest priority displays in the order summary when the relevant display rules are met.
Steps:
- From your Shopify admin, go to Sales channels > Checkout Blocks.
- Click Blocks.
- Click the line item edit block that you want to add to checkout.
- Click More actions ⌄ > Add to checkout.
- Optional: In the Preview block id section, click the clipboard icon to copy the block's unique preview ID.
- Select your desired checkout configuration, and then click Open editor.
- In the checkout and accounts editor, add the line item edit block to your checkout:
- Navigate to the Checkout or Information page.
- Click ⊕ Add app block in the Order summary section.
- Click the Line item edit Checkout Blocks option.
- Optional: If you activated any of the Variant selector, Quantity selector, or Selling plan selector (subscriptions) options, then you can use the App block settings to adjust the Edit button style and label.
- Optional: If you activated the Remove button option, then you can use the App block settings to adjust the Remove button style, label, and tone.
- Optional: Use the Preview block id (For testing purposes) field and the block's preview ID to preview how the block displays in checkout.
- Click Save.