Magento

Magento

Create API credentials

To create API credentials in Magento Admin and give access to "gopersonal," follow these steps:

  1. Go to your Magento Admin panel and log in with your administrator credentials.

  2. Navigate to Integrations: Once logged in, navigate to the "System" menu and select "Extensions" > "Integrations."

  3. Add New Integration: Click on the "Add New Integration" button.

  4. Configure API Permissions: Go to the API tab on the same page.

    Set the resource access permissions that your integration requires. For full access, select All. Otherwise, select custom permissions based on your needs.

    At least select:

5- Save and Activate: Click Save to save your configuration.

After saving, a new section appears at the top of the page showing Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Click Activate and then allow the permissions in the popup to enable the integration. If successful, you will see a screen showing the API credentials.

Install gopersonal plugin

Download / Update

if magento project installation is for example at Sites/magento then navigate to the project folder / src/app/code and run the following command (make sure to have unzip installed)

Copy

#!/bin/bash

# Specify the directory
DIR="Gopersonal/Magento"

echo "Checking if directory exists: $DIR"
# Check if the directory exists
if [ -d "$DIR" ]; then
    echo "Directory exists. Deleting directory and its contents..."
    # Delete the directory and its contents
    rm -rf "$DIR"
    echo "Directory deleted."
else
    echo "Directory does not exist."
fi

echo "Creating directory: $DIR"
# Create the directory
mkdir -p "$DIR"
echo "Directory created."

echo "Navigating to directory: $DIR"
# Navigate to the directory
cd "$DIR"

echo "Downloading the latest zip file..."
# Download the file
curl -O https://public-assets.goshops.ai/magento2/modules/latest.zip
echo "Download complete."

echo "Unzipping the file..."
# Unzip the file
unzip -o latest.zip
echo "Unzip complete."

echo "Cleaning up the downloaded zip file..."
# Clean up the downloaded zip file
rm latest.zip
echo "Clean up complete."

In case of a manual installation, for example for SFTP server download the plugins directly from https://public-assets.goshops.ai/magento2/modules/releases.html

Restart

Normally refresh cache and restart magento.

Copy

bin/magento cache:clean &&
composer dump-autoload &&
bin/magento setup:upgrade &&
bin/magento setup:di:compile bin/magento setup:static-content:deploy

Install with Composer

You can install this module via Composer. Follow these steps:

  1. Ensure you have Composer installed and configured with your Magento 2 project.

  2. Run the following command in your Magento root directory to install the latest version from the main branch:

Copy

composer require gopersonal/magento-plugin:dev-main

If you prefer to install a specific version, you can specify the version number instead:

Copy

composer require gopersonal/magento-plugin:1.0.16

Replace 1.0.16 with the desired version number.

  1. Once the installation is complete, enable the module by running:

Copy

bin/magento module:enable Gopersonal_Magento
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
  1. Clear the cache:

Copy

bin/magento cache:clean

Upgrading

To upgrade the GoPersonal Magento Plugin to the latest version, follow these steps:

  1. From your Magento root directory, run the following command:

Copy

composer require gopersonal/magento-plugin:dev-main --update-with-dependencies

This command will update the module to the latest version from the main branch.

  1. After the composer update is complete, run the following Magento commands:

Copy

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:clean
  1. If you're upgrading from a significantly older version, make sure to check the changelog or release notes for any breaking changes or additional upgrade steps.

Note: If you prefer to upgrade to a specific version instead of the latest, replace dev-main with the desired version number in the composer command.

Configure

Add clientId in configuration. There is going to be 1 clientId per environment, ask the support team for the correct value.

Last updated