darrenultra Posted November 29, 2008 Share Posted November 29, 2008 Thanks for the reply.You guessed correctly - I am changing the stock from the stock.php page via a link from stats_low_stock_attrib.php. I have quite a recent version of QTPro, 4.51, but I still get this problem. Therefore I doubt that upgrading will help me. I don't suppose you know how to fix this bug ...or can direct me to a page that has a fix? Nick In addition to the above I think I should clarify exactly what the problem is. When i adjust the stock level to 0 from the stock.php page the attribute no longer shows up in stats_low_stock_attrib.php. However, if the stock level is reduced to 0 naturally (i.e. as the result of a product sale), the attribute remains present in stats_low_stock_attrib.php with a correctly adjusted stock level of 0. ...so it is only when i manually adjust the stock level of an attribute that it ceases to be present in stats_low_stock_attrib.php .....hmmmmmmm Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted December 5, 2008 Share Posted December 5, 2008 How can I change where the options are displayed on the product information page? Thanks Quote Link to comment Share on other sites More sharing options...
kotaro Posted December 9, 2008 Share Posted December 9, 2008 How can I change where the options are displayed on the product information page? Thanks You just have to play around with html and css to position it the way you want it, thats what i did. Trial and error. But i also have a question. For some reason when i use sequenced dropdowns, i do not get the "First select xxx" "Next select xxx" in the drop downs. Also it shows the selection that are not in stock, but when i add them to cart it says they are out of stock. I don't want people to add things to cart just to find out they are not available. Any ideas? Quote Link to comment Share on other sites More sharing options...
kotaro Posted December 10, 2008 Share Posted December 10, 2008 Sequenced dropdowns still listing options that are not available :( Quote Link to comment Share on other sites More sharing options...
vicster Posted December 19, 2008 Share Posted December 19, 2008 I posted this on the WPP forum, but am posting here as well. Has anyone figured out how to get the attribute's stock to reduce when a purchase is made with Paypal? I am using Dynamoeffects' Website Payments Pro contribution and it does not utilize the Auto-Return or IPN options in Paypal. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 25, 2008 Share Posted December 25, 2008 in the install i have to change a few file that are drifrent then mine i am useing the MNK Edition of osc one if the files is the catalog/admin/includes/boxes/reports.php this is what my file looks like <?php /* $Id: reports.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ ?> <!-- reports //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_REPORTS, 'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports')); if ($selected_box == 'reports') { $contents[] = array('text' => tep_admin_files_boxes(FILENAME_STATS_PRODUCTS_VIEWED, BOX_REPORTS_PRODUCTS_VIEWED) . tep_admin_files_boxes(FILENAME_STATS_PRODUCTS_PURCHASED, BOX_REPORTS_PRODUCTS_PURCHASED). tep_admin_files_boxes(FILENAME_STATS_CUSTOMERS, BOX_REPORTS_ORDERS_TOTAL ). tep_admin_files_boxes(FILENAME_STATS_SALES, BOX_REPORTS_SALES )); } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- reports_eof //--> this what the install file looks like <?php /* $Id: reports.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ ?> <!-- reports //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_REPORTS, 'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports')); if ($selected_box == 'reports') { $contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_VIEWED . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_PURCHASED . '</a><br>' . //++++ QT Pro: Begin Changed code '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK_ATTRIB, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STATS_LOW_STOCK_ATTRIB . '</a>'); //++++ QT Pro: End Changed Code } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- reports_eof //--> How do i convert this to my format their are other file where this is just // outed so it is not read as code. their are a few mode i cant install because of this thanks Jeff Quote Link to comment Share on other sites More sharing options...
ajk0519 Posted December 29, 2008 Share Posted December 29, 2008 Just installed the latest QTpro and everything is working perfectly! I was wondering if there was a way to integrate a "sort attribute's order/clone attributes for products" in the admin/productinfo. I've tried using other contributions for this and got them to work on their own but can't seem to get anything working simultaneously with QTpro. Thanks in advanced! Quote Link to comment Share on other sites More sharing options...
rofo Posted January 5, 2009 Share Posted January 5, 2009 Dears,Now we use QTpro. We have size as an attribute. The sizes should always be listed in the following order S, M, L, XL, XXL. But Currently that order appears arbitrary. Would you please help to advise asap? I try to change Product Info Attribute Display Plugin setting from admin, but the size order is not difference. We need display size drop-down on product_info.php; S M L XL XXL Thanks & Best Regards, Sunrise I'm looking and trying to solve this problem to, have you found a way to do it ? Please let me know. If somebody else knows how to solve this, as you can see there are more looking for this. Thanks in advance, Rob Quote Link to comment Share on other sites More sharing options...
aftabn10 Posted January 23, 2009 Share Posted January 23, 2009 Hi, I have installed QTPro and it works really well. What I would like to do is to add the image of the product to the stats_low_stock_attrib.php within an extra column alongside the product name. Could somebody please help? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Django.1 Posted January 26, 2009 Share Posted January 26, 2009 Hello, the problem I have has been posted several times in this topic but never answered. After installing this great contri I get the "Available Options" double. So, probably the original OScommerce options menu and the QTPro menu. See picture. I've been searching for days and tried a lot changes in the product_info.php but I can't get it right. Also used Beyond compare to see the differences between my original file and the altered QTPro file but I don't know what to change. Is there anybody who can set me in the right direction. Quote Link to comment Share on other sites More sharing options...
mbi15 Posted February 26, 2009 Share Posted February 26, 2009 Hi I am new to Oscommerce and have installed QTPro on a new install of oscommerce and also added Attribute Sort, both work great. However I would like to have an option which appears forst in the list which says "Select ..." to inform the customer to select the size. I have done this but the two problem I have is that if I don't add stock to this option it shows "out of stock" beside it, which may put the customer off (I find customers can be easily confused) or if I do put in an arbitrary stock level say "1000" then "out of stock" is removed but it is listed below in the available stock, which its not really stock. Does anyone know a way around this. as I do not want to remove it as customers may not select a size and I could be faced with a lot of returns because it will default to the fist size on the list which is "small". I like the little list of what sizes are available below the Drop down list. But I do not want "out os stock" written beside the "Select ..." option, but I do need "Out of stock" to display on options which really are out of stock. Here is a link so you can see what I mean http://littlebuttons.co.nz/osctest/product...?products_id=29 Thank for any help you can offer. Quote Link to comment Share on other sites More sharing options...
reel Posted February 28, 2009 Share Posted February 28, 2009 I'm using QTPro 4.51b. Do you have a recommendation on how to sort attribute? Quote Link to comment Share on other sites More sharing options...
mbi15 Posted February 28, 2009 Share Posted February 28, 2009 I'm using QTPro 4.51b.Do you have a recommendation on how to sort attribute? Hi, I'm new to all this, but I used Products Attribute Sort Order 1.0 http://addons.oscommerce.com/info/1822 with no problems installing it after QTPro was installed, just used winmerge to compare the files etc. Quote Link to comment Share on other sites More sharing options...
daoutlawz Posted March 4, 2009 Share Posted March 4, 2009 Hi Guys, I'm new here and to OsCommerce. I've installed this for a client and all is good especially with QtPro, but one thing I don't know how to do is how do I manually adjust the quantity after adding it initially? Say I make a mistake? There is no option to update or delete the stock completely, there is only an option to add. Maybe I'm missing something? Any help would be great! Quote Link to comment Share on other sites More sharing options...
mbi15 Posted March 9, 2009 Share Posted March 9, 2009 Hi I am new to Oscommerce and have installed QTPro on a new install of oscommerce and also added Attribute Sort, both work great. However I would like to have an option which appears forst in the list which says "Select ..." to inform the customer to select the size. I have done this but the two problem I have is that if I don't add stock to this option it shows "out of stock" beside it, which may put the customer off (I find customers can be easily confused) or if I do put in an arbitrary stock level say "1000" then "out of stock" is removed but it is listed below in the available stock, which its not really stock. Does anyone know a way around this. as I do not want to remove it as customers may not select a size and I could be faced with a lot of returns because it will default to the fist size on the list which is "small". I like the little list of what sizes are available below the Drop down list. But I do not want "out os stock" written beside the "Select ..." option, but I do need "Out of stock" to display on options which really are out of stock. Here is a link so you can see what I mean http://littlebuttons.co.nz/osctest/product...?products_id=29 Thank for any help you can offer. Ok, I have hacked /includes/functions/html_output.php In Function tep_draw_pull_down_menu, before for ($i=0, $n=sizeof($values); $i<$n; $i++) { I have added $field .= '<option value="select"'; $field .= '>Please Select ...</option>'; And this seems to solve the problem, though it is a hack so use at your own risk. I am not sure which other drop down menus this will affect, but I am sure having "Please Select" won't cause too many problems. So the Function will now look like this. // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) { if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) { $default = stripslashes($HTTP_GET_VARS[$name]); } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) { $default = stripslashes($HTTP_POST_VARS[$name]); } } $field .= '<option value="select"'; $field .= '>Please Select ...</option>'; for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } Quote Link to comment Share on other sites More sharing options...
galey1981 Posted March 11, 2009 Share Posted March 11, 2009 When i delete a category in the admin area of oscommerce on my QT Pro install i get the following error on a white screen: 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 DELETE FROM products_stock WHERE products_id = [TEP STOP] The category does get deleted, but it's a niggly annoying thing. Could it be because i'm using mysql 5? Everything else works fine... Quote Link to comment Share on other sites More sharing options...
galey1981 Posted March 13, 2009 Share Posted March 13, 2009 When i delete a category in the admin area of oscommerce on my QT Pro install i get the following error on a white screen: 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 DELETE FROM products_stock WHERE products_id = [TEP STOP] The category does get deleted, but it's a niggly annoying thing. Could it be because i'm using mysql 5? Everything else works fine... I found this line of code in functions/qtpro_functions //This function will delete all option stock entries from the product. function qtpro_doctor_amputate_all_from_product($products_id){ tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id =". $products_id); } and replaced with: //This function will delete all option stock entries from the product. function qtpro_doctor_amputate_all_from_product($products_id){ tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id =" . (int)$products_id); } It didnt like the int - and i found this code by doing a find across my whole admin folder for the screwy line of code. Quote Link to comment Share on other sites More sharing options...
iStan Posted March 16, 2009 Share Posted March 16, 2009 I installed QTpro recently- the first contrib on a clean install of OSCommerce 2.2rc2a. I added a couple of other contribs- fckeditor and Canada Post module. Everything was working fine until two days ago. I use the radioset display option. Now, when I enter a new product I get an error message on the product info page: Warning: Invalid argument supplied for foreach() in /.../includes/classes/pad_base.php on line 380 Although I get this message, the product attribute choices are displayed, but as a dropdown menu. When I switch to multiple dropdowns, the product displays without the error message. All of my previously entered products still display without a problem with radioset menus. I have just done a clean install and added QTpro on a test site, and get the same problem. I strongly doubt, therefore, that I've accidentally messed up the code on my live site. Any help with this would be greatly appreciated, as I love this contrib and definitely want to be able to use it with the radioset plugin, which offers advantages over the others for this particular site. Quote Link to comment Share on other sites More sharing options...
Lgn.Magic Posted April 8, 2009 Share Posted April 8, 2009 This contribution is great, but there isn't any text for manual install. i gotta have to check every files with a prog (like mentionned in manual) to find and make my changes? No one ever done a manual instruction text with code to find and to change like in most contribution u can find?? there is so many files changed, it will take so much time to do that..and most probably ill have some error or mistake somewhere. Quote Link to comment Share on other sites More sharing options...
Lgn.Magic Posted April 22, 2009 Share Posted April 22, 2009 (edited) Ok i got it working now... But anyones has an idea of what is the echo command to call stock level? Because i'm using another Contribution to draw my table of attribut in product_info and i would like to add the stock level here....not showing the default QT pro stock table... i just need a td line like this one wich is calling attribut name <td class="main" align="center"><?php echo [u]$products_options_name['products_options_name'][/u]; ?></td> I just simply can't find the good eco command to call stock level (something like what is underlined on the code. Is anyone able to help me out...i searched mostly in "qtpro_stock_table.php" and cannot figure out wich command is calling stock level. None of the echo command i tried worked out Thank you for your time! Edited April 22, 2009 by Lgn.Magic Quote Link to comment Share on other sites More sharing options...
tuffcode Posted April 23, 2009 Share Posted April 23, 2009 (edited) This is a nice tool as many have said. Only one real problem/question. Is there a way to make the stock per attribute (example: a size XL shirt) decrease when one of the products is ordered? If I have set the stock to 10 for Size XL for a particular shirt, is there a way for it to auto-decrement size XL's stock by 1 when someone orders 1 size XL of this shirt? It does decrease the overall stock. I would very much like it to decrease the attribute's stock as well. Thanks, Colin Edited April 23, 2009 by tuffcode Quote Link to comment Share on other sites More sharing options...
king_of_comedy Posted April 24, 2009 Share Posted April 24, 2009 I just try to fit this contributen for my needs an need some help. Actual I´m displaying the Product Attributes in the shop as a list with a Quantity Boxes - some kind of add multiple products to cart at once. I want the same for the QTpro contrib but now i´m stuck. I´m using the QT stock table display to get this to work. Inserting a model Number for each attribute combination wasnßt that difficult but trying to get quantity Boxes to bulk buy the attributes is a bit different :blush: This is the code to add multiple attributes with quantity to cart in application_top: case 'add_mult' : if (is_array($HTTP_POST_VARS['a'])){ reset($HTTP_POST_VARS['quantity']); reset($HTTP_POST_VARS['a']); $x=0; if (is_array($HTTP_POST_VARS['a'])){ foreach(($HTTP_POST_VARS['a']) as $key => $value){ $c = array((int)$HTTP_POST_VARS['b'] => (int)$value); if (is_array($HTTP_POST_VARS['quantity'])){ $qty = (int)$HTTP_POST_VARS['quantity'][$x]; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], ($c)))+($qty),($c)); $x++; } } } } else { if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and in the product_info: <?php echo $products_options['products_options_values_name']; echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']); echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?> ... but to get it work with QTpro i have to merge it with this: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { //++++ QT Pro: Begin Changed code $attributes=array(); if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) { $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']); foreach ($attrlist as $attr) { list($oid, $oval)=explode('-',$attr); if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval) $attributes[$oid]=$oval; } } if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) { foreach ($HTTP_POST_VARS['id'] as $key=>$val) { if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val) $attributes=$attributes + $HTTP_POST_VARS['id']; } } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //++++ QT Pro: End Changed Code } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; Has onyone an idea how to merge these codes? Quote Link to comment Share on other sites More sharing options...
tgreaves Posted April 24, 2009 Share Posted April 24, 2009 Does anyone know if this will work with the latest version of STS? Quote Link to comment Share on other sites More sharing options...
cornishpirate Posted April 25, 2009 Share Posted April 25, 2009 if ($VARS['quantity']=intval($VARS['quantity'])) { tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity=" . (int)$VARS['quantity'] . " where products_stock_id=$stock_id"); } else { tep_db_query("delete from " . TABLE_PRODUCTS_STOCK . " where products_stock_id=$stock_id"); } This is from stock.php. The first line should have '==' and not just '=' The effect for me was to delete the record if the stock quantity was set to zero. I didn't want this, because of an offline 'merge' operation I carry out when updating my live site. Making the change leaves a zero level record in products_stock. Does anyone know if there are likely to be any side effects? Quote Link to comment Share on other sites More sharing options...
Camocamp Posted April 29, 2009 Share Posted April 29, 2009 Hi Olof, Thank you for your wonderful contribution. I just update the QTPro v4.5 to v4.51b then I got the error in In administration> configuration> catalog: "Fatal error: Call to undefined function qtpro_doctor_investigate_product() in /home/camocamp/public_html/catalog3/admin/categories.php on line 15 " In administration> configuration>Prod Info (QYPro)> Production Info Attribute Display Plugin/ multiple_dropdown/ edit. Fatal error: Call to undefined function tep_cfg_pull_down_class_files() in /home/camocamp/public_html/catalog3/admin/configuration.php(125) : eval()'d code on line 1 Please see attached photo: http://docs.google.com/Doc?id=ddx8dnwv_958cz3tc5db How do I fix it. Many Thanks Pam 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.