@magenable/purchase-partner-url
v1.0.3
Published
An extension for Magento PWA Studio that allow replace Add To Cart button with partner links in any product
Downloads
11
Readme
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
- Add dependency to PWA Studio project
yarn add @magenable/purchase-partner-url
- 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);
- 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):
For more information about configuration see readme in the next module https://packagist.org/packages/magenable/module-purchase-partner-url.