window.processing = true;

Shop

window.sortBy = "best-selling";
window.processing = false;
window.productCardList = [{"id":9425777492249,"title":"Waltham Forest","handle":"waltham-forest","description":"\u003ch4\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe fresh dark fruit cider is a perfect combination of apples and blackcurrants with a strong aromatic flavor character, robust fresh and fruity flavor. It has beautiful hints of citrus that gives the fruit cider a refreshing and clean taste.\u003c\/span\u003e\u003c\/h4\u003e","published_at":"2024-05-17T12:42:20-04:00","created_at":"2024-05-17T05:57:40-04:00","vendor":"Pinter","type":"Press","tags":["Additional Product Type|Classic","Additional Product Type|Hard Cider","BESTSELLER","CRM_Fresh-press","Filter Product Type|Fresh Beer","Gluten Free","Icons|apple","Icons|blackcurrant","Icons|british","Icons|tart","SHOPALLCOLLECTION","Vegan"],"price":2599,"price_min":2599,"price_max":2599,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":48867086762265,"title":"One-off","option1":"One-off","option2":null,"option3":null,"sku":"DFTREF3","requires_shipping":true,"taxable":true,"featured_image":{"id":45652713308441,"product_id":9425777492249,"position":1,"created_at":"2024-05-17T06:46:48-04:00","updated_at":"2024-05-17T06:46:50-04:00","alt":null,"width":1800,"height":1800,"src":"\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810","variant_ids":[48867086762265]},"available":true,"name":"Waltham Forest - One-off","public_title":"One-off","options":["One-off"],"price":2599,"weight":1996,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":38149807178009,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810"}},"requires_selling_plan":false,"selling_plan_allocations":[{"price_adjustments":[],"price":2599,"compare_at_price":null,"per_delivery_price":2599,"selling_plan_id":689337762073,"selling_plan_group_id":"6af3bacc726a1376e9130529b13256c02ffdde76"}],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810"],"featured_image":"\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810","options":["Title"],"media":[{"alt":null,"id":38149807178009,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/pinter.com\/cdn\/shop\/files\/WalthamForestUS_03.jpg?v=1715942810","width":1800}],"requires_selling_plan":false,"selling_plan_groups":[{"id":"6af3bacc726a1376e9130529b13256c02ffdde76","name":"Pinter","options":[{"name":"Pinter","position":1,"values":["Monthly"]}],"selling_plans":[{"id":689337762073,"name":"Monthly","description":"Monthly plan","options":[{"name":"Pinter","position":1,"value":"Monthly"}],"recurring_deliveries":true,"price_adjustments":[],"checkout_charge":{"value_type":"percentage","value":100}}],"app_id":null}],"content":"\u003ch4\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe fresh dark fruit cider is a perfect combination of apples and blackcurrants with a strong aromatic flavor character, robust fresh and fruity flavor. It has beautiful hints of citrus that gives the fruit cider a refreshing and clean taste.\u003c\/span\u003e\u003c\/h4\u003e"}]; callSortingFunction(); function callSortingFunction() { if(window.processing) { setTimeout(function() { callSortingFunction(); },1000); } var sorted_items = getSorted('.card-product', 'data-sort', window.sortBy); $('.listing-shop__inner').html(sorted_items); } function getSorted(selector, attrName, ascordesc) { return $($(selector).toArray().sort(function(a, b){ var aType = a.getAttribute('data-type'); var bType = b.getAttribute('data-type'); var aAvailable = a.getAttribute('data-available'); var bAvailable = b.getAttribute('data-available'); if ((aType === "Pinter" && aAvailable) && (bType === "Tap" || bType === "Co-Pinter")) return -1; else if (aType === "Tap" && aAvailable && bType === "Co-Pinter") return -1; else if (bType === "Pinter" && bAvailable && (aType === "Tap" || aType === "Co-Pinter")) return 1; else if (bType === "Tap" && bAvailable && aType === "Co-Pinter") return 1; else if ((aType === "Tap" || aType === "Pinter" || aType === "Co-Pinter") && aAvailable && (bType !== "Tap" && bType !== "Pinter" && bType !== "Co-Pinter")) return -1; else if ((aType !== "Tap" && aType !== "Pinter" && aType !== "Co-Pinter") && bAvailable && (bType === "Tap" || bType === "Pinter" || bType === "Co-Pinter")) return 1; else if (aAvailable === "false" && bAvailable === "true") return 1; else if (aAvailable === "true" && bAvailable === "false") return -1; var aVal = parseInt(a.getAttribute(attrName)), bVal = parseInt(b.getAttribute(attrName)); if(ascordesc == 'price-ascending'){ return aVal - bVal; } if(ascordesc == 'price-dec'){ return bVal - aVal; } })); }