Closed (fixed)
Project:
Ubercart AJAX Cart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2010 at 09:35 UTC
Updated:
14 Jun 2012 at 00:21 UTC
Hi,
My client orders some stock in when it is needed, rather than keep it in house. With Ajax Cart 1.0 I was able to add out of stock items to my shopping cart, but now I cannot. I get the jQuery message stating that the product is out of stock!
Is there a fix for this, or am I being a COMPLETE noob and missing a simple option somewhere in Ubercart or Ajax Cart?
Should also be said, I cnnot revert back to Ajax Cart 1 as I had issues with anonymous users that do not occur in the UCAC Beta release!
Thanks in advance!
Comments
Comment #1
chapabu commentedI've fixed my issue by changing the SQL query from
$sql = "SELECT nid FROM {uc_product_stock} WHERE sku = '%s' AND nid = '%s' AND stock <= 0";to
$sql = "SELECT nid FROM {uc_product_stock} WHERE sku = '%s' AND nid = '%s' AND stock < 0";It's a bit hacky, but it works for me now!
Comment #2
L-four commentedThis will work,
but we really needs an admin setting to disable the out of stock message.
Comment #3
L-four commentedComment #4
stewart.adam commentedThe stock hook will be removed from uc_ajax_cart in the next release. Users who want this functionality should install a dedicated stock module that has proper support for attributes and alternate SKUs.
Comment #5
stewart.adam commentedThis fix has been committed, and the stock check will be removed in the next stable release. For the ambitious ones who want it now, check out the latest dev!