• Resolved jjbte

    (@jjbte)


    I am using both your free and PRO versions. Under “Wholesale Products Display Options,” I have the options of Show All; Show Retail Products to Retail, Wholesale Products to Wholesale; and Show Retail Products to Retail, All Products to Wholesale.

    In my store, I have ALL products available for RETAIL purchase, but only a few products available for wholesale purchase. I am currently using the Show All option and that works OK when combined with WooCommerce Role Based Price to control the actual price users get based on their roles.

    Ideally, though, the additional option of Show ALL Products to Retail, Wholesale Products to Wholesale would be best for my configuration. Could that be a possibility in a future version?

    Also, I noticed that the “Showing xx results” does not change based on product visibility settings. For instance, if there are 10 products in a category, but only 3 are visible to a logged-in user based on his/her Wholesale/Retail status, the page still displays “Showing 10 results” rather than “Showing 3 results” as would be expected. It’s not a huge deal, but it would be great if you could somehow make the number of results display match the actual number of products visible to the user.

    Thanks. ??

    https://www.ads-software.com/plugins/pricing-deals-for-woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vark

    (@vark)

    Hi,
    Thanks for the suggestion. Will try to include “Show ALL Products to Retail, Wholesale Products to Wholesale” in the next release. Don’t think I can control the search results issue…
    Best,
    Vark

    Thread Starter jjbte

    (@jjbte)

    Thanks so much for reading my post and taking my request into consideration! I’m going to go ahead and mark this as resolved since it’s not really a bug/problem anyway.

    Thread Starter jjbte

    (@jjbte)

    I wrote a function to achieve what I need in my store (for Wholesale Buyers NOT to be able to buy non-wholesale products). It doesn’t affect product visibility. It instead sets the value of is_purchasable (WooCommerce) to false when Wholesale Buyers are logged in, so non-wholesale products appear with a Read Only button rather than Add to Cart. In addition, if non-logged in customers add non-wholesale products to their carts, those items will be removed when customers log in as Wholesale Buyers.

    NOTE: I believe the wholesale visibility option is only available in the PRO version or the Pricing Deals plugin, so this function would not work with just the free version installed.

    add_filter('woocommerce_is_purchasable', 'bte_vtprd_wholesale_is_purchasable', 10, 2);
    function bte_vtprd_wholesale_is_purchasable($purchasable, $product) {
      if (current_user_can('buy_wholesale') || current_user_can('wholesale')) {
        $product_is_wholesale = get_post_meta($product->id, 'vtprd_wholesale_visibility', true);
        if ($product_is_wholesale == 'yes') {
          return true;
        } else {
          return false;
        }
      } else {
        return true;
      }
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Request for Additional Wholesale Products Display Option’ is closed to new replies.