/***/ /* * As of this writing, there is no single Product query type in the M2.3 schema. * The recommended solution is to use filter criteria on a Products query. * However, the `id` argument is not supported. See * https://github.com/magento/graphql-ce/issues/86 * TODO: Replace with a single product query when possible. */ /*#__PURE__*/ // extracted by extract-css-chunks-webpack-plugin // Exit if there are no categories for this product. // If we couldn't find a leaf category then just use the first category // in the list for this product. // breadcrumbs can be `null`... // If this is a simple product it has no option codes. // Initialize optionCodes based on the options of the product. // If any of the possible variants matches the selection add that // variant's image to the media gallery. NOTE: This _can_, and does, // include variants such as size. If Magento is configured to display // an image for a size attribute, it will render that image. // For simple items, this will be an empty map. //"4.0001"; //localizationAddress?.latlong?.lat; //"114.8888" //localizationAddress?.latlong?.lng; // We must create a new Map here so that React knows that the value // of optionSelections has changed. // isOutOfStock || // isMissingOptions, // const thumbnails = useMemo(() => { // return Array.from({ length: 3 }) // .fill(null) // .map((value, index) => { // return ( //
// {'...'} //
// ); // }); // }, [classes]); /* import() */ // __mse_pageView('PDP'); // eslint-disable-next-line react-hooks/exhaustive-deps // useEffect(() => { // getCartDetails({ variables: { cartId } }); // }, [cartId, getCartDetails]); // const cartDataArr = cartDetails?.cart?.items?.map(data => { // if (data?.product?.sku == promotionValidationRules?.productSku) // return true; // else return false; // }); // // const CartSubtotal = // // cartDetails?.cart?.prices?.subtotal_excluding_tax?.value; // if (cartDataArr) { // cartDataArr?.includes(true) && setIsProductSkuSame(true); // } // // } // // if ( // // Number(promotionValidationRules?.finalPrice) + // // Number(CartSubtotal) < // // promotionValidationRules?.minOrderValue && // // location?.state && // // isSignedIn // // ) { // // setOpenErrorPopUp(true); // // setIsMinimumOrderValue({ // // minimumOrder: true, // // orderValue: // // promotionValidationRules?.minOrderValue > // // Number(promotionValidationRules?.finalPrice) // // ? promotionValidationRules?.minOrderValue - // // Number(promotionValidationRules?.finalPrice) // // : Number(promotionValidationRules?.finalPrice) - // // promotionValidationRules?.minOrderValue // // }); // }, [cartDetails?.cart?.items, promotionValidationRules?.productSku]); // __mse_onAddToCart(product, cartState); //parseFloat(promotionValidationRules)?.discountedPrice || 0; // Handle cases where a user token is invalid or expired. Preferably // this would be handled elsewhere with an error code and not a string. // Handle cases where a cart wasn't created properly. // Handle cases where user try to add item with selecting location. // An unknown error should still present a readable message. // disabled={isAddToCartDisabled || isCartButtonDisable} // return productOptsState && !isEmpty(productOptsState) // ? Object.keys(productOptsState) // //.filter(key => productOptsState[key].title !== 'addOns') // .filter( // key => // productOptsState[key]?.div_class?.toLowerCase() != // 'optionimage' && // 'optionupsize' // ) // .map(key => productOptsState[key]) // .reduce((acc, curr) => { // const details = curr?.details?.length ? curr.details : []; // return [...acc, ...details]; // }, []) // : null; //setProductOptsState(KFC_productOptsState) // const Options = React.lazy(() => // import('@magento/venia-ui/lib/components/ProductOptions') // ); // The product isn't in the cache and we don't have a response from GraphQL yet. // Note: if a product is out of stock _and_ the backend specifies not to // display OOS items, the items array will be empty. // Only return the product that we queried for. // Update the page indicator if the GraphQL query is in flight.