If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / My store is allowing checkout when out of stock

My store is allowing checkout when out of stock

Started by twinstead on 24 Oct 2007, 6:07 PM · Views: 7,882

Results 1 to 20 of 21
24 Oct 2007, 6:07 PM
#1
twinstead avatar

twinstead

New Zenner

Join Date:
Aug 2007
Posts:
7
Plugin Contributions:
0

Post #1 by twinstead

Yes, another noob. I have the stock by attributes mod installed.

I have the following settings in the stock portion of the admin:

Check stock level true
Subtract stock true
Allow Checkout false
Mark product out of stock ***
Stock Re-order level 5
Show available stock level in cart when less than order false
Products status in Catalog when out of stock should be set to 1
Show Sold Out Image in place of Add to Cart 1
Product Quantity Decimals 0
Show Shopping Cart - Delete Checkboxes or Delete Button 3
Show Shopping Cart - Update Cart Button Location 3

But when I checkout after selecting an item with more than on hand, a bright red notice says:

Products marked with *** are out of stock or there are not enough in stock to fill your order.Please change the quantity of products marked with (***). Thank you

In the shopping cart screen, which is cool, but zencart still allows me to press the
goto checkout button and continue the checkout process, even though the product is out of stock.

What am I doing wrong?

24 Oct 2007, 6:28 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,758
Plugin Contributions:
0

Post #2 by Kim

If you were not using the stock by attributes does it work properly?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Oct 2007, 6:54 PM
#3
twinstead avatar

twinstead

New Zenner

Join Date:
Aug 2007
Posts:
7
Plugin Contributions:
0

Post #3 by twinstead

Kim:

If you were not using the stock by attributes does it work properly?

To be honest, I don't remember. I don't know how much testing I did before I installed the stock by attributes, because the way my products work I needed it right away.

Until I can truly prevent a checkout when an item is out of stock I can't go live :(

24 Oct 2007, 7:02 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,758
Plugin Contributions:
0

Post #4 by Kim

I don't believe the attribute stock can do what you want. You may want to look through other threads about the module.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

25 Oct 2007, 3:04 PM
#5
twinstead avatar

twinstead

New Zenner

Join Date:
Aug 2007
Posts:
7
Plugin Contributions:
0

Post #5 by twinstead

I'm not sure if it is an issue with the stock by attribute mod or not.

Even on stock that I don't have any attributes set, when I have the flag to not allow checkout when an item is out of stock it notifies me when it is out of stock but still allows both the 'checkout' button and the paypal one to be pressed.

Now I have no idea what to do.

8 Aug 2008, 5:17 AM
#6
b_unlimited avatar

b_unlimited

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Post #6 by b_unlimited

This is happening to me too and is really frustrating! I didn't find this out until we had products that were paid for that don't exist! Someone please help!

12 Aug 2008, 4:15 PM
#7
acplester16 avatar

acplester16

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Post #7 by acplester16

B-Unlimited:

This is happening to me too and is really frustrating! I didn't find this out until we had products that were paid for that don't exist! Someone please help!

I have had exactly the same problem this afternoon. Have you found a solution yet?

14 Jul 2009, 6:42 PM
#8
echotasha avatar

echotasha

New Zenner

Join Date:
Dec 2008
Location:
Edmonton, AB
Posts:
12
Plugin Contributions:
0

Post #8 by echotasha

I'm sorry to resurrect an old thread, but I have the exact opposite problem. I have installed the stock by attributes contribution and it WAS working perfectly. Now, even though there is stock available, it will not allow checkout.

My settings are exactly as below. Maybe I am missing some other setting somewhere else in admin?

twinstead:

I have the following settings in the stock portion of the admin:

Check stock level true
Subtract stock true
Allow Checkout false
Mark product out of stock ***
Stock Re-order level 5
Show available stock level in cart when less than order false
Products status in Catalog when out of stock should be set to 1
Show Sold Out Image in place of Add to Cart 1
Product Quantity Decimals 0
Show Shopping Cart - Delete Checkboxes or Delete Button 3
Show Shopping Cart - Update Cart Button Location 3

But when I checkout after selecting an item with more than on hand, a bright red notice says:

Products marked with *** are out of stock or there are not enough in stock to fill your order.Please change the quantity of products marked with (***). Thank you

1 Dec 2010, 1:31 AM
#9
david_johns avatar

david_johns

New Zenner

Join Date:
Mar 2010
Posts:
5
Plugin Contributions:
0

Post #9 by david_johns

I was able to fix this problem in my store by modifying a line in \includes\modules\pages\checkout_shipping\header_php.php. For some reason my file had:

      if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
        zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
        break;
      }

when it needed to be:

      if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes)) {
        zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
        break;
      }

I hope it helps someone.

13 Jan 2011, 11:24 PM
#10
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Post #10 by chrisd24

david_johns:

I was able to fix this problem in my store by modifying a line in \includes\modules\pages\checkout_shipping\header_php.php. For some reason my file had:

  if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    break;
  }
> 
> when it needed to be:
> 
> ```
      if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes)) {
        zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
        break;
      }

I hope it helps someone.

Did this work for anyone? It looks like this was applied to an updated version of the mod but I am still seeing this problem. Everything else seems to be working perfectly.

22 Sep 2013, 11:54 PM
#11
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Post #11 by chargin

Ancient thread I know but Im also having this problem...

23 Sep 2013, 12:05 AM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #12 by ajeh

What are your settings in the Configuration ... Stock ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2013, 10:26 PM
#13
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Post #13 by chargin

Hi Ajeh, thanks for popping in here.
Sorry when I say Im having the same problem I mean that I do have the stock setting set correctly and Im using stock by attributes.

Heres the settings:

Check stock level true
Subtract stock true Info
Allow Checkout false Info
Mark product out of stock "Out of stock" Info
Stock Re-order level 5 Info
Show available stock level in cart when less than order true

But you can still checkout. Its 1.39h and I checked the code presented earlier as a fix and that is already there.
When checking out, you do get the message saying there is no stock of this item, but some people will still keep going and make the order.

23 Sep 2013, 11:06 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #14 by ajeh

And if you switch to the Classic Template ... can you still checkout with too much in stock?

Based on your settings, it should be stopping you ...

Is this a clean install of v1.3.9h or an upgrade?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Sep 2013, 1:08 AM
#15
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Post #15 by chargin

Ill try that late tonight when there aren't too many customers on.
Yes its a fresh install.

24 Sep 2013, 1:13 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #16 by ajeh

Could you also go to phpMyAdmin and search the table:
configuration

for the field:
configuration_key

with the value of:
STOCK_ALLOW_CHECKOUT

How many records do you have for this and what is in the field:
configuration_value

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

25 Sep 2013, 1:51 AM
#17
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Post #17 by chargin

Theres one field I can see thats labeled STOCK_ALLOW_CHECKOUT
Heres what it has-

228 Allow Checkout STOCK_ALLOW_CHECKOUT false

I didnt get a chance to switch the theme last night but will do it tonight.
I presume the above setting is correct?

26 Sep 2013, 3:22 AM
#18
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Post #18 by chargin

Well tried classic green theme and I couldnt checkout.
So switched back and now it seems to be fixed on the theme we are using.
Perhaps that fixed it I dont know. I know switching themes in wordpress sometimes fixes things too...

26 Sep 2013, 3:26 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #19 by ajeh

That should not of actually fixed things ... but keep an eye on it and see if it breaks again ... sppokie ... :blink:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jul 2015, 2:36 PM
#20
mauari avatar

mauari

New Zenner

Join Date:
May 2011
Posts:
67
Plugin Contributions:
4

Post #20 by mauari

what happen when I have a product with several attributes... ej. Christmas balls with several attributes...
A customer want 5 one box of each color.. blue, red, green, pink and gold..
look like if one attribute color is missing (deleted) after the products added to the cart ALL 5 Box is deleted, not only the color missing..
By the way... if customer want 5 box one o each color, and one color is sold out you dont sell nothing... and would sell 4.

to solve this just change in includes/classes the file shopping_cart.php
around the line 1270
$_SESSION['cart_errors'] .= ERROR_PRODUCT_ATTRIBUTES . $chk_products_link . ERROR_PRODUCT_STATUS_SHOPPING_CART_ATTRIBUTES . '<br />';
$this->remove($attributes_id); //<-------------- Change $products_Id for $attributes_id
break;