Solved

Product.Selling_plan_groups Array (Liquid) Is Sometimes Empty

Etra
Shopify Partner
35 0 16

In our liquid template, we check if `product.selling_plan_groups.size > 0` (confirming a product has a selling plan group attached) and display some HTML if so. We recently started getting reports that the HTML was not being rendered. After further investigation, we found that if the `cache` was cleared then `product.selling_plan_groups` would be empty even if the product has a selling plan group attached. So a first-time visitor to a merchant's store would not see the HTML since `product.selling_plan_groups` has a size of 0. 

Etra_0-1691798881088.png

 

 

Etra_1-1691798881160.png

 

 


We have replicated the issue on Chrome, Firefox, and Safari for the Dawn and Debut themes.

This is a serious issue. I don't know why this hasn't been looked at. Many merchants are starting to reach out to our support about it. For years it has worked just fine. Nothing has changed on our end in terms of using liquid objects to display some selling plan groups. Other apps do this and even some themes as well. Everyone is affected, merchants, customers, app developers. This needs to be fixed...

Accepted Solution (1)

JoshArnold
Shopify Staff
30 7 6

This is an accepted solution.

@Etra @DenisZ the fix has been deployed and this should be fully resolved. Please let us know if there's any further issues!

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 8 (8)

LarryReid
Shopify Staff
87 9 22

Thanks for bringing this to our attention. I've created a bug report.

 

Can you please confirm that when you say, "if the `cache` was cleared," you mean the browser cache was cleared? And if so, at what step in the shopping or checkout does clearing the cache cause the issue?

To learn more visit the Shopify Help Center or the Community Blog.

Etra
Shopify Partner
35 0 16

you mean the browser cache was cleared?

Yes. But to be more specific, it happens when a customer is a first-time visitor to a product page. (Which can be replicated by clearing the cache (mostly, please checkout out the PM with more details)). I have sent you a PM as I do not want to reveal sensitive details. Please check it out.

LarryReid
Shopify Staff
87 9 22

Thanks for the extra details. The video is very helpful!

To learn more visit the Shopify Help Center or the Community Blog.

DenisZ
Shopify Partner
14 1 6

This is an extremely serious issue when a merchant is selling preorders. We had a merchant this weekend who missed out on most of their presale sales because of it. 

 

With preorders, a merchant waits to add a selling plan to their product until right before the sale happens. The caching made the preorder option not appear. To make matters worse, in their product admin they checked the 'Only show this product with these purchase options' box. That prevented customers from even adding that product to the cart, as the cart endpoint rejects calls for products that have that box checked if there is no selling plan in the cart.

 

This issue really needs to be looked at with the utmost priority!

JoshArnold
Shopify Staff
30 7 6

@DenisZ @Etra we identified a potential problem and are working on delivering the solution ASAP! I will follow up on here once we have completed our efforts to allow you to confirm it is resolved.

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

JoshArnold
Shopify Staff
30 7 6

This is an accepted solution.

@Etra @DenisZ the fix has been deployed and this should be fully resolved. Please let us know if there's any further issues!

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Etra
Shopify Partner
35 0 16

Will do! Thank you. 

DenisZ
Shopify Partner
14 1 6

Many thanks!