Error when adding more than one of the same product

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287512

-- HikaShop version -- : 3.2.1
-- HikaMarket version -- : 2.0.1
-- Joomla version -- : 3.8.3
-- PHP version -- : 7.0.27

We have our hikamarket config set to limit vendors in the cart. However, when trying to add more than one of the exact same product to the cart we are getting the following error:

Due to a restriction you can't add product "Photo Boards Masonry Products" of vendor "1" but only products of vendor "2"

I would expect this behavior if adding two different products from different vendors. However, this is adding the same product twice. First one works. Second generates the error.

Attached is the error in action.

Also, you will notice that only one of the shopping cart modules is not updating via ajax.

Please advise.

Attachments:
Last edit: 6 years 9 months ago by dustinjc.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287532

Hello,

Please provide details about the products configurations.
If you could also provide link when you create a topic thread ; it could help us to try to see the issue directly in your website.
Because right now I can't be sure that you're adding the same product in the cart.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287558

Sending access via a private message. The install is password protected.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287567

Hi,

Please take a look at my forum signature.

By the way, do not send me private message, use the "contact us" form instead.


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287596

Gotcha. Do you need me to resend the access info?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287597

Hello,

Yes :)
Every received PM is deleted and I'm not even notified by email for them.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287650

Info re-sent via the contact form. Please let me know if anything else is needed.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287655

Hello,

The URL gave me a 404 page.
It looks like there is no "samplestore"

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287661

Please try again. We had a url/alias change last night. I've set it back.

The URI is (domain is in email):
/samplestore/product/173394-photo-boards-masonry-products

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287663

Hello,

Thanks !
I was able to check your configuration and reproduce it in a local website.
Please edit the file "administrator/components/com_hikamarket/classes/cart.php" and replace

		$v = isset($product_vendors[ $pid ]) ? (int)$product_vendors[ $pid ]->product_vendor_id : 0;
		if($v == 0 && !empty(self::$zone_id))
			$v = self::$vendor_id;
By
		$v = isset($product_vendors[ $pid ]) ? (int)$product_vendors[ $pid ]->product_vendor_id : 0;
		if($v == 0 && !empty($p['data']) && !empty($p['data']->product_parent_id))
			$v = (int)$product_vendors[ (int)$p['data']->product_parent_id ]->product_vendor_id;
		if($v == 0 && !empty(self::$zone_id))
			$v = self::$vendor_id;
And it will fix the issue.
In our side the patch will be integrate into HikaMarket next release ; and maybe in the current package as hot-fix.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287808

That did it. Thank you.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.074 seconds
Powered by Kunena Forum