Adds new filter localized_url
that can be used to manipulate Ajax API's URLs for Cart and Get Upsells/Recommendations
upside.ucd.filters.localized_url.push(e => {
// Prefix locale for cart api
if(e.type === 'cart' && Shopify.locale && Shopify.locale.toLowerCase() !== 'en')
{
e.url = '/' + Shopify.locale + e.url
}
return e;
})
Restrict max quantity for items if an attribute max or data-max is set. The following code sets maximum 10 quantity for related item.
<input type="text" max="10" ....other attributes here />