Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: problem with the vendors location #217598
    desarrollo
    Participant

    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_mvx_product_vendors($cart_item[‘product_id’]);
    $product_vendor = get_mvx_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;
    }

    this code send my home page when i buy two diferent vendors, can be de advertence above of the page anywhere?, or going tu car y if they boy more than two vendors ,because the buyer can not see the advertence

    in reply to: problem with the vendors location #217469
    desarrollo
    Participant

    thank you, i am going to prove the boths ways.

    do you have a code to icrase de price of the shipping if the person choose more than 1 diferent vendor?

Viewing 2 posts - 1 through 2 (of 2 total)
Shopping Cart
Launch Your Marketplace
in Days, Not Month
Get expert guidance to build, scale, and grow your MultiVendorX marketplace
Book Free Strategy Call
Trusted by 10000+ marketplace Owners
Scroll to Top