ralphday Posted April 16, 2005 Share Posted April 16, 2005 I just posted QT Pro version 4.2. Version 4.2 is a bug fix release of QT Pro. Changes from version 4.1 to version 4.2: Fix problem with delete and restock orders with downloaded products For anyone who has already integrated 4.1 the changes are in checkout_process.php in the stock decrement area and the remove order section of catalog/admin/includes/functions/general.php. Unless you have other changes in the stock decrement area of checkout_process.php you should be able to cut and paste from: // Stock Update - Joao Correia down through: // Update products_ordered (for bestsellers list) In general.php, you can just cut & paste the tep_remove_order function. Quote Link to comment Share on other sites More sharing options...
scandic_outlet Posted April 17, 2005 Share Posted April 17, 2005 Hello Ralph, i decided to install the mod in a totally new installation - I never learnt what was wrong. Thank you for the great contribution, and update :) Best. M. Quote Dedicated OsCommerce user. 2011 will be the return of OsC Link to comment Share on other sites More sharing options...
coolguy Posted April 18, 2005 Share Posted April 18, 2005 I got qtpro working great now, thanks to Ralph :) As I moved on with my project now I am facing some problem with "Edit orders thing" I have downloaded the contribution below. it is order editor. 1) http://www.oscommerce.com/community/contributions,1435 This tool works nicely but does not update stock when an item is removed from an order. If this Order Editor works with Qtpro life will be lot easier, does anyone of you using Qtpro got this contribution to work with QTpro, if so please enlighten me in what direction I should go to achieve the same. For your information there is a contribution which puts the order back to customers shopping cart and this can be done via admin, then customer adds/removes items from his cart and resubmit the order and order gets updated in admin. It's real cool but I couldn't get this to work too. Link to the the contribution below, Contributions name is Restore Order For Customer Change V1. http://www.oscommerce.com/community/contributions,1161 If Ralph gets this order edit thing going with Qtpro it would be nice. I am aware he is busy but still my request. Quote Link to comment Share on other sites More sharing options...
tommy11011 Posted April 21, 2005 Share Posted April 21, 2005 I got qtpro working great now, thanks to Ralph :) As I moved on with my project now I am facing some problem with "Edit orders thing" I have downloaded the contribution below. it is order editor. 1) http://www.oscommerce.com/community/contributions,1435 This tool works nicely but does not update stock when an item is removed from an order. If this Order Editor works with Qtpro life will be lot easier, does anyone of you using Qtpro got this contribution to work with QTpro, if so please enlighten me in what direction I should go to achieve the same. For your information there is a contribution which puts the order back to customers shopping cart and this can be done via admin, then customer adds/removes items from his cart and resubmit the order and order gets updated in admin. It's real cool but I couldn't get this to work too. Link to the the contribution below, Contributions name is Restore Order For Customer Change V1. http://www.oscommerce.com/community/contributions,1161 If Ralph gets this order edit thing going with Qtpro it would be nice. I am aware he is busy but still my request. <{POST_SNAPBACK}> Where in the menu system does stats_low_stock_attrib.php found?? should it not fall under "Reports"? Also, has anyone successfully combined the RMA mod with this? Quote Link to comment Share on other sites More sharing options...
coolguy Posted April 21, 2005 Share Posted April 21, 2005 Give this a try. Warning its untested code! In catalog/includes/classes/pad_base.php find this: $is_out_of_stock=tep_check_stock(tep_get_prid($this->products_id),1,$newcomb); if (!$is_out_of_stock | ($showoos == true)) { switch ($markoos) { case 'Left': $newtext=($is_out_of_stock ? TEXT_OUT_OF_STOCK.' - ' : '').substr($newtext,2); break; case 'Right': $newtext=substr($newtext,2).($is_out_of_stock ? ' - '.TEXT_OUT_OF_STOCK : ''); break; default: $newtext=substr($newtext,2); break; } $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext); if ($newisselected) $selected_combination = sizeof($combinations)-1; } and replace it with this: $is_out_of_stock=tep_check_stock(tep_get_prid($this->products_id),1,$newcomb); if (!$is_out_of_stock | ($showoos == true)) { if (!$is_out_of_stock) { $newtext.=' - '.tep_get_products_stock(tep_get_prid($this->products_id),$newcomb).' in stock'; } switch ($markoos) { case 'Left': $newtext=($is_out_of_stock ? TEXT_OUT_OF_STOCK.' - ' : '').substr($newtext,2); break; case 'Right': $newtext=substr($newtext,2).($is_out_of_stock ? ' - '.TEXT_OUT_OF_STOCK : ''); break; default: $newtext=substr($newtext,2); break; } $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext); if ($newisselected) $selected_combination = sizeof($combinations)-1; } This should work for the single radioset or single dropdown plugins and will display the quantity like this "small - 5 in stock". <{POST_SNAPBACK}> Hello Ralph, I have applied the above code to display available stock for attributes like "1 in stock" etc, but Stock is getting displayed with attributes only when pad_single_dropdown and pad_single_radio_set options are set in product information section in configuration, when I use pad_base , in stock thing is not showing, is it the way it is supposed to be or it is a problem? your reply regarding this would save me :) thanks. Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 21, 2005 Share Posted April 21, 2005 Hello Ralph, I have applied the above code to display available stock for attributes like "1 in stock" etc, but Stock is getting displayed with attributes only when pad_single_dropdown and pad_single_radio_set options are set in product information section in configuration, when I use pad_base , in stock thing is not showing, is it the way it is supposed to be or it is a problem? your reply regarding this would save me :) thanks. <{POST_SNAPBACK}> That's correct. pad_base acts like base osCommerce if you use it as a plugin. Its the base class that the plugins inherit from so some of the methods do things that are only used by the other plugins. Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 21, 2005 Share Posted April 21, 2005 Where in the menu system does stats_low_stock_attrib.php found?? should it not fall under "Reports"? Also, has anyone successfully combined the RMA mod with this? <{POST_SNAPBACK}> Yes one would think stats_low_stock_attrib.php should fall under reports but when I started cleaning up QT Pro it wasn't there. Putting it there was low on the priority list as QT Pro wasn't even keeping track of stock correctly at that time. Maybe someday when time permits it will move there. For now just type in the URL once and bookmark it. Don't know about the RMA contrib. Quote Link to comment Share on other sites More sharing options...
tommy11011 Posted April 21, 2005 Share Posted April 21, 2005 Yes one would think stats_low_stock_attrib.php should fall under reports but when I started cleaning up QT Pro it wasn't there. Putting it there was low on the priority list as QT Pro wasn't even keeping track of stock correctly at that time. Maybe someday when time permits it will move there. For now just type in the URL once and bookmark it. Don't know about the RMA contrib. <{POST_SNAPBACK}> I have added it for you. The contrib is now 4.2a. Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 21, 2005 Share Posted April 21, 2005 I have added it for you. The contrib is now 4.2a. <{POST_SNAPBACK}> Thanks! Quote Link to comment Share on other sites More sharing options...
coolguy Posted April 21, 2005 Share Posted April 21, 2005 Thanks for the reply Ralph. I am just trying to add pagination and search to Stats_low_stock_attrib page. I will post the progress here, I have added almost 300 products with attributes tracking stock and Stats_low_stock_attrib page is so long like Great wall of China and taking time to load. On broadband page loads late, on dial up it is getting time out. Quote Link to comment Share on other sites More sharing options...
atech Posted April 21, 2005 Share Posted April 21, 2005 Hello Everyone, I have a clothing store setup on my local computer, and I have installed QTpro v4.1 and everything works great, but what I would like to do is display the attributes and the quantity of the attributes on the product_info.php page. How would I go about doing this? I am very new to all of this but, I have included a image of what I am trying to do, you can view the image here. I would like to get that kind of setup in the image above is possible. I hope I am explaining it right, any help would be gratefully appreciated. Thank You! Quote Link to comment Share on other sites More sharing options...
coolguy Posted April 21, 2005 Share Posted April 21, 2005 Qtpro as it is now doesn't have the feature you want, I am saying this after I saw the image you linked to. I am talking about free version supported by Ralph Day here. There is Qtpro deluxe which has exact feature you are after, please search for it using google or whatever, I am not supposed to post links here. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 22, 2005 Share Posted April 22, 2005 I installed QT pro 4.2. It worked great for exactly what I'm using oscommerce for. I have a clothing/merchandise site where we have shirts that have multiple sizes and colors. I wanted to use Oscommerce because sometimes we run out of stock and I hate getting orders for products that we don't have because our lead time on our shirts is 4 weeks. Sometimes the customer gets a little irritated when they have to wait that long. It also make the site look a lot cleaner to be able to have a product for a Men's shirt, and then have product attributes for Small/Medium/Large and color: white/black. With QTPro, I'm able to set an inventory for each product attribute, which is fantastic!!! I'm having a problem when a specific attribute has a stock of Zero. I get a SQL error pointing to catalog/includes/classes/pad_base.php which shows up to the end-user/customer. I need some of my products to be set to 0 that we don't currently have in stock, but I want to show to the customer. In other words, if I have a t-shirt - with 5 small, 5 medium, 7large, and 0 XXL (all in black) I want to be able to setup the attribute for XXL, but have 0 stock until we get the XXL manufactured and back in stock. Does anybody else have this problem? Is there a known work around? Thanks! Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 22, 2005 Share Posted April 22, 2005 I'm having a problem when a specific attribute has a stock of Zero. I get a SQL error pointing to catalog/includes/classes/pad_base.php which shows up to the end-user/customer. I need some of my products to be set to 0 that we don't currently have in stock, but I want to show to the customer. In other words, if I have a t-shirt - with 5 small, 5 medium, 7large, and 0 XXL (all in black) I want to be able to setup the attribute for XXL, but have 0 stock until we get the XXL manufactured and back in stock. Does anybody else have this problem? Is there a known work around? Thanks! <{POST_SNAPBACK}> I haven't heard of this and it doesn't happen in my test setup. Post the full text of the error messages you are receiving and maybe I can help. Also, post your PHP and mysql versions. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 23, 2005 Share Posted April 23, 2005 Does QTPro work with Easy Populate? How do you use QT Pro, and upload 1000's of products with attributes? Quote Link to comment Share on other sites More sharing options...
Cancacti Posted April 25, 2005 Share Posted April 25, 2005 HELP!! After I installed QTPro 4.2 I thought that everything worked perfevtly but now when I am adding new products the product-name is not saved but instead it takes the model_name. Who can help me checking my code, Im desperate I obviously do not know enough from PHP. Who can help me? Thanks Nathalie Quote Link to comment Share on other sites More sharing options...
JBenedetti Posted April 27, 2005 Share Posted April 27, 2005 (edited) Hi Guys, Thanks for a great contribution. I have v4.2 running on a heavily modded site and so far it seems to be working great... except: Mac Users running Internet Explorer 5.2 (the last version for mac) who have the "Show Scripting Alert Errors" preference on are getting Javascript errors that appear to be related to the stock checking function. I've sifted through pad_base.php and pad_multiple_dropdown.php, but don't really see anything there that should be causing the errors. The error on product_info.php is: Microsoft JScript compilation error Line 262 Char 13 Expected Identifier or string The the third line of the source below is highlighted by the error message: <script LANGUAGE="JavaScript"><!-- function chkstk(frm) { var stk={41:1,42:1,43:1,44:1,45:1,46:1,48:1,54:1,61:1,57:1,50:1,51:1,53:1,58:1,59:1,61:1}; var instk=false; if (stk[frm['id[9]'].value]) instk=true; return instk; } function stkmsg(frm) { var instk=chkstk(frm); var span=document.getElementById("oosmsg"); while (span.childNodes[0]) span.removeChild(span.childNodes[0]); if (!instk) span.appendChild(document.createTextNode("The combination of options you have selected is currently out of stock. Please select another combination.")); else span.appendChild(document.createTextNode(" ")); } stkmsg(document.cart_quantity); function chksel() { var instk=chkstk(document.cart_quantity); if (!instk) alert('The combination of options you have selected is currently out of stock. Please select another combination.'); return instk; } document.cart_quantity.onsubmit=chksel; //--></SCRIPT> My guess is that the above is being output by pad_multiple_dropdowns.php... am I right? Has anyone else seen this issue an, if so, does anyone have a fix (aside from "don't use IE on a mac")? Here's a link to a product page on the site in question: Ugly Bass Player Edited April 27, 2005 by JBenedetti Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 28, 2005 Share Posted April 28, 2005 Mac Users running Internet Explorer 5.2 (the last version for mac) who have the "Show Scripting Alert Errors" preference on are getting Javascript errors that appear to be related to the stock checking function. I've sifted through pad_base.php and pad_multiple_dropdown.php, but don't really see anything there that should be causing the errors. The error on product_info.php is: Microsoft JScript compilation error Line 262 Char 13 Expected Identifier or string The the third line of the source below is highlighted by the error message: <script LANGUAGE="JavaScript"><!-- ?function chkstk(frm) { ? ?var stk={41:1,42:1,43:1,44:1,45:1,46:1,48:1,54:1,61:1,57:1,50:1,51:1,53:1,58:1,59:1,61:1}; ? ?var instk=false; ? ?if (stk[frm['id[9]'].value]) instk=true; ?return instk; ?} ...... My guess is that the above is being output by pad_multiple_dropdowns.php... am I right? Has anyone else seen this issue an, if so, does anyone have a fix (aside from "don't use IE on a mac")? Here's a link to a product page on the site in question: Ugly Bass Player <{POST_SNAPBACK}> Yuck, Mac IE 5.2. That's a nasty buggy browser. I do see a lot of "switch to Safari" suggestions when researching Mac IE 5.2 problems but that really doesn't help. I can't find anything specific to this problem when research Mac IE 5 quirks so I'll try a guess. The line its puking on is initalizing the stk array using what's called an object literal. What's before the colon in each of the number:number pairs is the object property name and after the colon is the property value. This is perfectly valid Javascript for initializing an associative array object. Oh, but Microsoft uses JScript. And the interesting thing is the error you are receiving "Expected Identifier or string" doesn't seem to exist in the current version of JScript. Its now "Expected Identifier, string or number". So I suspect the Mac IE 5.2 JScript version doesn't consider a numeric property name as valid in an object literal. I don't have a Mac to test on so I'm not sure. To test it view the source of a product page that's causing the error and save it. Now add single quotes around all of the numbers before the colons in the line its puking on and save it. Then load your doctored version of the page into Mac IE 5.2 and see if the error goes away. If that turns out to be the problem, the javascript you posted is generated by pad_multiple_dropdowns method _draw_out_of_stock_message_js. But that calls the pad_base method _draw_js_stock_array to output the object literal that appears to be the problem. So in pad_base replace the _draw_js_stock_array method with this barely tested code: function _draw_js_stock_array($combinations) { if (!((isset($combinations)) && (is_array($combinations)) && (sizeof($combinations) > 0))){ return '{}'; } $out=''; foreach ($combinations[0]['comb'] as $oid=>$ovid) { $out.="{'".$ovid."':"; $opts[]=$oid; } $out.='1'; for ($combindex=1; $combindex<sizeof($combinations); $combindex++) { $comb=$combinations[$combindex]['comb']; for ($i=0; $i<sizeof($opts)-1; $i++) { if ($comb[$opts[$i]]!=$combinations[$combindex-1]['comb'][$opts[$i]]) break; } $out.=str_repeat('}',sizeof($opts)-1-$i).','; if ($i<sizeof($opts)-1) { for ($j=$i; $j<sizeof($opts)-1; $j++) $out.="'".$comb[$opts[$j]]."':{"; } $out.="'".$comb[$opts[sizeof($opts)-1]]."':1"; } $out.=str_repeat('}',sizeof($opts)); return $out; } } Good luck. Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 28, 2005 Share Posted April 28, 2005 HELP!! After I installed QTPro 4.2 I thought that everything worked perfevtly but now when I am adding new products the product-name is not saved but instead it takes the model_name. Who can help me checking my code, Im desperate I obviously do not know enough from PHP. Who can help me? Thanks Nathalie <{POST_SNAPBACK}> Hmm.. QT Pro doesn't even touch the code that adds products. Do you have another contribution installed that modifies admin/categories.php? If so, ask on the support thread for that contribution for help. Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 28, 2005 Share Posted April 28, 2005 Qtpro as it is now doesn't have the feature you want, I am saying this after I saw the image you linked to. I am talking about free version supported by Ralph Day here. There is Qtpro deluxe which has exact feature you are after, please search for it using google or whatever, I am not supposed to post links here. <{POST_SNAPBACK}> Looks like freezehell has made some nice improvements. Its perfectly legitimate for him to sell his improved version, but according to the GNU site any derivitive of GPL licensed software must allow redistribution under the same terms as the GPL license. I'm not a lawyer but if I understand it right, if someone buys it they could post it here and everyone else can download and use it for free. Just a thought. Quote Link to comment Share on other sites More sharing options...
JBenedetti Posted April 28, 2005 Share Posted April 28, 2005 Now add single quotes around all of the numbers before the colons in the line its puking on and save it. Then load your doctored version of the page into Mac IE 5.2 and see if the error goes away. I agree, IE 5.2 Mac = Yuck. Thanks for the excellent explanation and suggestions Ralph. That did indeed fix the original error. Only now it chokes a few lines down on: function stkmsg(frm) { var instk=chkstk(frm); var span=document.getElementById("oosmsg"); while (span.childNodes[0]) span.removeChild(span.childNodes[0]); if (!instk) span.appendChild(document.createTextNode("The combination of options you have selected is currently out of stock. Please select another combination.")); else span.appendChild(document.createTextNode(" ")); Specifically on while (span.childNodes[0]) Error is "Object doensn't support this property or method" Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 28, 2005 Share Posted April 28, 2005 I agree, IE 5.2 Mac = Yuck.Thanks for the excellent explanation and suggestions Ralph. That did indeed fix the original error. Only now it chokes a few lines down on: function stkmsg(frm) { ? ?var instk=chkstk(frm); ? ?var span=document.getElementById("oosmsg"); ? ?while (span.childNodes[0]) ? ? ?span.removeChild(span.childNodes[0]); ? ?if (!instk) ? ? ?span.appendChild(document.createTextNode("The combination of options you have selected is currently out of stock. ?Please select another combination.")); ? ?else ? ? ?span.appendChild(document.createTextNode(" ")); Specifically on while (span.childNodes[0]) Error is "Object doensn't support this property or method" <{POST_SNAPBACK}> I was afraid something like that was going to happen. Again, its perfectly good javascript and nothing I can find about Mac IE 5.2 quirks gives me any hints to the problem. childNodes, removeChild and appendChild are all supposedly supported in Mac IE 5.2. So I'm going to guess that IE 5.2 Mac is doing something funky in the DOM with the empty span tag. Give this a shot to see if it gets past this new problem and presents yet another. :P In your saved version of the page replace: <span id="oosmsg" class=errorBox></span> With: <span id="oosmsg" class=errorBox> </span> That might force it to create a proper DOM and make the childNodes property work. Quote Link to comment Share on other sites More sharing options...
jimcfs Posted April 29, 2005 Share Posted April 29, 2005 I just installed QTPro. However, when I pull it up, all I get for headings are things like Quick_head1, Quick_head2, QUICK_MODEL QUICK_ID QUICK_NAME QUICK_WEIGHT QUICK_PRICE QUICK_STOCK, etc. What did I do stupid?? ;) Quote Link to comment Share on other sites More sharing options...
ralphday Posted April 29, 2005 Share Posted April 29, 2005 I just installed QTPro. However, when I pull it up, all I get for headings are things like Quick_head1, Quick_head2, QUICK_MODEL QUICK_ID QUICK_NAME QUICK_WEIGHT QUICK_PRICE QUICK_STOCK, etc. What did I do stupid?? ;) <{POST_SNAPBACK}> Those headings don't sound related to QT Pro. Where do you see them? Quote Link to comment Share on other sites More sharing options...
jimcfs Posted April 29, 2005 Share Posted April 29, 2005 Those headings don't sound related to QT Pro. Where do you see them? <{POST_SNAPBACK}> When I pull up quick_stockupdate.php from the Catalog menu, I see the headings QUICK_HEAD1 QUICK_HEAD2 and then the list of categories. When I select one, then I get the headings stated previously on the listing page/form. It appears that data is correct and changes take. However, this is my wife's store, and she'll freak... enough said. ;) 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.