Articles on: Protection

Install AfterShip Protection Extension on Shopify

Plans: All Plans Platforms: Shopify


Overview


AfterShip Protection protects your business and your customers' shipments as they fly across the globe with world-class shipping insurance. To enable AfterShip Protection on your Shopify store, you need to install the AfterShip Protection extension on your store.


You can either connect with our support team to get the extension installed ( It requires collaborator access from your Shopify store) or do it yourself. This article will guide you to install the Protection extension yourself.


What you'll learn


In this article, you'll learn how to:



Create a test theme


  1. Go to your Shopify store’s Theme section > Click the three dots icon > Duplicate
  2. The duplicate theme will show as "Copy of ..." in Theme library.


Install extension in Shopify cart



There are two types of Cart:


  • Cart page
  • Cart drawer


Shopify cart page


  1. Go to your Shopify Store admin > Online Store > Themes
  2. Click Customize


  1. Go to the Cart page.


  1. Click the Add section in the left side panel
  2. Under Apps, select AfterShip Protection


  1. Add Aftership Protection app after the Shopify checkout button, and you can also set some custom styles in the right section.


  1. Click Save to complete the insertion of the widget.


Shopify cart drawer


If you are using the drawer cart, Shopify doesn’t support the add app extension to drawer yet, so you’ll need to add the following code to your store.


  1. Install AfterShip Tracking.
  2. Go to Online Store > Themes.
  3. Select the theme that you want to edit and select the menu of that theme.
  4. Click Edit code and search cart-drawer.liquid .


  1. Copy and paste the AfterShip Protection code to cart-drawer.liquid .


<aftership-protection> 
<script
defer
type="text/javascript"
src="https://widgets.automizely.com/protection/shopify/v2/index.min.js" >
</script>
</aftership-protection>


Cart extension configuration


AfterShip Protection allows merchants to setup the the UI of cart extension via the Shopify online theme editor or directly in the code.


Online theme editor (with app extension)


  • Find the AfterShip Protection app in the online theme editor, update the configuration based on your needs.
  • The description and secondary button are not customizable, it is based on your protection service setting.


Service Type

Description Content

Secondary Checkout Button

Shipping Protection + Return Care

Shipping protection + Free Return

Checkout without Shipping Protection + Free return

Shipping Protection

Shipping protection from loss and damage

Checkout without shipping protection

Return care

Free return on your order

Checkout without free retrun

Code with drawer cart type


Code with Example

Setup

Field Options

title-text="Checkout"

Title of extension and primary button

title-color="#4B0082"

Title color

title-font-size="14"

Title font size

desc-color="#8A2BE2"

Description color

desc-font-size="12"

Description font size

logo-display="true"

Display logo

“true”, “false”

badge-enabled="true"

Display AfterShip widget

“true”, “false”

block="true"

Width Adaptation

“true”, “false”

checkout-url="/checkout?discount=3"

Apply discount to checkout

checkout-button-enabled="true"

Display Checkout button

“true”, “false”

Example


<aftership-protection
title-text="Checkout"
title-color="#4B0082"
checkout-url="/checkout?discount=3"
>
<script
defer
type="text/javascript"
src="https://widgets.automizely.com/protection/shopify/v2/index.min.js"
></script>
</aftership-protection>


Install extension in Shopify checkout


If you are a Shopify Plus merchant, you can add the checkout extension to increase the opt-in rate.


  1. Go to your Store Admin > Online Store > Themes > Customize


  1. Choose the Checkout page, add the AfterShip Protection to Shipping block or any position accordingly.
  2. Click Save to complete the insertion of the extension. You can go to your store to check the extension.


Test and launch the test theme with AfterShip Protection extension


Once you're satisfied with the results of the test theme, launch the test theme on your store.
AfterShip Protection extension will now be available on your Shopify store.


Now, shoppers will be able to purchase AfterShip Protection to insure their orders, and they will be able to check the AfterShip Protection details on the tracking page for the orders with the Protection add-on and the order confirmation email sent by AfterShip Protection.


The protection fee will be calculated based on the price of each purchased product. And the protection policy status will be 'Inactive' until the order gets shipped.


Additional checks


  1. Hide AfterShip protection product from your store. Learn more
  2. Auto fulfillment AfterShip protection product. Learn more
  3. Ensure your store's coupons are not applied to the AfterShip Protection product—if they are, we will charge you the original premium price. You can configure your coupons to exclude the Protection product. Learn more


FAQs


Q1. How can I increase the opt-in rate for shipping protection?


To improve opt-in rates, it's recommended to add both the checkout and cart extensions to your storefront.


Q2. How can I move the protection badge to a different location in the cart?


To reposition the protection badge copy and paste the badge code into your cart-drawer.liquid file at the position where you'd like the badge to appear.
Use two different versions of the code depending on the function:


  • For the protection badge, set badge-enabled="true"
  • For the checkout button, set badge-enabled="false"


Updated on: 09/04/2025