Multiple Customers Trying To Buy Same Item

  • Posts: 15
  • Thank you received: 0
13 years 6 months ago #16070

Hello,
Made my site live last night and the items I sell only have an inventory of 1. When someone puts the item in their cart it does not come out of inventory so it allows multiple people to have the same item in their cart and then when one person checks out the other people that has that same item cannot check out. It gives them and "internal server error" and then it seems like their cart doesn't work again even if they remove the item. I hope there is a fix for this because people were not happy. The nature of my business is I send out a newsletter and then people rush to get the ones they want as fast as possible. I am using the business edition. Please help. Here is the link to the site. 10 dollar frags
Everything else is excellent!!!!!

Thanks Tatum

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 6 months ago #16087

There is indeed a bug regarding that case on the current release.
We were able to reproduce it on our end and fixed. The fix will be included in next release.
In the mean time you can do this:
In the file components/com_hikashop/controllers/checkout.php, after the line:
$done = $cartClass->loadFullCart(true);

add the code:
if(empty($done->products)){
$app =& JFactory::getApplication();
$app->redirect( $this->redirect_url, JText::_('CART_EMPTY'));
}

Then, in the file administrator/components/com_hikashop/classes/cart.php, you need to change the lines:
$notUsable[$k]=0;
by:
$notUsable[$product->product_id]=0;

You should have it 4 times.

That solves the problem on our end.

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

  • Posts: 15
  • Thank you received: 0
13 years 6 months ago #16091

OK I have made the adjustments and see if that works. Thank you so much for getting back with me!!

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

Time to create page: 0.050 seconds
Powered by Kunena Forum