mijman2 Posted August 9, 2004 Posted August 9, 2004 Can you post and updated Qtpro 3... say qtrpro 3.1? Does it tell you if the attribute option is in stock or out of stock with multiple attributes? Quote
Jassa Posted August 9, 2004 Posted August 9, 2004 Hi QTPro does support multiple attributes as far as I know. However I tried to use QTPro3.0 but I know that the SQL provided is not correct the table to be created is wrong and will give errors within product_info.php etc. So I played with it and got it working finally. Have to say that QTPro2.3update worked straight off! So personally I would recommend that. Must also say that any time spent on this contribution is 110% usefull. Very good code and functionality. Thanks JAS Quote
mijman2 Posted August 9, 2004 Posted August 9, 2004 Right but 2.3 doesnt support multiple attributes.. (it says that all of them are out of stock i think...) Quote
jpool Posted August 17, 2004 Posted August 17, 2004 I m changing a few things in the code of your contrib and I wonder why you put the stock in products_stock instead of in products_attributes? Is it only to save space and separate things or is there any other reason? Would be great to know J. Quote
TomThumb Posted August 17, 2004 Posted August 17, 2004 It is basic relational database design. Here is a example, some columns have been omitted for simplicity. table_products_options options_id size = 1 color = 2 table_products_options_values options_values small = 1 medium = 2 large = 3 red = 1 green = 2 blue = 3 table_products_attributes products_id option_id options_values 12 1 3 12 2 1 This is how we assign Large, Red to product 12. If we put stock in the product attributes table we will have to update two rows on every transaction. As more options and values are added it becomes much more transaction intensive. Quote while (!succeed) {try()}; GMT -6:00
jpool Posted August 18, 2004 Posted August 18, 2004 Sure that s what I though but should you have a stock count for every option after all? (not if you have red available only in large and blue available in medium and large) right? Anyway I m using only one option ( is really all I need) I figured how to go on about it. What I m doing is a very small mod to update stock count and price using a file of course this is done already with easy populate. but what about all the options? the file has this structure Model | Qtty | Price 12-Red | 2 | $12 12-Blue | 1 | $12 in the shopping cart i only have 12 as a model number so I need to add an extra column product model for each of the options I wont look at the price for the products that have options because the options have all the same values SO i think that i will automatically create a model number 12-name of the option and then i ll have to modify it by hand (once) and then it s all easy Does this makes sense? J. Quote
thinguy Posted August 20, 2004 Posted August 20, 2004 Jassa if I understand you're earlier post you were getting the "Table 'orders_products_attributes' already exists" error message with 3.0 also. Can you describe how you fixed it please? Thanks Quote
mijman2 Posted September 4, 2004 Posted September 4, 2004 I have noticed a small bug in this attribute... When checking out while products are out of stock, on the last part were it shows you your order, and has the *** if things are out of stock, it doesnt show out of stock attributes. Only if the product is Completely sold out, or if any of the attributes have stock left... Quote
buljong Posted September 8, 2004 Posted September 8, 2004 I am not sure if i did something wrong during install, or i am clashing with another attribute or it is a bug. But I thought i'd ask around before I start sifting through the code. On my site the costomer can succesfully buy products that are marked 'out of stock' on the products_info page. (Sure most people would not choose a product marked out of stock - but it is possible!) Can anyone help with this? Quote
buljong Posted September 8, 2004 Posted September 8, 2004 Ok, I have worked out the problem but again request anyone who may have put a fix in here already to let me know before I try and do it. There are two bugs related to each other: 1. If you have only one attribute left and try to change it to 0 to remove it (so no attributes have stock you get the following: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where products_id=46' at line 1 update products set products_quantity= where products_id=46 [TEP STOP] 2. I think the above error is tied into the other bug which relates to changing to stock quantities. If you manually change a stock attributes quantity to 0, it actually disappears the first time. If you choose that attribute again and type ?0 and click ?add? the attribute returns marked with a ?0?. You can keep doing this and every second time you change the stock attribute quantity to 0, it marks the product stock as 0, the other time it does not list the product attribute at all. The problem is this: when it is actually marked with a '0' it will show out of stock on the catalog and shopping cart but when the attribute is not shown at all it will only show ?out of stock? on products info page drop down menu but does not show the red ?out of stock? warning on the shopping cart. Anybody encountered this before and fixed the problem? Quote
rockstar_clothing Posted September 15, 2004 Posted September 15, 2004 Hi, I've just noticed that you cannot remove stock levels for an atribute once you have added them. Say I amke a mistake and add three small tshirts instead of 2, what do i do? Im sure this is just a simple mod to make to sort this out. Really hope someone can help!!!!??? Cheers, Adam Quote
TomThumb Posted September 15, 2004 Posted September 15, 2004 In Admin, Contents, Select the product, click on the stock button, select the appropriate option from the drop down, small in your example. Enter the correct quantity and click the Total button. This is the same procedure you use to update the inventory when you get new product. Quote while (!succeed) {try()}; GMT -6:00
mijman2 Posted September 15, 2004 Posted September 15, 2004 Hi Tom, Ive noticed on my latest product the 4G exoFlp (www.ipodxtras.com), that when the order is placed, the attributes order they appear is random... (there are 3 attributes) Quote
mijman2 Posted September 19, 2004 Posted September 19, 2004 Ive had a minor emergancy :'( ... I set stock levels for this product (they were actual numbers now set as 0 as shown below)... I tried to add them to my cart and they showed as out of stock (when there was indeed quanity shown in Admin... Here is what the stock page looks like... I am not sure why it looks like this... PLEASE HELP!!! Quote
TomThumb Posted September 20, 2004 Posted September 20, 2004 1. Does line 142 - 163 in stock.php look like this? $q=tep_db_query("select * from products_stock where products_id=$product_id order by products_stock_attributes"); while($rec=tep_db_fetch_array($q)) { $val_array=explode(",",$rec[products_stock_attributes]); echo "<tr>"; foreach($val_array as $val) { if (preg_match("/^(\d+)-(\d+)$/",$val,$m1)) { echo "<td class=smalltext> ".tep_values_name($m1[2])."</td>"; } else { echo "<td> </td>"; } } for($i=0;$i<sizeof($options)-sizeof($val_array);$i++) { echo "<td> </td>"; } echo "<td class=smalltext> $rec[products_stock_quantity]</td><td> </td></tr>"; } 2. Have you deleted anything under Catalog, Product Attributes and re-added it? Quote while (!succeed) {try()}; GMT -6:00
mijman2 Posted September 20, 2004 Posted September 20, 2004 yes everything matches for # 1... For number 2... I should I use catalog product attributes to add properties to the product or should I use the table given in the product edit menu? Quote
Guest Posted September 25, 2004 Posted September 25, 2004 After installing V3.0. I'm having this problem when clicking in Back to Low Stock Report for Attributes 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select parent_id from categories where categories_id = What am I doing wrong? I tried installing from version 1.0 going trough all version and none of them seems to work. Does this thing really works? :( Quote
Guest Posted September 25, 2004 Posted September 25, 2004 Buf fixed in product_info.php //START get attribute stock values $attribute_stock_query = tep_db_query("select products_stock_quantity from products_stock where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and products_stock_attributes = '" . (int)$products_options['options_values_id'] . "'"); $attributes_stock = tep_db_fetch_array($attribute_stock_query); $option_stock = $attributes_stock['products_stock_quantity']; //END get attribute stock values Quote
Guest Posted September 27, 2004 Posted September 27, 2004 can someone tell me where to get the commercial version of this contribution? Quote
Guest Posted October 1, 2004 Posted October 1, 2004 Hi guys, I have searched this forum and not come across this problem as yet. I have installed QTPro 3 and then backwards to 2.3 and checked and cross checked the code with Beyond Compare and all seems to work fine EXCEPT when I purchase something it goes to the checkout then as it gets to the checkout payment screen it loops back to the shopping cart...yes I have downloads disabled, and yes to having allow checkout as false, check stock levels true and adjust stock levels true also. I am lost with this now, I have studied the forum and completed every task people have posted as a fix and it still loops back to the chopping cart...??? This is such a great mod and want to have it, but can't use it if it is playing up, so any ideas. Thanks guys... Jamie Quote
TomThumb Posted October 2, 2004 Posted October 2, 2004 Jamie, There are two places in checkout_payment.php that cause it redirect back to the shopping_cart page. First is around line 25 // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } Second is around line 40, make sure these are correct. // Stock Check if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) { $products = $cart->get_products(); $any_out_of_stock = 0; for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { $stock_check = tep_check_stock_new($products[$i]['id'], $products[$i]['attributes'], $products[$i]['quantity']); }else{ $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); } if ($stock_check) $any_out_of_stock = 1; } if ($any_out_of_stock == 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); break; } } Quote while (!succeed) {try()}; GMT -6:00
Guest Posted October 3, 2004 Posted October 3, 2004 Hi TomThumb, Yep that is the exact code I have also in my file...whats your thoughts now...??? Thanks heaps again TomThumb Jamie Jamie, There are two places in checkout_payment.php that cause it redirect back to the shopping_cart page. First is around line 25 // if there is nothing in the customers cart, redirect them to the shopping cart page ?if ($cart->count_contents() < 1) { ? ?tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); ?} Second is around line 40, make sure these are correct. // Stock Check ?if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) { ? ?$products = $cart->get_products(); ? ?$any_out_of_stock = 0; ? ?for ($i=0, $n=sizeof($products); $i<$n; $i++) { ? ? if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { ?$stock_check = tep_check_stock_new($products[$i]['id'], $products[$i]['attributes'], $products[$i]['quantity']); }else{ $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); } if ($stock_check) $any_out_of_stock = 1; ? ? ? ? ? } ? ?if ($any_out_of_stock == 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); ? ? ? ?break; ? ?} ?} <{POST_SNAPBACK}> Quote
mijman2 Posted October 3, 2004 Posted October 3, 2004 One small minor bug... While checkout, if allowing checkout without stock, then on the confirmation screen, the 3 red stars dont show up on out of stock product Options... Any solutions? Quote
babyarmadillo Posted October 4, 2004 Posted October 4, 2004 Can I have links to sites where I can see QTPro in action? Also, can it be used in conjunction with something which would give a 'due in x weeks' message instead of the default out-of-stock warning? I've seen mention of things which aren't in stock showing up, I actually want this to show those items so that people can order and I can buy in for them. TIA Tracy Quote
mijman2 Posted October 5, 2004 Posted October 5, 2004 www.ipodxtras.com There ya go... Let me know what you think... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.