Articles on: Protection

Install the AfterShip protection widget on Magento-2 store

⚠️ Install Protection requires the merchant to modify Magento-2’s code on the server side.

Install Protection widget on your Magento-2 store would require 3 simple steps.

Step 1. Get Magento-2 store appKey in your store admin site.

1) Go to STORES → All Stores

2) Click the target store entry detail page

3) Find a number after website_id, and combine the store URL is the appKey we need.

appKey format: Store URL|[the number after website_id]

Take the demo store screenshot below as an example, the appKey should be|1

Step 2. Insert the script into Magento-2 checkout template

1) Replace ***appKey*** with the appKey we found in the last step in the code.

<script async type="text/javascript" src="***appKey***"></script>

2) Merchant locates the file */vendor/magento/module-checkout/view/frontend/templates/onepage.phtml on the server.

The path of the file could be different depending on the user installation of the store.

The content in the file should be the same as

3) Merchant copy & paste the code append into the file.

Step 3. Check if the Protection widget shows up correctly on the checkout page.

Updated on: 31/10/2023

Was this article helpful?

Share your feedback


Thank you!