VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: giniapo on July 21, 2016, 20:50:17 pm

Title: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: giniapo on July 21, 2016, 20:50:17 pm
No products are loaded into the cart when the option "The first product determines the seller of cart" is enabled (in the multi-vendor Virtuemart configuration) and the products belongs to a vendor other than the principal.
With this option enabled, if I select a product that, has previously added a a vendor other than the principal, do not load in the cart.


Anyone else's happening this ?.

I have VM 3.0.17.4 and Joomla 3.6
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on July 22, 2016, 09:12:02 am
Are you sure it is connected to the product of the other vendor and the mode? I cannot reproduce it.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: giniapo on July 23, 2016, 01:33:58 am
Yes , I'm sure. I have tried several products from several vendors and (if not the main vendor) does not add products to cart.

Can you think of any reason for this failure?

Thanks
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on July 25, 2016, 09:14:36 am
Please use the last vm3.0.17.4, I reupped it. http://dev.virtuemart.net/attachments/download/1010/com_virtuemart.3.0.17.4_extract_first.zip

Code: [Select]
if(VmConfig::get('multixcart',0)=='byproduct'){
if(empty($this->vendorId)) $this->vendorId = $product->virtuemart_vendor_id;
if(!empty($this->vendorId) and $this->vendorId != $product->virtuemart_vendor_id){
//Product of another vendor recognised, for now we just return false,
//later we will create here another cart (multicart)
return false;
}
}
yeh it is blocked. The idea is here to create another cart. What do you want to achieve with it?
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 05, 2016, 18:47:18 pm
Similar problem: http://forum.virtuemart.net/index.php?topic=135069.msg469814#msg469814

And I understand that it is the duration of the session. While the database is not clear table #_session, then put in the cart another vendor is not possible. But it is a wrong decision. Is there a solution to this problem? Installed VM 3.0.17.4

I want the buyer (customer) to enjoy the goods of one Vendor- one order, and whatever session it is not "kept".
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on August 06, 2016, 13:08:17 pm
"then put in the cart another vendor is not possible"

Then you must use another mode.

"The first product determines the seller of cart" means that the first product determines the vendor, it is plant to add multicart, that means, if you add a product of another vendor, then you should get another cart.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 06, 2016, 14:46:54 pm
"then put in the cart another vendor is not possible"

Then you must use another mode.

"The first product determines the seller of cart" means that the first product determines the vendor, it is plant to add multicart, that means, if you add a product of another vendor, then you should get another cart.

Oh! I got it! We force the buyer (customer) to log out, then forced to go again, that would create a new session, and only then he can place an order for products from another vendor?
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: GJC Web Design on August 07, 2016, 10:45:30 am
Quote
We force the buyer (customer) to log out, then forced to go again, that would create a new session, and only then he can place an order for products from another vendor?

yes-- this is how I understand it works
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 07, 2016, 15:23:53 pm
Thank you.
Could You tell me why when you enable the multi vendor cease to display product categories on the main page VM?
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on August 07, 2016, 16:31:28 pm
lol, heck no.

Use ebay and you will understand how it is meant. NOT the stupid way you wanna ass me
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 07, 2016, 16:43:04 pm
lol, heck no.

Use ebay and you will understand how it is meant. NOT the stupid way you wanna ass me
Are you okay?
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on August 08, 2016, 09:23:00 am
lol, come on.
"The first product determines the seller of cart" means that the first product determines the vendor, it is plant to add multicart, that means, if you add a product of another vendor, then you should get another cart.

Oh! I got it! We force the buyer (customer) to log out, then forced to go again, that would create a new session, and only then he can place an order for products from another vendor?

Did I talk about logout? Did I talk about forcing? Did I talk about Sessions? No, I did not. So your answer is sarcastic and has almost nothing todo with what I said.

When you buy something at ebay, lets say 3 products by 2 vendors, you will get TWO carts. The mode is not finished yet. The code cannot create different carts per vendor, but the mode, you selected is meant for that case.

So when you buy products from 2 different vendors, it should display 2 cart modules and you would have to checkout two times. But as I said, this mode is not finished yet. You may also read here https://docs.virtuemart.net/manual/general-concepts/211-multivendor.html

When you need multicart, consider to buy a gold membership for this purpose.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 09, 2016, 05:16:34 am
Milbo, I'm not being snarky. I'm trying to understand how it works. To adapt the current version under the necessary requirements of an online store. Thanks for the reply.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo on August 09, 2016, 10:08:46 am
Multivendor is very confusing, because there exists so many different models of it.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: VopoloS on August 11, 2016, 07:18:47 am
Hello Milbo.
I return to the question: why can't I see the list of categories on the main page of VM? This is so conceived or in process of development? Can I see code where a list of categories? Sorry I do not fully understand this problem and please explain. The customer asks, I still can not answer.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: sherylenedyer 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.
Title: Re: No products are loaded into the cart - Multivendor option - VM 3.0.17.4
Post by: Milbo 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;
}