Guest Posted July 2, 2003 Posted July 2, 2003 which version are u using?? I used QTPro_2.1-stockcontrol.zip and it works fine. I'm using http://www.msu.edu/~sloughwi/QTPro_2.1.zip . Is the version you're using the one from the contributions section? I've had to add the code to my existing file, rather than upload the files whole, because of all the other mods. I've obviously missed something somewhere, but where should I look & what for?
usmanaa Posted July 2, 2003 Posted July 2, 2003 if u want i can post the code for product_info page here, but i don;t know why u can;t add to your cart
Guest Posted July 2, 2003 Posted July 2, 2003 product info is fine, just in checkout_shipping the continue button takes you back to the cart contents! :cry:
Guest Posted July 2, 2003 Posted July 2, 2003 product info is fine, just in checkout_shipping the continue button takes you back to the cart contents! :cry: checkout_shipping text
usmanaa Posted July 2, 2003 Posted July 2, 2003 hi in the checkout_shipping.php file there is only one place which redirects you to the shopping cart and that is : if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL')); } which means that it thinks there is nothing in the basket!! not sure why it;s doing that - what chnages u done laterly??
Guest Posted July 2, 2003 Posted July 2, 2003 It must be something to do with the qtpro code, since it only happens when a product with attributes has one of those attributes out of stock. Products with no attributes, or where all the attributes are in stock, are fine. :?
freezehell Posted July 2, 2003 Posted July 2, 2003 freerangemum, Did you disable out of stock checkout? If you did, then oscommerce will redirect back to shopping cart if any stock is out of stock. In admin, double check the stock section and make sure "allow out of stock checkout is set to true". Still need help, cant deduct product_stock table when multiple attributes exist, for example a T-shirt with size and color attributes. Also in checkout_confirmation.php, check stock also doesnt work. Expert out there, please help ..help .. HINT: problem seems to be around matching the multiple attributes. Cant find any match during query...
Guest Posted July 3, 2003 Posted July 3, 2003 freerangemum, Did you disable out of stock checkout? If you did, then oscommerce will redirect back to shopping cart if any stock is out of stock. In admin, double check the stock section and make sure "allow out of stock checkout is set to true". I can't do that, since many of my products are limited runs. I need to make sure out of stock products aren't sold. Surely if the qtpro contrib is operating correctly it would allow checkout for example with a size large, even if the mediums are out of stock?
freezehell Posted July 3, 2003 Posted July 3, 2003 If i understood your problem right, then if outofstock checkout is disabled, all items in the cart must be in stock to be able to checkout. If one of the items is out of stock, it will redirect back to shopping cart so that the user can either update or remove the item. In qtpro, this is working fine. Check my site out, http://wire.homeip.net:8880/catalog Add 2 different sizes kungfu uniforms to the cart, for e.g. one size S and one size M. Update one of them to quantity 6 so that it appears out of stock. So naturally, when you try to check, it will redirect back to shopping cart. If both r in stock, it allows checkout.
burt Posted July 3, 2003 Posted July 3, 2003 I have not looked at the QTPro contribution for a while, as I did not want to install it as it looked too complicated. I have a different idea, to achieve the same result: 1) When setting up your product attributes, give each one an integer value equal to the number of those attributes you have in stock. 2) In product_info.php amend the sql that makes the attribute dropdowns to only select attributes if they have an integer value greater than zero. 3) In the checkout procedure decrease the attribute integer value by however many attributes have been purchased. 4) When it is decreased, it will eventually get to zero, meaning all those atributes have been purchased. 5) When it gets to a low amount, send the Store Owner a warning email. 6) The Store can then get more attributes from his supplier, or can let the attribute quantity fall to zero. 7) When it is at zero, it will not show in the attribute dropdown, and will therefore be unavailable to be purchased. 8) Code up a quick admin section to allow to add integer quantity_available to the attributes. Done. Thoughts???
Guest Posted July 4, 2003 Posted July 4, 2003 Burt, yes that seems straightforward - something like an extra field in Linda's attribute contrib. Less hassle than stock buttons! But its #3 that gives me the problems. I don't understand how the stock updating works. I've already got through several pounds of chocolate trying to figure it out, so any pointers would be very much appreciated. :lol: freezehell, I don't think i'm explaining the problem very well? Say I have a product in size small, med & large. Stock is small 3, med 2, large 0(ie out of stock) Customer want to buy 1 small - it won't checkout & loops back to the basket. But with stock as small 3, med 2, large 1; checkout works fine - customer can buy 1 small. The stock level check works fine up to that point - large is not shown as an option in the product info, & customers cannot add more of a size to the basket than are available, but it will not checkout if one of the attributes is out of stock, even though it is not the one the customer wants to buy. Is that any better explained?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.