Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]Manufacturer Name On Admin's Invoice


cloudrunner

Recommended Posts

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(

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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!

<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Link to comment
Share on other sites

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 by cloudrunner
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
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)

 

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

Link to comment
Share on other sites

  • 2 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...