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+)
Install with Web Setup Wizard (2.3- & Older)
Configure the AfterShip Extension

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.

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.
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


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



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

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


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

bin/magento setup:upgrade


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)



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



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

Configure the AfterShip Extension



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



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





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.

Log in to your Magento 2 store > System > Integrations > Add new integration
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.



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

Reference



General CLI installation
How To Install/Uninstall Magento 2 Extensions
How to Install Magento 2 Extensions Using the Web Setup Wizard
Install the Klaviyo Extension in Magento 2

Updated on: 31/10/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!