Overview
Enable 'Authority To Leave' in Shopify by displaying a checkbox on the shopping cart page and importing your customer's custom selection.
Modify the shopping cart page in Shopify
To add a checkbox to select 'Authority To Leave' in your Shopify shopping cart, you will first need to create a checkbox that your customers can select. To display a checkbox in your shopping cart, you need to edit the Theme Code of Shopify and copy the custom code from eShip.
To learn how to edit the Theme Code, refer to the section "Add a form field to your theme code" of this article or you can follow the following steps.
- On the Shopify admin page, go to Online Store > Themes.
- Locate the theme you want to edit, and then click Actions > Edit code.
- In the Sections area, click on cart-template.liquid. If your theme doesn't have a cart-template.liquid, then, in the Templates directory, click on cart.liquid.
- Search for the last subtotal reference in the file, and then locate the closing tag.
- On a new line right below the closing tag, paste the code below. You may need to experiment with putting the code in different places to ensure the field appears correctly on your cart page.
<p class="cart-attribute__field">
<input type="hidden" name="attributes[Authority To Leave]" value="No">
<input type="checkbox" name="attributes[Authority To Leave]" value="Yes"{% if cart.attributes["Authority To Leave"] == "Yes" %} checked{% endif %}>
<label>Authority To Leave</label>
</p>
This is what it should look like after the code has been pasted:
You can modify the style of the checkbox, however, the name must be Authority To Leave. Otherwise, the information won't be imported into eShip.
How this appears in Shopify
After adding the code, you should now see it on your shopping cart page and the order details page.
How this appears in eShip
After you have added the Authority To Leave checkbox to your Shopify shopping cart, your customer can select it during the checkout process.
When orders are imported from Shopify to eShip, the Authority to Leave option will be automatically selected under the order's options.
Was this article helpful?
Articles in this section
- BigCommerce: Product location
- CartonCloud: Troubleshooting
- Magento 1: Troubleshooting
- NetSuite: Troubleshooting
- Shopify: Add 'Authority to Leave' option
- Shopify: Deactivate email notifications
- Shopify: Manage pre-orders
- Shopify: Troubleshooting
- Unleashed: Updating orders
- WooCommerce: Set up delivery options