Author Topic: No products are loaded into the cart - Multivendor option - VM 3.0.17.4  (Read 2561 times)

sherylenedyer

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
« Reply #15 on: October 10, 2016, 05:23:01 am »
Hello,

I'm experiencing a similar issue. I just want to know where I should paste the code that Milbo included.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
« Reply #16 on: October 10, 2016, 11:57:03 am »
You wrote to me per pn:
Hello Milbo,

I'm hoping you can help me. I selected the 'first product determines the seller" option for virtue mart multi vendor feature. My issue is when a customer deletes the product from the cart and tries to add a product from another seller, it keeps the cart locked.

This is another problem. The code is already implemented. Your problem is just an extra line

open the cart helper in FE/helpers (/component/com_virtuemart/helpers/cart.php), around line 213 you see
Code: [Select]
if(count(self::$_cart->cartProductsData) >0 and empty(self::$_cart->vendorId)){
self::$_cart->vendorId = 1;
}

replace it against
Code: [Select]
$cp = count(self::$_cart->cartProductsData);
if( $cp >0 and empty(self::$_cart->vendorId)){
self::$_cart->vendorId = 1;
} else if ($cp == 0) {
self::$_cart->vendorId = 0;
}
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/