window.processing = true;

Shop

Not sure where to start? Help me buy

window.sortBy = "best-selling"; window.productCardList = [{"id":6619989934155,"title":"Public House","handle":"1","description":"\u003cmeta charset=\"utf-8\"\u003e\n\u003ch4\u003e\u003cspan data-mce-fragment=\"1\"\u003eMalty \u0026amp; hoppy. A hop forward beer with a strong burst of piney, resinous and earthy characters. A seriously drinkable IPA.\u003c\/span\u003e\u003c\/h4\u003e","published_at":"2021-09-28T19:49:07+01:00","created_at":"2021-09-28T19:49:10+01:00","vendor":"TGG - Fresh Brewing","type":"Press","tags":["Additional Product Type|Ales","Additional Product Type|Classic","Additional Product Type|ipa","Additional Product Type|Pale Ale","Autumn","AWARDWINNER","Beer Scroller","BLUEFRESHBEER","Contains Gluten","funnel_brewdog","funnel_default","funnel_norwich","GIFTING25","HOPPYFLAVOURDISCOVERY","Icons|amber","Icons|hoppy","Icons|mid high bitterness","Icons|pine","SHOPALLCOLLECTION","SUMMERSTYLE","Vegan"],"price":1799,"price_min":1799,"price_max":1799,"available":false,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":39530699391051,"title":"One-off","option1":"One-off","option2":null,"option3":null,"sku":"IPAREF3","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Public House - One-off","public_title":"One-off","options":["One-off"],"price":1799,"weight":1800,"compare_at_price":null,"inventory_management":"shopify","barcode":"5060904690139","requires_selling_plan":false,"selling_plan_allocations":[{"price_adjustments":[{"position":1,"price":1439}],"price":1439,"compare_at_price":1799,"per_delivery_price":1439,"selling_plan_id":726499403,"selling_plan_group_id":"be5e5fd260ca25f9cd4737f4da1541b6040109c0"},{"price_adjustments":[{"position":1,"price":1799}],"price":1799,"compare_at_price":1799,"per_delivery_price":1799,"selling_plan_id":709864259966,"selling_plan_group_id":"be5e5fd260ca25f9cd4737f4da1541b6040109c0"},{"price_adjustments":[{"position":1,"price":1799}],"price":1799,"compare_at_price":1799,"per_delivery_price":1799,"selling_plan_id":1113587787,"selling_plan_group_id":"be5e5fd260ca25f9cd4737f4da1541b6040109c0"}],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/pinter.co.uk\/cdn\/shop\/files\/PublicHouse_Improved_03.jpg?v=1715850272"],"featured_image":"\/\/pinter.co.uk\/cdn\/shop\/files\/PublicHouse_Improved_03.jpg?v=1715850272","options":["Title"],"media":[{"alt":null,"id":23072793526347,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/pinter.co.uk\/cdn\/shop\/files\/PublicHouse_Improved_03.jpg?v=1715850272"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/pinter.co.uk\/cdn\/shop\/files\/PublicHouse_Improved_03.jpg?v=1715850272","width":1800}],"requires_selling_plan":false,"selling_plan_groups":[{"id":"be5e5fd260ca25f9cd4737f4da1541b6040109c0","name":"Pinter","options":[{"name":"Pinter","position":1,"values":["Delivered every month","Every 4 weeks","Spread Payments Product"]}],"selling_plans":[{"id":726499403,"name":"Every month","description":null,"options":[{"name":"Pinter","position":1,"value":"Delivered every month"}],"recurring_deliveries":true,"price_adjustments":[{"order_count":null,"position":1,"value_type":"percentage","value":20}],"checkout_charge":{"value_type":"percentage","value":100}},{"id":709864259966,"name":"Every 4 weeks","description":"Every 4 weeks","options":[{"name":"Pinter","position":1,"value":"Every 4 weeks"}],"recurring_deliveries":true,"price_adjustments":[{"order_count":null,"position":1,"value_type":"fixed_amount","value":0}],"checkout_charge":{"value_type":"percentage","value":100}},{"id":1113587787,"name":"Spread Payments Product","description":"Spread Payments Product","options":[{"name":"Pinter","position":1,"value":"Spread Payments Product"}],"recurring_deliveries":true,"price_adjustments":[{"order_count":null,"position":1,"value_type":"percentage","value":0}],"checkout_charge":{"value_type":"percentage","value":100}}],"app_id":null}],"content":"\u003cmeta charset=\"utf-8\"\u003e\n\u003ch4\u003e\u003cspan data-mce-fragment=\"1\"\u003eMalty \u0026amp; hoppy. A hop forward beer with a strong burst of piney, resinous and earthy characters. A seriously drinkable IPA.\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; } })); }