helpneeder Posted August 24, 2005 Share Posted August 24, 2005 doesn't set that value. You need to add orders_products_id to the array in the catalog/includes/classes/order.php query method around line 128. <{POST_SNAPBACK}> It's in there already, actually. Have a look: $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], //begin PayPal_Shopping_Cart_IPN 'orders_products_id' => $orders_products['orders_products_id'], //end PayPal_Shopping_Cart_IPN 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']); I have another suspicion, probably a novice one, but... although I figure that classes don't need to have 'require's or 'include's in them, I wonder if the QT Pro code inside Order.class.php needs something like this, sort of how checkout_process.php has "include('includes/application_top.php')". Another thing I noticed is, in the Paypal IPN developed by the Oscommerce team, ipn.php has this code at the top: chdir('../../../../'); require('includes/application_top.php'); Note the "chdir". There's nothing like this in the Paypal Shopping Cart IPN code that I've found, even if the php files are buried deep in includes/modules/payment/paypal/(etc...). I wonder if application.top.inc.php or this other version of ipn.php have trouble because of not changing the working directory. Make sense? I just can't figure why the same code would be setting that NULL setting in the database while without going through Paypal IPN it sets a proper value. Quote Link to comment Share on other sites More sharing options...
chooch Posted August 24, 2005 Share Posted August 24, 2005 This sounds like you didn't run the database scripts. You need to run both new_install.sql and config.sql. <{POST_SNAPBACK}> Hello Ralph Thank you very much for the reply. I have installed the correct SQL and everything seems to be working fine. This is a brilliant contribution - thanks for the advice. Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted August 24, 2005 Share Posted August 24, 2005 Hello Ralph Thank you very much for the reply. I have installed the correct SQL and everything seems to be working fine. This is a brilliant contribution - thanks for the advice. <{POST_SNAPBACK}> ok, just installed the mod in modified store and umm, i get following error: Warning: Invalid argument supplied for foreach() in /home/catalog/public_html/shop2/includes/classes/pad_base.php on line 388 any one able to tell me what is wrong please? thanks Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted August 24, 2005 Share Posted August 24, 2005 Warning: Invalid argument supplied for foreach() in /home/catalog/public_html/shop2/includes/classes/pad_base.php on line 388 thanks <{POST_SNAPBACK}> sorry... something else: even in my admin when i click 'stock' i no longer get the attributes that the fresh install gave me. all i get is the number of items - but the options dont exist on the 'stock' page even though the attributes exist.. please help thanks Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted August 25, 2005 Share Posted August 25, 2005 okee-dokee after hours of fiddling around i got this mod installed now i) there seems to be a problem where the stock doesn't count down ii) the out of stock doesn't appear unless fiddled around with in admin iii) the javascript alert doesn't show and out of stock items are stilled put in to cart iv) here's a typical email receipt: Products ------------------------------------------------------ 1 x Matrox G200 MMS (MG200MMS) = $349.99 Memory 8 mb Model Value ------------------------------------------------------ Sub-Total: $349.99 Flat Rate (Best Way): $5.00 Total: $354.99 mine now look like this: Products ------------------------------------------------------ x () = ?0.00 ------------------------------------------------------ Sub-Total: ?20.10 Flat Rate (Best Way): ?0.00 Total: ?20.10 v) this happens in the order history too... this is a very useful mod and i would like to try to get it going as it will be almost essential to the business.... please advise on the way forward ti solve the problems thanks (sorry about the previous posts asking for advice - they're done!) Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
ralphday Posted August 28, 2005 Share Posted August 28, 2005 It's in there already, actually. Have a look: snip... I just can't figure why the same code would be setting that NULL setting in the database while without going through Paypal IPN it sets a proper value. <{POST_SNAPBACK}> Oh yeah, I wasn't looking in the overwrite and run verison of Paypal IPN. When using a non-paypal payment method the normal code in checkout_process.php is used toenerate the reduce stock and write the order. When using paypal, Paypal IPN custs checkout_process.php short and uses its checkout_process_inc.php to write the order while the customer is off at paypal paying for it. Paypal posts back to ipn.php when its paid for and that calls order.php to retrieve the order data and order.class.php to update the stock. checkout_process_inc.php doesn't have the code to generate the key to the products_stock table so it writes a NULL. That's OK because the stock hasn't been reduced. So that's why I had you add the code to update the order with the products_stock key in order.class.php after the stock is reduced. As far as I can tell, it should work. Unless you tested using an order created before you added the update. That won't work. If you created a new order and paid for it with paypal and then table_orders_products still has a null for products_stock_attributes and therefore delete with restock still doesn't work I'm puzzled. You'll probably need to ad some tracing into the code to find out what's going wrong. Quote Link to comment Share on other sites More sharing options...
ralphday Posted August 28, 2005 Share Posted August 28, 2005 okee-dokee after hours of fiddling around i got this mod installed now i) there seems to be a problem where the stock doesn't count down ii) the out of stock doesn't appear unless fiddled around with in admin iii) the javascript alert doesn't show and out of stock items are stilled put in to cart iv) here's a typical email receipt: Products ------------------------------------------------------ 1 x Matrox G200 MMS (MG200MMS) = $349.99 Memory 8 mb Model Value ------------------------------------------------------ Sub-Total: $349.99 Flat Rate (Best Way): $5.00 Total: $354.99 mine now look like this: Products ------------------------------------------------------ x () = ?0.00 ------------------------------------------------------ Sub-Total: ?20.10 Flat Rate (Best Way): ?0.00 Total: ?20.10 v) this happens in the order history too... this is a very useful mod and i would like to try to get it going as it will be almost essential to the business.... please advise on the way forward ti solve the problems thanks (sorry about the previous posts asking for advice - they're done!) <{POST_SNAPBACK}> There are too many things that could be wrong to give you any direction except to use a good three-way compare tool like kdiff3 to make sure you've properly merged in all of the changes from your modified store and QT Pro. Quote Link to comment Share on other sites More sharing options...
jsignal Posted August 29, 2005 Share Posted August 29, 2005 All, I just installed 4.1 into my site. It is pretty heavily modified. One thing, in the product attribs, I can't edit "Track Stock" to change from NO to YES for my existing stock. Is this a bug or am I missing something? <{POST_SNAPBACK}> I'm just curious if you ever found the problem with editing the "track stock" on existing stock? This exact problem is happening on my store right now. I've installed attrib sort, static attribute, gift voucher, and qtpro (obviously) contribs on this OSC installation. Thanks, Jason Quote Link to comment Share on other sites More sharing options...
chooch Posted August 29, 2005 Share Posted August 29, 2005 (edited) There are too many things that could be wrong to give you any direction except to use a good three-way compare tool like kdiff3 to make sure you've properly merged in all of the changes from your modified store and QT Pro. <{POST_SNAPBACK}> thanks, almost there now..... in the admin i can set an item with 3 attributes and use for example the dropbox... sometimes it says 'out of stock' on the two items but still let me add all 3 to the cart... the radioset was the one i wanted to use but it doesn't let me display 'out of stock' if 2 out 3 items are out of stock. it allows me the option to add to the cart and the javascript alert doesn't pop-up either. Is this possibly to do with the SQL? only when i manually put all attributes to '0' does it work as out of stock and the javascript alert pop up too! (first i have to go back in to admin and set the status to green/active to add again the product that was removed from the product listing by default) i have checked the admin/configuration and the setting are correct and the admin QT settings are correct too. can anyone point me in the right direction please? after alot of hard work i managed to get this added to a heavily modded shop, so your help will be appreciated as I am trying to get over the final hurdle) Thanks Edited August 29, 2005 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted August 30, 2005 Share Posted August 30, 2005 thanks, almost there now..... <{POST_SNAPBACK}> in my stock.php page i am getting this: Premium 0 PS/2 0 USB 0 USB Deluxe Premium -1 Deluxe 1 i have deleted the attributes and started again with just two but the previous ones don't get deleted.... please tell me where ishould look for this specific problem. i gather it is on the stock.php page (or the sql related to it) because everything except the javascript pop-up alert and the stock countdwon work... still searching to resolve this problem so any help is aprreciated Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
ralphday Posted August 30, 2005 Share Posted August 30, 2005 in my stock.php page i am getting this: Premium 0 PS/2 0 USB 0 USB Deluxe Premium -1 Deluxe 1 i have deleted the attributes and started again with just two but the previous ones don't get deleted.... please tell me where ishould look for this specific problem. i gather it is on the stock.php page (or the sql related to it) because everything except the javascript pop-up alert and the stock countdwon work... still searching to resolve this problem so any help is aprreciated <{POST_SNAPBACK}> QT Pro doesn't delete the products_stock rows when you add or delete attributes for a product. Its best to delete all of the stock for a product before messing with them. You need to go directly into the products_stock table with phpmyadmin to manually clean out the unneeded rows. Quote Link to comment Share on other sites More sharing options...
ralphday Posted August 30, 2005 Share Posted August 30, 2005 I'm just curious if you ever found the problem with editing the "track stock" on existing stock? This exact problem is happening on my store right now. I've installed attrib sort, static attribute, gift voucher, and qtpro (obviously) contribs on this OSC installation. Thanks, Jason <{POST_SNAPBACK}> That can be an ugly bunch of contributions to merge. Attribute sort was developed on a version of osC before MS2 was finalized. It reverts a bunch of code in products_attributes.php to this earlier version and makes it hard to follow what really needs changing with other contributions. This is likely the checkbox for track stock being output in the wrong place in the html, probably outside the form. Do a view source on the page before you submit the change and make sure all of the forms (each option has a form for updating it) are proper and enclose the checkbox for track stock. Better yet, if you are using Firefox get the Web Developer extension and display the form information to verify its constructed correctly and see the values that will be passed. Quote Link to comment Share on other sites More sharing options...
jsignal Posted August 30, 2005 Share Posted August 30, 2005 (edited) That can be an ugly bunch of contributions to merge. Attribute sort was developed on a version of osC before MS2 was finalized. It reverts a bunch of code in products_attributes.php to this earlier version and makes it hard to follow what really needs changing with other contributions. This is likely the checkbox for track stock being output in the wrong place in the html, probably outside the form. Do a view source on the page before you submit the change and make sure all of the forms (each option has a form for updating it) are proper and enclose the checkbox for track stock. Better yet, if you are using Firefox get the Web Developer extension and display the form information to verify its constructed correctly and see the values that will be passed. <{POST_SNAPBACK}> Thanks for the tips! I installed the Firefox "Web Developer" extension. I like it very much. It was helpful in tracking down the issue. And thanks for pointing me to the form. I think the problem was that the case statement which handles the "update" of an option wasn't properly setting the $track_stock variable. I duplicated the third line in this code block: case 'add_product_options': . . . for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { . . . $track_stock=isset($HTTP_POST_VARS['track_stock'])?1:0; . . . And put it a little farther down, as in this example: case 'update_option_name': $track_stock=isset($HTTP_POST_VARS['track_stock'])?1:0; I would quote line numbers, but after so many modifications, line numbers are meaningless. Thanks again, -Jason Edited August 30, 2005 by jsignal Quote Link to comment Share on other sites More sharing options...
chooch Posted August 31, 2005 Share Posted August 31, 2005 QT Pro doesn't delete the products_stock rows when you add or delete attributes for a product. Its best to delete all of the stock for a product before messing with them. You need to go directly into the products_stock table with phpmyadmin to manually clean out the unneeded rows. <{POST_SNAPBACK}> Hi as per your instructions i have done that too but the problem is the same is there anything else that i should look for in my coding or sql? thanks Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
Fredrik.r Posted August 31, 2005 Share Posted August 31, 2005 sorry... something else: even in my admin when i click 'stock' i no longer get the attributes that the fresh install gave me. all i get is the number of items - but the options dont exist on the 'stock' page even though the attributes exist.. please help thanks <{POST_SNAPBACK}> Hi, I've got the same problem. I can't see the attributes. And I get the error message below when, for example, trying to use "single_radioset" in "product info attribute display plugin"; Warning: Invalid argument supplied for foreach() in /home/lounge24/public_html/devstore/includes/classes/pad_base.php on line 388 Please help! Quote Link to comment Share on other sites More sharing options...
chooch Posted August 31, 2005 Share Posted August 31, 2005 (edited) <{POST_SNAPBACK}> QT Pro doesn't delete the products_stock rows when you add or delete attributes for a product.? Its best to delete all of the stock for a product before messing with them.? You need to go directly into the products_stock table with phpmyadmin to manually clean out the unneeded rows. <{POST_SNAPBACK}> Hi as per your instructions i have done that too but the problem is the same is there anything else that i should look for in my coding or sql? in product_info i choose to have 2 attributes which are an 8mb and 16mb. both show as out of stock in the catalog. i then go to admin stock page and add quantity of 1 to 8mb and leave the other attribute 16mb as it is. i then click refresh on the product info page and BOTH attributes now show as in stock - WHY??? i have double and treble checked the code... please advise thanks Edited August 31, 2005 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
ralphday Posted August 31, 2005 Share Posted August 31, 2005 <{POST_SNAPBACK}> Hi as per your instructions i have done that too but the problem is the same is there anything else that i should look for in my coding or sql? in product_info i choose to have 2 attributes which are an 8mb and 16mb. both show as out of stock in the catalog. i then go to admin stock page and add quantity of 1 to 8mb and leave the other attribute 16mb as it is. i then click refresh on the product info page and BOTH attributes now show as in stock - WHY??? i have double and treble checked the code... please advise thanks <{POST_SNAPBACK}> Make sure you have properly merged in the changes to catalog/includes/functions/general.php Quote Link to comment Share on other sites More sharing options...
ralphday Posted August 31, 2005 Share Posted August 31, 2005 Hi, I've got the same problem. I can't see the attributes. <{POST_SNAPBACK}> What are you seeing on the stock page? stock.php is pretty straightforward - if you have any options with track stock set you will see the option names as column titles and be able to add stock using the dropdowns at the bottom. If not, you just see the product name and total stock. Have you modified stock.php? Have you modified products_attributes? Perhaps its not setting the track stock flag. Look at the database to verify. And I get the error message below when, for example, trying to use "single_radioset" in "product info attribute display plugin"; Warning: Invalid argument supplied for foreach() in /home/lounge24/public_html/devstore/includes/classes/pad_base.php on line 388 Please help! <{POST_SNAPBACK}> That sounds like you have modified pad_single_radioset and its calling _build_attributes_combinations even when it finds no options with track stock set. Quote Link to comment Share on other sites More sharing options...
Christian.E Posted August 31, 2005 Share Posted August 31, 2005 Hello from Vienna/Austria. Whats the difference between free qtpro und "Qtpro Full Attributes Quantity Tracking Deluxe 4.5" for 175USD on diplomatcapital.com? Quote Link to comment Share on other sites More sharing options...
chooch Posted August 31, 2005 Share Posted August 31, 2005 <{POST_SNAPBACK}> Make sure you have properly merged in the changes to catalog/includes/functions/general.php <{POST_SNAPBACK}> Hi Ralph I have checked the file and realsied i made a mistake - it seems to be working SPOT ON :-) I need to play around with it in admin then use phpmyadmin to delete the unwanted rows again (they keep re-appearing) and then i'll know whether it works or the way it is supposed to. on first look at product_info.php it DOES allow me to have attibutes with out of stock as well as attributes in stock thanks alot Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
Fredrik.r Posted August 31, 2005 Share Posted August 31, 2005 (edited) What are you seeing on the stock page?? stock.php is pretty straightforward - if you have any options with track stock set you will see the option names as column titles and be able to add stock using the dropdowns at the bottom.? If not, you just see the product name and total stock.? Have you modified stock.php?? Have you modified products_attributes?? Perhaps its not setting the track stock flag.? Look at the database to verify. I just checked the files with BBEdit's "Find differences". Both files are identical to the ones in QT Pro 4.2. I can't see the the attributes in for example the product "Matrox G200 MMS", just the total stock. I need some help to verify my database. I followed the install instructions and upated it with new_install.sql and config.sql That sounds like you have modified pad_single_radioset and its calling _build_attributes_combinations even when it finds no options with track stock set. <{POST_SNAPBACK}> I have not touched the files starting with "pad" since there was no previous version of QT Pro installed. Edited August 31, 2005 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
ralphday Posted August 31, 2005 Share Posted August 31, 2005 Hello from Vienna/Austria. Whats the difference between free qtpro und "Qtpro Full Attributes Quantity Tracking Deluxe 4.5" for 175USD on diplomatcapital.com? <{POST_SNAPBACK}> A developer who did some of the earlier work on QT Pro has enhanced it some and is selling it. It looks like he has added a quantity entry box to every line on the stock page to make quantity entry easier as well as a button to set the stock to the same quantity for all attribute combinations. It also looks like he made some enhancements to the low stock report. He also says he has a version for CRE Loaded. Quote Link to comment Share on other sites More sharing options...
chooch Posted August 31, 2005 Share Posted August 31, 2005 A developer who did some of the earlier work on QT Pro has enhanced it some and is selling it. It looks like he has added a quantity entry box to every line on the stock page to make quantity entry easier as well as a button to set the stock to the same quantity for all attribute combinations. It also looks like he made some enhancements to the low stock report. He also says he has a version for CRE Loaded. <{POST_SNAPBACK}> Hi i have seen this dcc estore but don't get one thing... it was made using oscommerce so how can they charge people to buy a mod? what is the dcc estore anywayz... are they like creloaded or something? they don't allow you to download the shop... Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted August 31, 2005 Share Posted August 31, 2005 Hi, I've got the same problem. I can't see the attributes. And I get the error message below when, for example, trying to use "single_radioset" in "product info attribute display plugin"; Warning: Invalid argument supplied for foreach() in /home/lounge24/public_html/devstore/includes/classes/pad_base.php on line 388 Please help! <{POST_SNAPBACK}> here's mine too.... Warning: Invalid argument supplied for foreach() in /home/osa786/public_html/shop2/includes/classes/pad_base.php on line 388 this happens when i choose not to track stock and select radio-set, single dropdown... but the out of stock vanishes from the dropset when using base too. no mods were made by me to the stock.php file or classes/pad_base.php etc however the radio set seems to be the only fully working porperly and i dont need the others... until a situation where the multiple drop sets may be needed! the radio set plug-in is minusing the stock individually as it should so i guess i'll stick to this one until the need arises to change but i will still try to keep looking a for a solution to the others sets one other thing, anyone please tell what to change in the SQl so that if all stock of all attributes is sold it doesn't remove it from the product listing - i prefer to have a product info page that has the out of stock on all attributes so customers can see what they've missed out on thanks again Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
ralphday Posted September 1, 2005 Share Posted September 1, 2005 Hi i have seen this dcc estore but don't get one thing... it was made using oscommerce so how can they charge people to buy a mod? what is the dcc estore anywayz... are they like creloaded or something? they don't allow you to download the shop... <{POST_SNAPBACK}> He's just selling the mod to osCommerce or CRE Loaded, not a whole store. I'm not a lawyer but I believe the GPL allows him to sell his modifications to the GPL code but he does have to license it under the GPL which means if someone buys it they would have free rights to redistribute it. 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.