findProductID() {
    //  object data for the cart
    const data = {
      lineItems: [],
      locale: 'en',
    };

    // loop through every item in the page and add them to the lineItems array.
    $('.productGrid li').each(function () {
      const item = $(this).find('.quickview');
      const itemId = parseInt($(item[0]).attr('data-product-id'));

      data.lineItems.push({
        quantity: 1,
        productId: itemId,
        optionSelections: [],
      });
    });

    return data;
  }
// get the product id of the products in the categories.
get the product id of the products in the categories.
get the product id of the products in the categories .
findProductID() {
    const data = {
      lineItems: [],
      locale: 'en',
    };
    $('.productGrid li').each(function () {
      const item = $(this).find('.quickview');
      const itemId = parseInt($(item[0]).attr('data-product-id'));
      data.lineItems.push({
        quantity: 1,
        productId: itemId,
        optionSelections: [],
      });
    });
    return data;
  }
findProductID ( ) { const data = { lineItems : [ ] , locale : 'en' , } ; $ ( '.productGrid li' ) . each ( function ( ) { const item = $ ( this ) . find ( '.quickview' ) ; const itemId = parseInt ( $ ( item [ 0 ] ) . attr ( 'data-product-id' ) ) ; data . lineItems . push ( { quantity : 1 , productId : itemId , optionSelections : [ ] , } ) ; } ) ; return data ; }
get the product id of the products in the categories.
get the product id of the products in the categories .
//  object data for the cart // loop through every item in the page and add them to the lineItems array.