Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Out of Stock When Placing Order - IS Checking by Product and Attribute.

    sure. it is really just a clean install but you can have a look at http://clean.nickcollie.com/index.ph...&products_id=7

    The stock level on that item is 1.

    1. Put something in the text attribute ( or actually any of the attributes ) and add to cart.
    2. It will show in stock.
    3. Add the same product to the cart again but with a different variation.
    4. Now both show out of stock.
    5. Now go back to the product info page. It shows 1 in the cart.

  2. #22
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Out of Stock When Placing Order - IS Checking by Product and Attribute.

    Do exactly what you said, now try this ...

    Change the quantity of one of the 2 Products in the cart to 3 ...

    Click on the link in the cart for that Product and you will see 3 ...

    Go back to the Cart and click on the other Product and you will see 1 ...

    Now, click the NEXT button then the Previous button back to the Product, and you will see nothing ...

    So, you appear not to like how the default code works, and you will find that your custom code does not work either for all of these conditions ...

    So the question is ... very specifically, and type slow as I am old ... how do you want this to work based on these conditions ...
    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: v1.5.5]
    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!

  3. #23
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Out of Stock When Placing Order - IS Checking by Product and Attribute.

    OK. I understand what you are saying. I have had this conversation both on the forum and off the forum about what the correct behaviour actually is.

    But...

    Do what you said and then navigate to the product in a way other than coming from the cart. The amount shown in the 'quantity in cart' is 0. This seems pretty buggy to me ( but one person's buggy is another person's feature ). Imagine I sell bracelets and they are engraved. I put three bracelets in the cart with the names of my children on them. Then I go and look at some other stuff and then I go back to buy another bracelet with my wife's name on it. The store will tell me I don't have any in the cart. That seems wrong to me.

    Also, even if I do return to the product_info page by the link in the shopping cart, the 'quantity in cart' is dependent on those attributes . Most probably once back on the page I am going to select different attributes before adding another product. ( If not I would probably just update in the cart ) At which point having a 'quantity in cart' that is dependent on the link that I have clicked to get to the page is quite strange. In fact that last sentence sum up why I think that this behaviour is wrong. Having a 'quantity in cart' that is dependent on the link that I have clicked to get to the page is quite strange.

    If the code in post #16 is used then it will tell me that I have three in the cart. That seems correct to me.

    But, you know, I was just reporting something that seemed strange to me rather than complaining. If this is just the way that Zen works then that is fine. I understand the logic.

    Secondly, and again this is something that I have discussed with others and think is moot, if there is a stock of one bracelet and I put the first one in the cart it will show as in stock. That, of course is fine. I then put the second bracelet in the cart and suddenly both are out of stock (with the alterations that you have suggested to the code above ). That seems wrong because it is misleading.

    Again I can see the logic but having mulled it over I think that a stock check that is dependent on where in the cart the product is makes more sense. Others seem to agree. I don't expect that when I add a product to the cart it changes the other products already in the cart.

    As I say. These are not complaints or demands for changes. And I suspect I am just as old as you :-)
    Last edited by niccol; 5 Jun 2012 at 09:24 PM. Reason: inaccuracy:-)

  4. #24
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Out of Stock When Placing Order - IS Checking by Product and Attribute.

    Does this give you a better quantity for your needs?
    Code:
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart_check('products_id', (int)$_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->in_cart_check('products_id', (int)$_GET['products_id']) . '</p>' : '');
    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: v1.5.5]
    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!

  5. #25
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Out of Stock When Placing Order - IS Checking by Product and Attribute.

    Yes, thank you. That and the code in post 16 give a total in the cart rather than a per attribute count. That seems better to me.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Requiring some text (attribute) when placing order...
    By rebekah in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 12 Dec 2011, 09:11 AM
  2. Stock by Attribute setup and product has stock when added to card says out of stock
    By kwrosenzweig in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Jun 2011, 06:18 PM
  3. error when checking out with stock by attribute mod
    By zoaconner in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 Feb 2010, 07:02 AM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR