Product Add to Cart

This plugin changes how the footer of the Product Detail is shown. And also has the interaction to add the product to the cart.

This plugin works together with Product Detail plugin

Hook

ProductAddToCart

Props

export interface IProductAddToCart {
  product: IProduct;
  config: IConfig;
  cart: ICartDictionary;
  cartStats: ICartStats;
  tFunction: TFunction;
  addToCart: (
    product: IProduct,
    adder: number,
    backToCatalogue: boolean
  ) => void;
  canAddToCart: boolean;
  enablePrice?: boolean | null;
}

Visual Example

Simple CounterSimple Counter

Simple Counter

Counter with a calculated price and Add ButtonCounter with a calculated price and Add Button

Counter with a calculated price and Add Button

Example

ProductAddToCart: {
     container: SomePlugin,
},

Did this page help you?