Public Ticket #3622170

Product visibility

Closed
Comments
24 Tickets 18
Eric Walter started the conversation 3 years ago on April 5, 2024 at 1:20pm

Hi, one cuestion : having an hybrid product (means sold in both ways B2C and B2B), may I put the product in backorder only for B2B customers (which means be visible for B2B users and hidden for B2C users by the parameter "hide out of stock products") ?

Tried to use the parameters "B2B allow backorders" but product does not appears in the displayed catalog. As it appears correctly on direct access via the full URL I'm thinking it can be because my Woo have the global parameter "hide out of stock products". In that case, any solution to limit the effect of this parameter to allowed backorder B2B products ? (I don't want all my catalog with out of stock products).

Thanks for your feedback,

Regards

2,762
KingsPlugins replied 2 years ago on April 7, 2024 at 5:47am

Hello Eric,

I looked into this now to see whether I can find any hook / code snippet that can change this to allow B2B products on backorder.

Based on what I see in the Woo code I am not sure that there is a good way to do it. I see the wc query filters items directly based on the out of stock status.

2855156579.png

Alternatively I think maybe it can be possible to write a custom visibility code snippet based on the hook woocommerce_product_is_visible.


Have you considered whether you can use B2BKing's product visibility feature for this instead?


Kind regards,

Stefan

24 Tickets 18
Eric Walter replied 2 years ago on April 7, 2024 at 10:51am

Hi Stefan, good idea, will try and let you know. In the same idea, is it possible to deactive comments for B2B products (only B2B, not hybrids) ? Would be useful for us.

24 Tickets 18
Eric Walter replied 2 years ago on April 7, 2024 at 11:13am

by the way I have a strange behavior regarding product visibility, maybe you can help : my main woo parameter is NOT "hide products out of stock" (thought it was but checked and not). But, logging as a b2b user out of stock products are not visible ("All products visible" disabled - visibility product on "Manual Setting" with visibility activated - "Product Visibility Cache" disabled).

2,762
KingsPlugins replied 2 years ago on April 8, 2024 at 9:28am

Hi Eric,

In your case, if you activate that "all products visible" setting in B2BKing, do the out of stock products become visible?

If not, then I think there is another plugin or code affecting this, hard to say what it is.


I can also check directly if you can share a temporary access to the site or staging site,

24 Tickets 18
Eric Walter replied 2 years ago on April 13, 2024 at 6:40pm

hmmm thanks for checking deeply. So the filter plugin parameter apply to the whole catalog thats it ? Not only to filter results ? This is an issue on his side no ? 

2,762
KingsPlugins replied 2 years ago on April 15, 2024 at 11:45am

It's possible that's an unintended issue but I am not really sure how this feature is supposed to work or what it does internally. You can certainly ask their team as they would have a better understanding of this.

Sign In