RC 1: Cross-Sells element shows all products if empty input

Hi!

This might be a general problem, not just in RC.

There is an inconsistency between how the Upsells work, vs the Crossels. When Upsells are empty, the output is empty.

When Cross-sells are empty, all products are being shown. I think they should be empty as well.

In addition, a condition that checks if they exist would be great for the purpose of hiding their entire section if they are empty.

  1. While on the topic, there was an announcement two years ago that advanced providers including upsells and cross-sells will be made eventually. I hope this is still being planned. :slight_smile:

  2. On the sidenote, I found this thread where apparently it was solved by a dynamic content looper, but I cannot understand what was the actual solution implemented. Would it be possible to set a custom looper for Upsells/Cross-sells?

Thanks!

That sounds like a bug on our end. I’m assuming you mean “Cross Sell” with a product type? If a product had no cross sells you are correct it would just blindly grab products. I will have that fixed in 6.3.0 or 6.3.1.

  1. Would love to work on providers more. I actually don’t see any requests for a Cross Sells or Upsells looper provider so I have added it to our system.

  2. I don’t know if WC changed or that user had custom code to put _crosssell_ids in the post meta, but that is not in my post meta. If that’s just a setting then I guess you could still utilize that, loop through that and have a provider that uses that ID. If I’m reading that thread correctly. I don’t think it’d take too long to create these loopers though.

1 Like

Hi @charlie!

Yes, that is what I meant. I have a single product layout with the native Cornerstone Cross-sells element. In case they are not defined, all products are being outputted. Looking forward for the fix in 6.3.1!

  1. I see a lot of requests on the forums. Perhaps they just haven’t been added to the log. :slight_smile:

Linked products are pretty big deal in ecommerce. They are kind of a priority when it comes to WooCommerce single and Cart layouts. The current native elements are a good start but we really need loopers and conditions around them, to match the other archive layout design without a lot of custom CSS, and to be able to control the experience better. Right now, I have to show/hide those sections using ACF toggles instead of doing it automatically based on the looper output.

  1. I’ll play more with it. It is still a bit foggy, but I hope I’ll get there. Thank you! :slight_smile:

With the hotfixes bumping the point number this week. That bug fix with cross sells is coming out on Monday. I have added and will definitely take a look at these two loopers at some point. Have a great weekend!