cloudrunner Posted October 31, 2003 Share Posted October 31, 2003 Well, here's the thread folks. If you DL it, then I hope you find it useful. I will try to provide support for it as i can, but seeing as how it is EXTREMELY small and fairly straightforward, I shouldn't have to. The reason that I am starting this thread is to enable you folks to help me out here. If you find a better way to grab the products_id from the order variable and it works (as $orders->products[$i]['id'] should but doesn't) then we can update the contribution as needed. Thanks for the help, I hope you find it useful! )O( Cloudrunner )O( Quote Link to comment Share on other sites More sharing options...
cloudrunner Posted October 31, 2003 Author Share Posted October 31, 2003 Oh yeah, here's the DL link http://www.oscommerce.com/community/contributions,1624 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2003 Share Posted October 31, 2003 I think part of the issue is that the manufacturer is not saved in the orders tables along with the other information. I would think a way of doing this would be to modify the code that writes to the orders table to include the manufacturers id. this way adding the manuf. to the invoice would be as simple as adding a field to the invoice.php. There may be some gotcha's to this approach. I would also like this mod but just not at the top of my list to do. Someday when I really need it I might sit down and have the manuf. written to the order table. thoughts? Quote Link to comment Share on other sites More sharing options...
cloudrunner Posted October 31, 2003 Author Share Posted October 31, 2003 I really wanna stay away from some major hard-core mods. If I can simply get the products_id from the orders table then we'd be set and it'd take out three lines of code, but more on that later...still playing with myself...er it... Quote Link to comment Share on other sites More sharing options...
cloudrunner Posted November 2, 2003 Author Share Posted November 2, 2003 Here's the updated system. I got the products_id working, so now there is no chance of a wrong MFG being associated with a product. enjoy!!! )O( Cloudrunner )O( "Life is sexually transmitted." --anonymous Quote Link to comment Share on other sites More sharing options...
Guest Posted November 2, 2003 Share Posted November 2, 2003 looks good! seems to work without any issues....I will test it against some old sales with complex transactions to see.... Good Job! B) Quote Link to comment Share on other sites More sharing options...
Guest Posted November 2, 2003 Share Posted November 2, 2003 hmmm...when i pull up an invoice with products from multiple manufacturers....all products default to the first manufacturer....need to look into this more.... B) Quote Link to comment Share on other sites More sharing options...
jello1 Posted November 2, 2003 Share Posted November 2, 2003 Hello, I happy to see that you are on this... I was working on a solution but had to stop due to other programming issues... there is a bug... like rodney said the mfg populates the entire mfg row. so the first mfg that your contrib grabs it just multi it on down the list. I do belive you are on to somthing here but i wonder how you can associate the MFG with the product without having a mfg table in the order_products table?... does this way put unneeded stress on the DB?... it's almost there... keep it up! Quote <span style='font-family:Courier'>If you can't fix it Perl it!!!...</span> ****************************** Link to comment Share on other sites More sharing options...
cloudrunner Posted November 5, 2003 Author Share Posted November 5, 2003 Ahhhhh CRAP@!! Will look into it more...gotta be in the loop somewhere. I really really do not want to alter the order table to do this...oh well...off I go!!! Brandon Quote Link to comment Share on other sites More sharing options...
cloudrunner Posted November 5, 2003 Author Share Posted November 5, 2003 (edited) fixed. Have to add one line to orders.php in the admin/includes/classes area, and one name to the query, then make some minor adjustments to the invoice code, but it now shows all the manufacturers for the proper item. Thank you jello1 and carrerarod for finding this! Brandon P.s. Here's the link again: http://www.oscommerce.com/community/contributions,1624 Edited November 5, 2003 by cloudrunner Quote Link to comment Share on other sites More sharing options...
cloudrunner Posted November 5, 2003 Author Share Posted November 5, 2003 does this way put unneeded stress on the DB?... It shouldn't with the update 1.1. The reason is simple, we are now having the orders query simply add one more field to the list it pulls from the database already. We then use that to pull from the mfg list. It shouldn't show any increase as far as I can see other than adding one additional query to the system already in place. But then again, who knows until I can get it tested under a heavy load scenario. Keep me posted with yer thoughts on the fix. Thanks! Brandon Quote Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2005 Share Posted February 21, 2005 hmmm...when i pull up an invoice with products from multiple manufacturers....all products default to the first manufacturer....need to look into this more.... B) <{POST_SNAPBACK}> Does anyone know if the above problem was fixed, or if there is another way to do this. I'm actually trying to add the vendor (supplier) to the order page and can not seem to quite grab how to get this to work correctly. Any help would be great. Thanks Quote Link to comment Share on other sites More sharing options...
bibliopolis Posted March 27, 2007 Share Posted March 27, 2007 hi . i have successfully installed this amazing/handy/fantastik contribution and the products list nicely under their manufacturer. i also list extra fields per products as author and isbn. from the products table what i try to do is to display the manufacturer_url from the manufacturers_info table but i cant make the join of the tables at admin/includes/order.php i have tried to improvise by looking at the manufacturers_info box from the catalog side but i cant understand it *********************************this is the place that the join has to happen :-) $orders_products_query = tep_db_query("select op.orders_products_id, op.products_id, op.products_name,products_person, products_isbn, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.manufacturers_id,m.manufacturers_name from " . TABLE_ORDERS_PRODUCTS . " op left join " . TABLE_PRODUCTS . " p on p.products_id = op.products_id left join " . TABLE_MANUFACTURERS . " m on m.manufacturers_id = p.manufacturers_id where op.orders_id = '" . (int)$order_id . "' order by p.manufacturers_id"); ************************************************************************ while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'products_person' => $orders_products['products_person'], 'products_isbn' => $orders_products['products_isbn'], 'name' => $orders_products['products_name'], 'products_id' => $orders_products['products_id'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'id' => $orders_products['products_id'], 'final_price' => $orders_products['final_price'], 'manufacturers_id' => $orders_products['manufacturers_id'], 'manufacturers_name' => $orders_products['manufacturers_name']); regards from greece george 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.