• Resolved DaWebmaster

    (@dawebmaster)


    I am planning to have a store that features two different vendors e.g. Supermarket A and Supermarket B.

    I do not need the typical vendor functionality however. I would like to have the Administrator handle all adding of products, fulfill incoming orders (order management) etc.

    In other words, vendor logins where a vendor signs in to add or manage orders or deliveries won’t be necessary since I intend to manage all of it from the administrator end. Can this be done? If so, what settings control this?

    If not possible, how can I get this done?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DaWebmaster

    (@dawebmaster)

    Also a second follow up question:
    How can I restrict a customer to only be able to purchase from one vendor at a time. Meaning customer has product from Vendor A in cart, if he attempts to add a product from Vendor B it lets them know they can only purchase from one vendor at a time.

    Plugin Author MultiVendorX

    (@wcmp)

    Hi there, thanks for getting in touch with us.

    As per our flow, the vendor doesn’t have any category however they can sell specific category products.
    Therefore, as an admin when you will create a product and assign that to a vendor. Then you can display vendors as per each category using our shortcode to have a list of vendors : https://wc-marketplace.com/support-forum/topic/show-a-list-of-all-vendors/#post-123153

    In order to restrict shopping from one vendor, please use this code :

    add_action('woocommerce_add_to_cart_validation','woocommerce_add_to_cart_validation',10,3);
    function woocommerce_add_to_cart_validation($passed, $product_id, $quantity){
        foreach (WC()->cart->get_cart() as $cart_key => $cart_item ){
            $cart_vendor = get_wcmp_product_vendors($cart_item['product_id']);
            $product_vendor = get_wcmp_product_vendors($product_id);
            if($cart_vendor && $product_vendor){
                if($cart_vendor->id != $product_vendor->id){
                    $passed = false;
                    wc_add_notice( __( 'Another vendor product is already in your cart.', 'woocommerce' ), 'error' );
                    return $passed;
                }
            }
        }
        return $passed;
    }

    Let us know if you need any further help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Vendor Store Managed by Admin Only’ is closed to new replies.