magenable/module-purchase-partner-url

A Magento 2 module that allow specify partner url for any product

1.5.4 2024-12-19 08:49 UTC

This package is auto-updated.

Last update: 2024-12-19 10:27:53 UTC


README

Purchase From Partner is a Magento 2 module that allows you to replace standard Add to Cart button with links to external websites where visitors may purchase the products. Think about Amazon affiliate store, cases when a brand has products available exclusively to retail partners. The module may send events to Google analytics when clicking on the links for tracking/reporting.
There may be one or more partner URL per product. The URLs are defined on product level, so some of your product may have normal Add to cart and some partner links.

The extension is compatible with Magento version 2.3.X and 2.4.X

PWA Studio

The extension for Magento PWA Studio can be found here: https://www.npmjs.com/package/@magenable/purchase-partner-url

Hyvä themes

The module for compatibility with the Hyvä theme can be found here: https://gitlab.hyva.io/hyva-themes/hyva-compat/magento2-magenable-purchase-partner-url

Breeze themes

This module is compatible with Swissup/breeze themes

Installation

Composer:

Run the following command in Magento 2 root folder

composer require magenable/module-purchase-partner-url
bin/magento setup:upgrade
bin/magento setup:static-content:deploy

Upgrade

Composer:

Run the following command in Magento 2 root folder

composer update magenable/module-purchase-partner-url
bin/magento setup:upgrade

User Guide

Configuration:

Go to Stores > Settings > Configuration > Magenable Extensions > Purchase Partner URL.

General Settings

Set Enabled to YES if you want the module to work.

Update Title of Links with the required text, if it needs.

Set Show All Links at Once to YES if you want all buttons to be displayed at once.

Set Open Link in New Tab to NO if you want link opens in current tab.

Google Analytics

Set Enabled to YES if you want sent events to Google Analytics after partner links clicked .

Update Event Category Google Analytic property with the your value, if you wish.

Update Event Action Google Analytic property with the your value, if you wish.

After changing any setting you need to flush cache: for it go to System -> Cache Management and click Flush Magento Cache.

purchase-partner-url-configuration

Adding Purchase Partner Url:

Open any product and add Purchase Partner Url items, fill the fields:

  • Link; (required)
  • Link Title; (if this field is not filled then the value from the Title of Links field from the module configuration is displayed)
  • Event Category (Google Analytics); (if this field is not filled then the value from the Event Category field from the module configuration is used)
  • Event Action (Google Analytics); (if this field is not filled then the value from the Event Action field from the module configuration is used)

Then save the product.

purchase-partner-url-product-fill

Storefront view:

  • If the only one link set for a product (or enabled setting Show All Links at Once), then after clicking on the button users go to a partner website.

purchase-partner-url-result-list purchase-partner-url-result-view

  • If there are multiple links defined for a product (and disabled setting Show All Links at Once), after clicking on the button, all partner links appears, after clicking one of them users go to a selected partner website.

purchase-partner-url-result-list-2 purchase-partner-url-result-view-2

  • Also, after clicking on a link the event is sent to Google Analytics (if this not disabled in configuration of module and Google Analytics module is enabled and configured).