Articles on: Apps

Getting Started With Magento 2.x (CE and EE)

Plans: All plans Platforms: Magento 2


Overview


AfterShip Returns integrates with both Magento 2 CE and Magento 2 EE. This guide covers all steps required to integrate AfterShip Returns with Magento 2 stores and sync your storeโ€™s order information and customer data to AfterShip Returns admin.


If installing the integration for the first time, please follow the installation instructions for your Magento 2 version.


What you'll learn



Install with Composer (2.4+)


Installation via Composer requires an IT administrator with SSH access to the server where Magento 2 is hosted. To install the AfterShip extension, youโ€™ll need to execute four commands.


  1. Log into your Magento 2 server and navigate to the root directory of your Magento app from your command line tool. This guide shows example outputs for Terminal, but these steps can be modified for any command line tool you choose.
  2. Run the following command to access the latest version of the Magento extension from Packagist. Packagist is a repository for PHP code libraries that allows you to easily install the latest version of the plugin.


composer require aftership/aftership-apps-magento2


  1. Enter your authentication key (created for your developer account). Your public key is your username, and your private key is your password. ( ** Get your authentication keys **



  1. Run the following command to enable the AfterShip extension you just downloaded:


bin/magento module:enable AfterShip_Tracking --clear-static-content


  1. As displayed in the sample output, you must enable additional modules now. Run the following command to enable them:


bin/magento setup:upgrade


  1. To ensure that the CSS and JS on your Magento 2 store continue to work properly, youโ€™ll need to run a static content deploy command.


php bin/magento setup:static-content:deploy -f


Install with Web Setup Wizard (2.3- & Older)


  1. From your Magento store admin page, click System, then click Web Setup Wizard
  2. In the Web Setup Wizard, click Extension Manager



  1. Sign in and sync to your Magento Marketplace account if you haven't already
  2. Locate the AfterShip extension under the name aftership/aftership-apps-magento2
  3. In the Actions column, click the Select dropdown and choose Install


Configure the AfterShip Extension


  1. After the installation, log in and navigate to the Magento 2 store admin page
  2. Click on System, then Integrations under Extensions



  1. Find the store you want to connect to in the Integrations list, click Active and on the pop-up page, select Authorize




  1. Log in on the pop-up window, then choose the ORG you want to link and click Connect. Wait a few seconds, and the pop-up will automatically close, indicating a successful connection.



How to connect, if you cannot install AfterShip plugin?


If you do not have access rights to the server, or installing plugins requires additional permission approvals, you can follow the steps below to connect your store without relying on developer assistance.


Please note that if your Magento system has multiple stores that need to be connected, you must create multiple integrations.


  1. Log in to your Magento 2 store > System > Integrations > Add new integration
  2. The callback URL will be https://accounts.aftership.com/oauth/returns/magento-2/callback?store_id=1


  • Please note that you need to modify the "store_id" parameter in the callback URL above with your Magento store ID. The store ID is a numeric value starting from 1.



  1. The Identity URL will be https://accounts.aftership.com/oauth/returns/magento-2/identity
  2. Set permissions to all, then click Save
  3. Back to the integration list, find the integration you created, then click Active


Reference



For any further questions or help, please contact our chat support team or reach out to us at support+returns@aftership.com.

Updated on: 15/04/2025