try {
ytShellConfig = {"cartTitle":"Your Cart","cartBackgroundColor":"#FFFFFF","exploreCtaColor":"#000000","enableCustomCart":true,"recommendedProductsList":{"productHandles":["armaf-club-de-nuit-intense-man-pure-parfum","rasasi-hawas-eau-de-parfum","afnan-9pm-edp","afnan-turathi-blue-eau-de-parfum","arabiyat-prestige-marwa-eau-de-parfum","afna-supremacy-not-only-intense-eau-de-parfum","riiffs-goodness-oud-purple-wave-eau-de-parfum","afnan-rare-reef-extrait-de-parfum","afnan-turathi-electric-eau-de-parfum","khadlaj-shiyaaka-snow-eau-de-parfum","afnan-9pm-night-out-extrait-de-parfum","riiffs-costa-de-amalfi-extrait-de-parfum","riiffs-freeze-extrait-de-parfum","riiffs-fareed-eau-de-parfum","afnan-lynked-freedom-eau-de-parfum"],"variantSelections":[{"handle":"armaf-club-de-nuit-intense-man-pure-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/41302339289166","gid:\/\/shopify\/ProductVariant\/42628447338574","gid:\/\/shopify\/ProductVariant\/42628447371342","gid:\/\/shopify\/ProductVariant\/42628447404110","gid:\/\/shopify\/ProductVariant\/42796397789262","gid:\/\/shopify\/ProductVariant\/43555288514638"]},{"handle":"rasasi-hawas-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/41760142229582","gid:\/\/shopify\/ProductVariant\/42628379967566","gid:\/\/shopify\/ProductVariant\/42628380000334","gid:\/\/shopify\/ProductVariant\/42628380033102","gid:\/\/shopify\/ProductVariant\/42806218915918","gid:\/\/shopify\/ProductVariant\/43555268100174"]},{"handle":"afnan-9pm-edp","variantIds":["gid:\/\/shopify\/ProductVariant\/41302249406542","gid:\/\/shopify\/ProductVariant\/42636588646478","gid:\/\/shopify\/ProductVariant\/42636588679246","gid:\/\/shopify\/ProductVariant\/42636588712014","gid:\/\/shopify\/ProductVariant\/42801812963406","gid:\/\/shopify\/ProductVariant\/43555292643406"]},{"handle":"afnan-turathi-blue-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/41302265266254","gid:\/\/shopify\/ProductVariant\/42636588974158","gid:\/\/shopify\/ProductVariant\/42636589006926","gid:\/\/shopify\/ProductVariant\/42636589039694","gid:\/\/shopify\/ProductVariant\/42815135318094","gid:\/\/shopify\/ProductVariant\/43555290382414"]},{"handle":"arabiyat-prestige-marwa-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/42924908609614","gid:\/\/shopify\/ProductVariant\/42924908642382","gid:\/\/shopify\/ProductVariant\/42924908675150","gid:\/\/shopify\/ProductVariant\/42924908707918","gid:\/\/shopify\/ProductVariant\/43016942485582","gid:\/\/shopify\/ProductVariant\/43555206725710"]},{"handle":"afna-supremacy-not-only-intense-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/41302259400782","gid:\/\/shopify\/ProductVariant\/42636588744782","gid:\/\/shopify\/ProductVariant\/42636588777550","gid:\/\/shopify\/ProductVariant\/42636588810318","gid:\/\/shopify\/ProductVariant\/42769439883342","gid:\/\/shopify\/ProductVariant\/43194769768526","gid:\/\/shopify\/ProductVariant\/43555292577870"]},{"handle":"riiffs-goodness-oud-purple-wave-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/42755515744334","gid:\/\/shopify\/ProductVariant\/42755515777102","gid:\/\/shopify\/ProductVariant\/42755515809870","gid:\/\/shopify\/ProductVariant\/42755515842638","gid:\/\/shopify\/ProductVariant\/42819663528014","gid:\/\/shopify\/ProductVariant\/43555216982094"]},{"handle":"afnan-rare-reef-extrait-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/42660203495502","gid:\/\/shopify\/ProductVariant\/42660203528270","gid:\/\/shopify\/ProductVariant\/42660203561038","gid:\/\/shopify\/ProductVariant\/42660203593806","gid:\/\/shopify\/ProductVariant\/42885913641038","gid:\/\/shopify\/ProductVariant\/43555228876878"]},{"handle":"afnan-turathi-electric-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/42660205658190","gid:\/\/shopify\/ProductVariant\/42660205690958","gid:\/\/shopify\/ProductVariant\/42660205723726","gid:\/\/shopify\/ProductVariant\/42660205756494","gid:\/\/shopify\/ProductVariant\/42832247849038","gid:\/\/shopify\/ProductVariant\/43555228680270"]},{"handle":"khadlaj-shiyaaka-snow-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43318551609422","gid:\/\/shopify\/ProductVariant\/43318551642190","gid:\/\/shopify\/ProductVariant\/43318551674958","gid:\/\/shopify\/ProductVariant\/43318551707726","gid:\/\/shopify\/ProductVariant\/43335773618254","gid:\/\/shopify\/ProductVariant\/43555190865998"]},{"handle":"afnan-9pm-night-out-extrait-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43484929196110","gid:\/\/shopify\/ProductVariant\/43484929228878","gid:\/\/shopify\/ProductVariant\/43484929261646","gid:\/\/shopify\/ProductVariant\/43484929294414","gid:\/\/shopify\/ProductVariant\/43484929327182","gid:\/\/shopify\/ProductVariant\/43555185197134"]},{"handle":"riiffs-costa-de-amalfi-extrait-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43428020158542","gid:\/\/shopify\/ProductVariant\/43428020191310","gid:\/\/shopify\/ProductVariant\/43428020224078","gid:\/\/shopify\/ProductVariant\/43428020256846","gid:\/\/shopify\/ProductVariant\/43433347776590","gid:\/\/shopify\/ProductVariant\/43555187490894"]},{"handle":"riiffs-freeze-extrait-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43451134607438","gid:\/\/shopify\/ProductVariant\/43451134640206","gid:\/\/shopify\/ProductVariant\/43451134672974","gid:\/\/shopify\/ProductVariant\/43451134705742","gid:\/\/shopify\/ProductVariant\/43514553106510","gid:\/\/shopify\/ProductVariant\/43555186671694"]},{"handle":"riiffs-fareed-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43451134804046","gid:\/\/shopify\/ProductVariant\/43451134836814","gid:\/\/shopify\/ProductVariant\/43451134869582","gid:\/\/shopify\/ProductVariant\/43451134902350","gid:\/\/shopify\/ProductVariant\/43514537836622","gid:\/\/shopify\/ProductVariant\/43555186606158"]},{"handle":"afnan-lynked-freedom-eau-de-parfum","variantIds":["gid:\/\/shopify\/ProductVariant\/43428018978894","gid:\/\/shopify\/ProductVariant\/43428019011662","gid:\/\/shopify\/ProductVariant\/43428019044430","gid:\/\/shopify\/ProductVariant\/43428019077198","gid:\/\/shopify\/ProductVariant\/43511555489870","gid:\/\/shopify\/ProductVariant\/43555188801614"]}]},"checkoutType":"shiprocket","showBackdrop":true,"discountInCheckoutButton":false,"ctaButtonBackgroundColor":"#a8713f","ctaButtonTextColor":"#FFFFFF","primaryTextColor":"#000000","productRecsCtaButtonText":"+ Add","productRecsTitleText":"✨ You May Also Like","emptyProductRecsTitleText":"","productRecsCardLayout":"vertical","productRecsCardListVariant":"scroll","secondaryTextColor":"#1A1A1A","showProductRecsOnDesktop":false,"showProductRecsOnMobile":false,"showEmptyCartRecommendations":true,"themeColor":"#414142","themeTextColor":"#ffffff","showGSTOption":false,"enableCustomCartOpenOnProductAdd":true,"showNoteOption":true,"showEditOptionOnProducts":false,"showVariantSelectionDropdownInProductRecs":false,"postalCodeList":[],"showStickyAddToCart":false,"cartGeoLocationValidatorData":{},"enableCustomCartOnCartPage":true,"cartTimerData":{"showTimer":true,"minutes":10,"customText":"Your products are reserved in cart for"},"cartComponentsCornerType":"rounded","cartComponentsCornerRadius":4,"giftWrapData":{},"stickyAddToCartProductBarData":{"showPrice":true,"productImage":{"id":"","path":""},"topRibbonText":"","buyNowCtaTitle":"Buy Now","desktopBarType":"hover","excludeProducts":["terre-dhermes-pure-parfum-12-5ml-miniature","assorted-perfume-samples"],"showProductName":true,"showBarOnDesktop":true,"showBuyNowButton":false,"showProductImage":true,"addToCartCtaTitle":"ADD TO CART","ctaButtonFontSize":18,"showAddToCartButton":true,"showVariantSelector":true,"fullyAppearsAtHeight":400,"showStickyProductBar":false,"productInfoVisibility":true,"startsAppearingAtHeight":100},"cartOffersCarousalData":{"enableCartOffersCarousel":true,"slidesCount":4,"pauseTimer":2,"backgroundColor":"#242424","primaryTextColor":"","secondaryTextColor":"","slides":[{"slideNumber":1,"slideType":"TextFieldOnly","textAlignment":"left","titleTextField":"1. PICK YOUR SCENT","descriptionTextField":"","imageUrl":"","campaignCode":"","criteriaCount":0,"criteria":[]},{"slideNumber":2,"slideType":"TextFieldOnly","textAlignment":"left","titleTextField":"2. PICK YOUR SIZE \u0026 CASE COLOR","descriptionTextField":"","imageUrl":"","campaignCode":"","criteriaCount":0,"criteria":[]},{"slideNumber":3,"slideType":"TextFieldOnly","textAlignment":"left","titleTextField":"3. SWITCH, REFILL OR UPGRADE","descriptionTextField":"","imageUrl":"","campaignCode":"","criteriaCount":0,"criteria":[]},{"slideNumber":4,"slideType":"TextFieldOnly","textAlignment":"left","titleTextField":"4. CURATE YOUR COLLECTION","descriptionTextField":"","imageUrl":"","campaignCode":"","criteriaCount":0,"criteria":[]}]},"freebieMilestoneData":{},"trustedBadgeData":{},"freebieClaimData":{"freebieSectionTitle":"Freebies","productClaimCtaButtonText":"Claim Freebie","type":"section","allowOverlayClose":false},"floatingCartData":{},"couponSelectionData":{},"checkoutSectionData":{},"drawerLayoutData":{},"cartGstSectionData":{},"bxgyDiscountsEnabled":false,"switchWidthVariant":true,"showMetafieldBasedRecs":false,"showCollectionBasedRecs":false,"showManualProductRecs":false,"recommendedCollectionsList":[],"collectionRecsLimits":0};
if (!ytShellConfig || typeof ytShellConfig !== 'object') {
ytShellConfig = null;
}
} catch(e) {}
const ytShellCustomCartEnabled = ytShellConfig &&
ytShellConfig.enableCustomCart &&
ytShellConfig.enableCustomCart !== 'false';
const ytShellCountryEligible = (window.Shopify && window.Shopify.country === 'IN') ||
(window.Shopify && window.Shopify.shop === 'jagat-pharma-global.myshopify.com');
const ytShellShouldInit = ytShellCustomCartEnabled && !ytCartShellIsCartPage && ytShellCountryEligible;
const ytShellShouldAutoOpen = ytShellShouldInit &&
ytShellConfig.enableCustomCartOpenOnProductAdd !== false &&
ytShellConfig.enableCustomCartOpenOnProductAdd !== 'false';
// Global shell state for widget synchronization
window.ytCartShellState = { isOpen: false, takenOver: false };
// Liquid-rendered cart data — available instantly, no AJAX needed
var ytShellInitialCart = {
items: [
],
total: 0,
count: 0,
currency: "₹"
};
if (ytShellShouldInit) {
(function() {
var shellBgColor = (ytShellConfig && ytShellConfig.cartBackgroundColor) || '#ffffff';
var shellTitle = (ytShellConfig && ytShellConfig.cartTitle) || 'My Cart';
var shellTextColor = (ytShellConfig && ytShellConfig.primaryTextColor) || '#000000';
var shellShowBackdrop = ytShellConfig.showBackdrop !== false && ytShellConfig.showBackdrop !== 'false';
var shellCheckoutType = (ytShellConfig && ytShellConfig.checkoutType) || 'shopify';
var shellThemeColor = (ytShellConfig && ytShellConfig.themeColor) || '#000000';
var shellThemeTextColor = (ytShellConfig && ytShellConfig.themeTextColor) || '#ffffff';
var shellCornerType = (ytShellConfig && ytShellConfig.cartComponentsCornerType) || '';
var shellCornerRadius = (ytShellConfig && ytShellConfig.cartComponentsCornerRadius) || 0;
var shellBgSubdued = (ytShellConfig && ytShellConfig.backgroundSubdued) || '#e1e1e1';
var switchWidthVariantEnabled = (ytShellConfig && ytShellConfig.switchWidthVariant) || false;
// Mutable cart state — starts from Liquid, updated on ATC via /cart.js
var shellCartData = {
items: ytShellInitialCart.items.slice(),
total: ytShellInitialCart.total,
count: ytShellInitialCart.count,
currency: ytShellInitialCart.currency
};
var cartSelectors = [
'a[href="/cart"]',
'button.tt-dropdown-toggle',
'a.area--cart',
'a.hcart',
'a.js-drawer-open-cart',
'a.cart-icon-bubble',
'a[title="Cart"]',
'.site-header__link.site-header__cart.js-mini-cart.cardraw',
'a#offcanvas-cart-icon',
'span.js-toggle-cart',
'div.single-icon.cart',
'a#cart-icon-bubble',
'a.cart-count',
'button.qsc2-basic.qsc2-stickybtn',
'svg.icon-bag',
'a.icon-bubble[aria-label=cart]',
'div.mini-cart-icon a.ltn__utilize-toggle',
'button#CartButton',
'span#cart-icon-bubble',
'a[onclick="window.openCartCheckout()"]',
'div.cart-fixed.cart-icon',
'a[onclick="window.openCart()"]',
'a.js-call-minicart',
'button[data-sidebar-id="CartDrawer"]',
'a.icon-cart-arrow',
'a[data-js-sidebar-handle][title="Open cart"]',
'button.js-mini-cart-trigger',
'div.site-header__cart-icon',
'a[onclick*="cart-drawer"]',
'button.cart-icon',
'xo-tooltip[xo-title="Cart"]',
'a i.fa-shopping-bag',
'cart-icon',
'div#cart-icon-bubble',
'a.flo-header-cart-btn',
'a[onclick="window.handleFloCartBtn()"]'
];
var formBasedATCSelectorList = [
'button.product-form__submit', 'button.btn-addtocart', 'button.tt-btn-addtocart',
'button.m-add-to-cart', 'button.add-to-cart', 'button#bundleBtn.btn',
'div.lc-product-button', 'button.add-to-cart-btn', 'button.stick-add',
'button.btn.btn--large.add-to-cart', 'button.ProductForm__AddToCart',
'a#atc-coll', 'button#AddToCart', 'button[data-pf-type=ProductATC2]',
'button.js-product-button-add-to-cart', 'button.button-action--shadow',
'button.add-cart-btn', 'input[value="Add to cart"]', 'div.cart-block-click',
'button.pf-button-1', 'button.product-form--atc-button', 'button.addtocartqv',
'button.btn--quick.pill', 'button[name=add]', 'button.add_to_cart_button',
'button.product-item__quick-add', 'button.gp-button-atc', 'button.product-ATC-Button',
'button.cbb-frequently-bought-add-button', 'button.single_add_to_cart_button'
];
var quickAddToCartElements = [
'.t4s-svg-pr-icon', '.product-card__overlay-btn.js-grid-cart', 'button.product-ATC-Button',
'button.quick-add__submit .span', 'button[x-html=atcBtnText]', 'button.product-item__quick-add',
'a.add-to-cart', 'a[data-trigger=addtocart]', 'add-to-cart.button',
'button.product-card--add-to-cart-button', 'div.pr_atc', 'button.enj-add-to-cart-btn',
'div.product-button', 'button.product-grid-item__btn', 'input.product__add-button',
'button.addtocart-btn', 'a.t4s-pr-item-btn', 'button.form__send__button',
'quick-add', 'button.addtocart_button', 'button.qv-add-button', 'a.product-form__submit',
'button.quick-add__submit', 'div.buttonz', 'button[class^="video-add"]'
];
var allAtcSelectors = formBasedATCSelectorList.concat(quickAddToCartElements);
var shellOverlay = null;
var shellDrawer = null;
var shellObserver = null;
var origAssign = null;
var origReplace = null;
var shellPrevHistoryState = null;
var shellPrevUrl = null;
var closeSvg = '';
// ---- Helpers ----
function escapeShellHtml(str) {
if (!str) return '';
return str.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"');
}
function formatShellPrice(cents) {
var amount = (cents / 100).toFixed(2);
var parts = amount.split('.');
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return parts.join('.');
}
// ---- Render Shell Cart HTML ----
function renderShellCartContent() {
var items = shellCartData.items;
var total = shellCartData.total;
var count = shellCartData.count;
var currency = shellCartData.currency;
var btnRadius = shellCornerType === 'rounded' ? shellCornerRadius + 'px' : '0px';
// Header
var html = '
';
html += '
';
html += '';
html += escapeShellHtml(shellTitle);
if (count > 0) {
html += ' ' + count + '';
}
html += '';
html += '
';
html += closeSvg;
html += '
';
html += '
';
html += '
';
if (count === 0) {
// Empty cart
html += '
';
html += '
Your cart is empty
';
html += '
';
return html;
}
// 12px grey separator (above items)
html += '';
// Scrollable items area
html += '
';
for (var i = 0; i < items.length; i++) {
var item = items[i];
var isLast = i === items.length - 1;
// Item wrapper (matches ProductCardWrapper with after-pseudo divider)
html += '
';
// StyledDiv (matches ProductCard layout)
html += '
';
// ProductImageWrapper
html += '
';
// ProductImage (matches yt-cart-product-image)
html += '
';
if (item.image) {
html += '';
} else {
html += '';
}
html += '
';
// QuantityBadge
html += '
' + item.quantity + '
';
html += '
'; // end ProductImageWrapper
// Content column
html += '
';
// Title
html += '' + escapeShellHtml(item.title) + '';
// Price
html += '' + currency + formatShellPrice(item.price) + '';
html += '
'; // end content column
html += '
'; // end StyledDiv
html += '
'; // end item wrapper
// Divider between items+
if (!isLast) {
html += '';
}
}
html += '';
html += '