Shopify Wishlist内存问题
我们的shopify应用程序中有以下代码,但它不起作用,我们得到的错误如下: 液体错误:超出内存限制 代码在客户标签中循环,检查集合中的产品id,并显示产品 有人能帮我确定这个问题吗Shopify Wishlist内存问题,shopify,liquid,Shopify,Liquid,我们的shopify应用程序中有以下代码,但它不起作用,我们得到的错误如下: 液体错误:超出内存限制 代码在客户标签中循环,检查集合中的产品id,并显示产品 有人能帮我确定这个问题吗 {%include'面包屑'%} {{page.title}} {{page.content}} {%if客户%} {{{'wish_list.general.image'|t} {{'wish_list.general.item'|t} {{{'wish_list.general.price'|t}
{%include'面包屑'%}
{{page.title}}
{{page.content}}
{%if客户%}
-
- {{{'wish_list.general.image'|t}
- {{'wish_list.general.item'|t}
- {{{'wish_list.general.price'|t}
-
{customer.tags%中标记的%s}
{%分配_测试='''%}
{%capture tagID%}{{tag}{%endcapture%}
{customer.tags%中标记的%s}
{%capture curTag%}{{tag}{%endcapture%}
{%如果curTag包含tagID%}
{%assign tagID_tmp=tagID.size |减:curTag.size%}
{%if tagID_tmp==0%}
{%assign_test=tagID%}
{%else%}
{%分配_测试='''%}
{%endif%}
{%endif%}
{%endfor%}
{集合%中的集合的%s}
{%paginate collection.products by collection.all_products_count%}
{%用于集合中的产品。产品%}
{%capture-productID%}{{product.id}{%endcapture%}
{%capture used%}{{productID}{{used}{%endcapture%}
{%除非使用包含productID%}
{%assign check=tag.size |减:productID.size |模:2%}
{%if check==0%}{%assign display_product=true%}{%else%}{%assign display_product=false%}{%endif%}
{%if display_product且_测试包含productID%}
{%assign variant\u tmp=product.selected\u或\u first\u available\u variant%}
{product.variants%中的变量为%0}
{%if variant.available==true和variant.price
-
-
- {{product.price|money}
-
{%form'客户'%}
{%endform%}
|
{%if product.available%}
{%else%}
{%endif%}
{%endif%}
{%end除非%}
{%endfor%}
{%endpaginate%}
{%endfor%}
{%endfor%}
{%else%}
{{'wish_list.general.若要创建{'wish_list.general.请{{'t}}{{{'wish_list.general.或{'t}}
{%endif%}
这是因为有许多嵌套循环。所有的产品都必须分类,所以开发者使用了这个巨大的结构:
{% for collection in collections %}
{% paginate collection.products by collection.all_products_count %}
{% for product in collection.products %}
...
{% endpaginate %}
{% endfor %}
{% endfor %}
我在我们的一个客户的店里发现了这个错误
但是我们可以使用Shopify liquid所有产品['the-handle']
原始客户标签愿望列表使用产品ID和x。我用产品句柄代替产品ID,用+0代替x
带有产品ID的客户标签:
12345678
x12345678
xx12345678
带手柄的客户标签:
一些产品手柄
+0一些产品手柄
+0+0某些产品句柄
我不得不更改代码,花了很多时间,但现在它运行良好,没有任何错误。这是因为有许多嵌套循环。所有的产品都必须分类,所以开发者使用了这个巨大的结构:
{% for collection in collections %}
{% paginate collection.products by collection.all_products_count %}
{% for product in collection.products %}
...
{% endpaginate %}
{% endfor %}
{% endfor %}
我在我们的一个客户的店里发现了这个错误
但是我们可以使用Shopify liquid所有产品['the-handle']
原始客户标签愿望列表使用产品ID和x。我用产品句柄代替产品ID,用+0代替x
带有产品ID的客户标签:
12345678
x12345678
xx12345678
带手柄的客户标签:
一些产品手柄
+0一些产品手柄
+0+0某些产品句柄
我不得不更改代码,花了很多时间,但现在它工作正常,没有任何错误。我应该以->所有产品[“客户标签”].id检索产品吗?是的。您将产品句柄放置到客户标签上,然后获取它们,删除+0子字符串(或其他标记)并获取产品。我是否应以->所有产品[“客户标签”]的形式检索产品。id?是。您将产品句柄放入客户标签,然后获取它们,删除+0子字符串(或其他标记)并获取产品。请提供添加到愿望列表功能的代码完整代码??请提供添加到愿望列表功能的代码完整代码??