0.1.0 • Published 2 years ago

@mcxbr/customers-also-viewed v0.1.0

Weekly downloads
-
License
Commercial
Repository
-
Last release
2 years ago

PWA customers-also-viewed

Magento backend options:

Installation

  1. Create an Empty PWA Studio Project by Scaffolding
  2. cd your_project/src
  3. mkdir @mcxbr
  4. copy module folder to @mcxbr
  5. run command from root directory
    • for development: yarn add link:src/@mcxbr/customers-also-viewed
    • for production: yarn add file:src/@mcxbr/customers-also-viewed

  6. Add call extend-intercept.js to local-intercept.js. Example:
const amCustomerAlsoViewedIntercept = require('@mcxbr/customers-also-viewed/targets/extend-intercept');

function localIntercept(targets) {
    amCustomerAlsoViewedIntercept(targets);
}

module.exports = localIntercept;
  1. Run the Watch command: yarn watch.

Related Product

Usage

Here's an example of basic usage:

import React from 'react';
import AmRelatedProducts from '@mcxbr/customers-also-viewed';

const MyComponent = (props) => {
  const { product } = props;

  return (
    <div>
         <AmRelatedProducts 
            sourceId={product.id}
            position={'product_content_bottom'}
        />
    </div>
  );
}

Props

Prop nameDescriptionDefault valueExample values
sourceIdProduct or Category ID31
positionBlock Positioncategory_content_bottompossible values: 'product_before_related', 'product_after_related', 'product_into_related', 'product_before_upsell','product_after_upsell', 'product_into_upsell', 'product_content_top', 'product_content_tab', 'product_before_tab', 'product_content_bottom', 'product_sidebar_top', 'product_sidebar_bottom', 'cart_before_crosssel', 'cart_after_crosssel', 'cart_into_crosssel', 'cart_content_top', 'cart_content_bottom', 'category_content_top', 'category_content_bottom', 'category_sidebar_top', 'category_sidebar_bottom','custom'

Bundle Packs

Usage

Here's an example of basic usage:

import React from 'react';
import { AmBundlePacks } from '@mcxbr/customers-also-viewed';

const MyComponent = (props) => {
  const { product } = props;

  return (
    <div>
         <AmBundlePacks sourceId={product.id} />
    </div>
  );
}

Props

Prop nameDescriptionDefault valueExample values
sourceIdProduct or Category ID31