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

Usage no npm install needed!

<script type="module">
  import magenablePurchasePartnerUrl from 'https://cdn.skypack.dev/@magenable/purchase-partner-url';


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.


Prerequisite: In Magento 2 instance should be installed next module: https://packagist.org/packages/magenable/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');
  1. Re-build your PWA project


yarn upgrade @magenable/purchase-partner-url


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):


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

Storefront view: