二次开发shopify判断当前地址栏和自动跳转
{%- liquid
assign handle = collection.handle
assign sort_by = collection.sort_by
-%}
{%- if handle == 'best-sellers' and sort_by == blank -%}
<script>
var sortByUrl = '{{ collection.url }}?sort_by=price-ascending';
window.location.href = sortByUrl;
</script>
{%- endif -%}