Skip to content

An extension for Magento PWA Studio that allow replace Add To Cart button with partner links in any product

License

Notifications You must be signed in to change notification settings

magenable/purchase-from-partners-pwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purchase From Partner

Purchase From Partner is a Magento PWA Studio extension 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 exlusive to retail partners. The extension 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.

Installation

Prerequisite: In Magento 2 instance should be installed next module: https://packagist.org/packages/magenable/module-purchase-partner-url

  1. Add dependency to PWA Studio project
yarn add @magenable/purchase-partner-url
  1. Wrap the module in your local-intercept.js file
const { Targetables } = require('@magento/pwa-buildpack');
const targetables = Targetables.using(targets);
const purchasePartnerUrl = require('@magenable/purchase-partner-url/src/targets');
purchasePartnerUrl(targetables);
  1. Re-build your PWA project

Upgrade

yarn upgrade @magenable/purchase-partner-url

Configuration

You can specify partner links for any products, even for products that are not available currently for purchasing in venia-ui storefront (for example bundle product):

purchase-partner-url-

For more information about configuration see readme in the next module https://packagist.org/packages/magenable/module-purchase-partner-url.

Storefront view:

purchase-partner-url-example-1

purchase-partner-url-example-2

purchase-partner-url-example-3

About

An extension for Magento PWA Studio that allow replace Add To Cart button with partner links in any product

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published