PhaseClone Posted June 20, 2013 Share Posted June 20, 2013 @PhaseClone Nope, I'm wrong about what I just posted as a problem. It's not a problem, except for some of my items some of the time. They appear to have gotten their colors and sizes transposed on the stock display table and the menu. Quote Link to comment Share on other sites More sharing options...
PhaseClone Posted July 2, 2013 Share Posted July 2, 2013 @@twigster try this: edit your pad_base.php file: FIND: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); REPLACE WITH: // Begin QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13 $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id"); /* $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); */ // End QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13 The old code is still preserved in the system for you to restore if you need. Please note, this sorts the options by ID, so the order you put them into osCommerce becomes the order that osCommerce displays them. twigster 1 Quote Link to comment Share on other sites More sharing options...
Serghino Posted July 8, 2013 Share Posted July 8, 2013 Most of time I'm able to solve issues but in this case I realy cannot figure out what is wrong. I have Qtpro for Osc2.3 installed and are having problems with updating stock. To make it more interesting: I can update stock from my own internet connection, from any device but when connected to any other internet option/location with any device (even devices used on my own network on which it works) I get the below error. This happens on 2 website (same domain); One is OSC 2.2, the other 2.3.3...both on PHP 5.2. Warning: sort() expects parameter 1 to be array, null given in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 69 Warning: join() [function.join]: Invalid arguments passed in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 70 Above resulting in messy rows in the products_stock db. if ($HTTP_SERVER_VARS['REQUEST_METHOD']=="GET") { $VARS=$_GET; } else { $VARS=$_POST; } if ($VARS['action']=="Add") { $inputok = true; if (!(is_numeric($VARS['product_id']) and ($VARS['product_id']==(int)$VARS['product_id']))) $inputok = false; while(list($v1,$v2)=each($VARS)) { if (preg_match("/^option(\d+)$/",$v1,$m1)) { if (is_numeric($v2) and ($v2==(int)$v2)) $val_array[]=$m1[1]."-".$v2; else $inputok = false; } } if (!(is_numeric($VARS['quantity']) and ($VARS['quantity']==(int)$VARS['quantity']))) $inputok = false; if (($inputok)) { sort($val_array, SORT_NUMERIC); $val=join(",",$val_array); The last 2 lines above are 69 and 70. Does anyone have any idea what the issue could be? Quote Link to comment Share on other sites More sharing options...
pheludar Posted July 23, 2013 Share Posted July 23, 2013 Hi Iam having a problem as follows: i was trying to install tghe jax update price module and saw that the relevant codes are removed by this module in product_info,php basically if someone selects 4mb 50.00 / 8mb 200.00 then the product price should get updated in this page withe the resepctive values getting added to the product price. how can i get this? Quote Link to comment Share on other sites More sharing options...
twigster Posted August 15, 2013 Share Posted August 15, 2013 @@twigster I know from looking at pad_multiple_dropdowns that the system loops through individual queries to build a set of results (see my recent post). Each query it runs is just ONE combination of attributes, like "RED / SMALL," so I'm guessing the only way to influence the ordering of the options would be to figure out a way to get the option sort column into a query of all the options before you run anything else. Then you would need to use "ORDER BY" in SQL to control sorting order. Then you would run a "for..next" loop covering the range of numbers covered in your sort column. Then on each loop, you could add the sort column's value to the "WHERE" clause of the query, getting you the rows in order. Unfortunately, since I'm so new to this, I can't tell you exactly how you're going to do that, but if you know some SQL, you should be able to get it. @@twigster try this: edit your pad_base.php file: FIND: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); REPLACE WITH: // Begin QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13 $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id"); /* $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); */ // End QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13 The old code is still preserved in the system for you to restore if you need. Please note, this sorts the options by ID, so the order you put them into osCommerce becomes the order that osCommerce displays them. I originally used an asort(); function to order the attributes in the pad_single_radioset.php which worked ok. However, the pad_base update above works perfectly for both radio buttons and drop downs no need for the asort() thanks PhaseClone top notch answer :) Quote Link to comment Share on other sites More sharing options...
satinwoods Posted September 15, 2013 Share Posted September 15, 2013 This is a great mod and works great for me. I would like one option though. When I add a new attribute, I would like to have it default the quantity to 1. Is there anyway for me to do this? Quote Link to comment Share on other sites More sharing options...
vourlismenos Posted October 13, 2013 Share Posted October 13, 2013 I'm using qtpro with oscommerce 2.3 (and ajax attribute manager) Everything works fine, but in case I delete an order, the "restock product" option is not working. The product remains "not published" Also when I receive the order and go to the "orders" in the admin side, I get a qtpro warning "Warning: There are 1 sick products in the database. Please visit the QTPro doctor." related to the product that is ordered If I go to the qtpro doctor I get this: The stock quantity summary is NOT ok This means that the current summary of this products quantity, which is in the database, isn't the value we get if we calculates it from scratch right now. The current summary stock is: 0 If we calculates it we get: 1 The options stock is ok This means that the database entries for this product looks the way they should. No options are missing in any row. No option exist in any row where it should not. Total number of stock entries this product has: 1 Number of messy entries: 0 The attribute quantity remains for some reason? I suppose that both problems are related because when I delete the order, the qtpro warning dissapears but the product remains out of stock and stays unpublished Have I missed something in the installation or is there something else wrong? Any ideas? Quote Link to comment Share on other sites More sharing options...
misfitsbodypiercing Posted October 14, 2013 Share Posted October 14, 2013 I've put QTpro addon on, and im testing with one product - but i can't seem to set individual quantities on the osCommerce admin - and i also can't see the actual product on my page www.misifitsbodypiercing.co.uk/catalog anyone help? Quote Link to comment Share on other sites More sharing options...
gasan Posted October 23, 2013 Share Posted October 23, 2013 (edited) I am running 2.3.3.4 and have installed QTPro 4.6.1. All works fine but options of products appears twice. The second "option" works fine. How can I solve this issue? Here is how it looks: Edited October 23, 2013 by gasan Quote Link to comment Share on other sites More sharing options...
Miroku Posted October 25, 2013 Share Posted October 25, 2013 Hi guys, I have installed QTpro 4.6.1 on OsCommerce 2.3. I add attributes with stock to a specific product with success. The problem occurs when i delete those attributes. The options are still shown in the stocks table in product_info.php although i deleted everything in admin/products attributes and admin/stocks. Any ideas? Quote Link to comment Share on other sites More sharing options...
satinwoods Posted November 4, 2013 Share Posted November 4, 2013 My attributes in the drop down are not sorting. http://strutfashion.ca/product_info.php?cPath=26&products_id=193 As you can see they're not in any order. Just in what order I added them. I can't seem to figure it out! Quote Link to comment Share on other sites More sharing options...
vourlismenos Posted November 12, 2013 Share Posted November 12, 2013 I see lot's of people have the same problem, with the attribute stock not subtracting while the actual stock does... no definite solutions? Quote Link to comment Share on other sites More sharing options...
satinwoods Posted November 27, 2013 Share Posted November 27, 2013 In qtpro_stock_table.php Here is the original $products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa WHERE pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); What I would like it to do is $products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, pa.products_options_values_name FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa WHERE pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'. ORDER BY pa.products_options_values_name"); I'm not getting any errors, but its also not doing anything. Help? Quote Link to comment Share on other sites More sharing options...
sinkerslingers Posted December 8, 2013 Share Posted December 8, 2013 (edited) I am having problems with the SQL portion of this add on and hope someone can help me since my web host cannot. I cannot get the SQL file to import and I do not know what I am doing wrong. I tried to do the SQL 1st, before the files, my web host was not able to import the file, the file is "incomplete". I don't see that as being the case if you are all using it. When I first tried to import using import, it gave me an error. No table. Then I located a quary window that would take the copy and paste, it came back with lots of additional comments that tables did not exist. My host said to use FTP and upload the file and they would install. So I installed FileZilla on my computer, uploaded the SQL file to that. Still error messages. I then uploaded the PHP files to FileManager on my host. My host has attempted to import the SQL again and still has an error. They keep telling me I need a new SQL file. Can someone who has successfully imported the SQL please help me? I think I can finish once I get past this hurdle. Thank you, Jennifer Edited December 8, 2013 by sinkerslingers Quote Link to comment Share on other sites More sharing options...
sinkerslingers Posted December 11, 2013 Share Posted December 11, 2013 I am going to put this out there and hopefully someone can help me fix this. I have osCommrce 2.3.3 that I had previously installed add on sort_product_options_v1.1.0. I liked how this moved my options to the product page for adding. I then tried adding QTPro v4.6.1. I wanted to track stock for some of the more difficult products we manufacture. I had the product.info.php error but my host seems to have fixed it for me and now I can see my product pages again. However, my options are now gone. I am not finding them on the product add page or in the admin section. I had 19 products with different quantities for options. Now these products lost the options. Any help is appreciated. Jennifer Quote Link to comment Share on other sites More sharing options...
PixelatedPanda Posted January 17, 2014 Share Posted January 17, 2014 Hello Everyone, I've got an issue that I just can't seem to track down. I've installed QTPro 2.3.1 into osCommerce Online Merchant v2.3.3.4 as per http://addons.oscommerce.com/info/7786 using instructions contained. The problem is that when I click on catalog > products attributes I just get a blank screen with no error messages or warnings. I've restored the products_attributes.php from the install file and replaced it, re-edited again as per the instructions just in case I'd done something wrong and the same is happening again. I don't know if this is relevant but when I paste the code from Step 11.3 into dreamweaver, it says there are a lot of syntax errors. Anyone any ideas please? Thanks Quote Link to comment Share on other sites More sharing options...
Serghino Posted March 18, 2014 Share Posted March 18, 2014 Last year I posted on this topic with a question regarding being unable to update tracked stock from all "ip-addresses" except my own. Didn't get any help though. Untill not a huge problem but guess what, my provider has changed my ip and now I'm also unable to update stock from the last location I could. So in short...when updating (tracked) stock attributes...clicking "add" will give me the following error: Warning: sort() expects parameter 1 to be array, null given in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 69 Warning: join() [function.join]: Invalid arguments passed in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 70 I used to be able to update it from my internet connection at home, say ip-address 1.2.3.4 (from any device, via Wlan/Lan whatever) but not from any other location/ip-address. I suppose it has something to do with rights on the database or something but have no idea where to look for it. Especialy knowing the above ip-address part?! Specs about the hosting and website OSC 2.3.3 PHP 5.2 Mysql 5 I will be trying to run the site in a VM localy to see if the issue will still be there. I hope someone had the same issue and solved it...Please help me? Quote Link to comment Share on other sites More sharing options...
rwood Posted March 31, 2014 Share Posted March 31, 2014 (edited) Is this addon still being supported? I can't get it to work, and I've spent the entire weekend working on it. My problem: Following this install instruction for Qtpro 4.6. for oscommerce 2.3.1: admin/categories.php Find require('includes/application_top.php'); Add Beneath: //++++ QT Pro: Begin Added code //Create the product investigation for this product that are used in this page. $product_investigation = qtpro_doctor_investigate_product($HTTP_GET_VARS['pID']); //++++ QT Pro: End Added code Causes Admin to crash with a blank page. It generates this error message in the error log: PHP Fatal error: Call to undefined function qtpro_doctor_investigate_product() in /home/citywhee/public_html/dev/admin/stock.php on line 128 It looks like it should be reading the definition of the function in admin/includes/functions: require('includes/functions/qtpro_functions.php'); But there is no line of code telling it to do so. Can anybody help? Thanks, Rob Edited March 31, 2014 by rwood Quote Link to comment Share on other sites More sharing options...
rwood Posted March 31, 2014 Share Posted March 31, 2014 Cancel my request! I got it working - all but the PayPal Express token retrieval - it fails to get it, and therefore fails at checkout. Anybody have any ideas? Thanks! Rob Quote Link to comment Share on other sites More sharing options...
rwood Posted March 31, 2014 Share Posted March 31, 2014 Nevermind. I found the culprit that was causing blank pages at login, registration, and checkout through PayPal Express. There's a conflict in the "Who's Online" code and QTPro. I commented out the calls to it, and everything works now. Rob Quote Link to comment Share on other sites More sharing options...
rwood Posted April 2, 2014 Share Posted April 2, 2014 I have completed the installation of QTpro, and it works beautifully. There is only one small irritating issue left. When setting sizes and quantities, typing in the quantity and clicking the Add button loads the Admin login page, every time. Has anyone else experienced this, and found a fix for it? Quote Link to comment Share on other sites More sharing options...
rwood Posted April 3, 2014 Share Posted April 3, 2014 Nevermind - I had a trailing / after the URL in admin/includes/configure.php. This caused the URL of the ADD action to add another /, which caused a new session instance each time the attribute inventory was modified. It all works perfectly now! If anybody needs help with this addon, let me know. Rob Wood Quote Link to comment Share on other sites More sharing options...
kepbem Posted April 11, 2014 Share Posted April 11, 2014 Hi I have gone through the instructions to add this to a recent oscommerce install 2.3.3.4, This is the second time as I don't seem to be getting it to work correctly, I don't seem to get any other options or the track stock tick box. now with the second attempt I am recieveing an error - Parse error: syntax error, unexpected '';' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /homepages/14/blanked/htdocs/blanked/products_attributes.php on line 292 If anyone could help me I would greatly appreciate it Quote Link to comment Share on other sites More sharing options...
satinwoods Posted May 5, 2014 Share Posted May 5, 2014 (edited) Hi there. I just updated to the latest file and the stock.php was suppose to sort the attributes alphabetically, but it hasn't worked. //$q=tep_db_query("select * from " . TABLE_PRODUCTS_STOCK . " where products_id=" . $VARS['product_id'] . " order by products_stock_attributes"); //sorting below goes by name rather than products_stock_attributes. Much easier to have it all sorted alphabetically $q=tep_db_query("select ps. products_stock_id, ps.products_id, ps.products_stock_attributes, ps.products_stock_quantity, pov.products_options_values_id, pov.language_id, pov.products_options_values_name from " . TABLE_PRODUCTS_STOCK . " ps, products_options_values pov where ps.products_id=" . $VARS['product_id'] . " and pov.products_options_values_id = substring_index(ps.products_stock_attributes, '-', -1) order by pov.products_options_values_name asc"); It's not working and I'm lost as to what to do. Suggestions? The other problem I'm having is when people buy something from PayPal, sometimes the stock is taken out and sometimes it doesn't. I haven't been able to find anything connecting the problem. Anyone have a similar problem? Edited May 5, 2014 by satinwoods Quote Link to comment Share on other sites More sharing options...
satinwoods Posted May 11, 2014 Share Posted May 11, 2014 I've tracked down the sort to this line $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); I just need to get this to sort properly. Quote Link to comment Share on other sites More sharing options...
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.