First, please make the one change in the one function zen_check_stock and see if that fixes everything everywhere ... and ensure the checkout is working ...
First, please make the one change in the one function zen_check_stock and see if that fixes everything everywhere ... and ensure the checkout is working ...
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!
Sorry, I had written a longer post and then censored myself for being wordy.
Yes, that is what I did. Works fine for everything to do with the cart and checkout. So, yes, that is a nicer solution than changing the header_php files. But doesn't solve any issues that those changes didn't.
Where it doesn't work by itself is in product_info.
Also, as I say it marks multiple products out of stock when only some of them are actually out of stock. Which ones should actually be marked out of stock is a bit moot.
Nick
iszent.com
Have you an URL on your site where we can perhaps see this working or not working as you are wanting it to?
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!
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.
Nick
iszent.com
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!]
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!
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:-)
Nick
iszent.com
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!]
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!