第 105 期 广告投放之 同一产品系列 置顶不同商品 高效管理和使用产品系列

点击这里查看视频演示     本期 YouTube 链接(免登录观看 4K)

通过复制产品系列进行投放是一种不够高级的方式,随着时间的推移,可能导致店铺后台很多个产品系列,并且记不起哪个能删哪个不能删,对于客户而言也会很混乱。本期视频教你如果在同一个产品系列,置顶不同产品,而不需要额外复制产品系列。

Impulse 主题代码一键复制

其他主题,如需帮忙添加,点击这里

Symmetry 原主题代码

{% for product in collection.products %}
    {% render 'product-block', product: product, custom_aspect_ratio: chosen_aspect_ratio, manual_image_load: manual_image_load, animate: true %}
{% endfor %}

修改后代码

{% assign handles = collection.sort_by | split: "," %}
{% if current_page == 1 %}
{% for handle in handles %}
{% assign topProduct = all_products[handle] %}
{% if topProduct != empty %}
{% render 'product-block', product: topProduct, custom_aspect_ratio: chosen_aspect_ratio, manual_image_load: manual_image_load, animate: true %}
{% endif %}
{% endfor %}
{% endif %}

{%- for product in collection.products -%}
{% if handles contains product.handle %}
{% continue %}
{% else %}
{% render 'product-block', product: product, custom_aspect_ratio: chosen_aspect_ratio, manual_image_load: manual_image_load, animate: true %}
{% endif %}
{% endfor %}

使用方法

?page=1&sort_by=product.handle 如果多个的话,用英文逗号分隔,不需要使用空格
💡
温馨提示:参考视频演示复制产品 handle,不要复制后面的变体数值 ?variant=id

例如:

https://example.com/collections/sale/?page=1&sort_by=bike,ring,mattress

有帮助? 请 up 主喝奶茶(页面右侧)

第 143 期 一元开店 低成本拥有你自己的 Shopify 店铺
限时福利:既可用于创建新的店铺,也可以创建测试店铺(例如免费试用插件 APP 等),避免测试插件时代码残留在主题中,拖慢店铺网速。

内容标签:   #B站教程,   #店铺运营,   #促销与折扣