Okay
  Public Ticket #3622170
Product visibility
Closed

Comments

  •  4
    Eric started the conversation

    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

  •  1,881
    WebWizards replied

    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

  •  4
    Eric replied

    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.

  •  4
    Eric replied

    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).

  •  1,881
    WebWizards replied

    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,

  •   Eric replied privately
  •  1,881
    WebWizards replied

    Thank you for your patience on this,

    I think I have found the issue. It appears it was a setting in the Filter everything plugin ( https://staging2.esquipulas.fr/wp-admin/edit.php?post_type=filter-set&page=filters-settings&tab=experimental )

    5083721357.png


    I have disabled that now and I believe the out of stock items are no longer being hidden.

  •  4
    Eric replied

    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 ? 

  •  1,881
    WebWizards replied

    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.