Contributions
Manufacturer Name On Admin's Invoice
* What this does: *
Well, basically, I needed to be able to see what manufacturers were being ordered from when a customer placed an order. The reason for this is that I dropship and have many suppliers for my items. That being the case I found that some model numbers were the same, while the items were different across many manufacturers. Thus, I needed to see EXACTLY what was being ordered and from which supplier.
This contribution simply puts the manufacturer's name on the invoice right after the product's name and attributes.
* Who could use this? *
Anyone who has multiple vendors, and doesn't wanna do alot of hacking as this is a simply insert code hack in one file period.
I would suggest this contribution to anyone who dropships just to keep your own sanity ;-}
I know there has to be a better way to come up with the products_id other than the way I've done it, and if I find it I will update the contribution. Until then this is the only way I could get the products_id to show. I tried using $orders->products[$i]['id'] and even though that SHOULD work it didn't so I'm stuck here. If you find a way to do this please let me know at shoppe@noblepagan.com.
The reason for this is simple, if you have two products with the EXACT same products_name, then ony your first one will show, and that may or may not be correct.
So far that is the only limitation to this contribution. I will update it as I find better ways of doing this.
)O( Cloudrunner )O(
The Noble Pagan
http://www.noblepagan.com
http://shop.noblepagan.com
noblepagan@noblepagan.com
shoppe@noblepagan.com
Expand All / Collapse All
Just made a little bigfix (tep query).
Now everything works fine :)
have a lot of fun...
This is only the install text file, there are no .php files included in this release, as the instructions are simple enough to copy and paste, and I found that the included files in earlier versions had certain extra modules in them that my database didn't recognize...
The change in this version is that items are now broken up into separate data table boxes based on manufacturer name, with a nice big heading above each one with the manufacturer's name, and all related items grouped under it... This should make it even easier for the drop-shipping store owner to do what they have to do :)
Enjoy!
With the new update, now you can see the Manufacturers at SHoppin Cart, that makes thats good when the products get the same name.
Here on the zip file i sent just the txt file you need ready and make the changes, i couldnīt send my files because itīs changed at all.
Under here itīs the update, in the file itīs all the information about the contribuition * Manufacturer Name On Admin's Invoice and SHopping Cart*
********************************************************************* SHopping Cart - Update
*********************************************************************************************
* In /catalog/shoppingcart.php find the following line near the bottom of the file: *
*********************************************************************************************
Find:
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
}
$cur_row = sizeof($info_box_contents) - 1;
***********************************************
* Below that add the following lines of code: *
***********************************************
// Manufacturer Listing
$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$products[$i]['id']."'");
$v = tep_db_fetch_array($v_query);
//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output
$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");
$mfg = tep_db_fetch_array($mfg_query);
//echo '</td> <td class="dataTableContent" valign="top">' . $mfg['manufacturers_name'] . '</td>';
// End Manufacturer Listing
*************************************************************************************************In /catalog/shoppingcart.php
Find:
$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);
***********************************************
* Below that add the following lines of code: *
***********************************************
$products_manufacturers = '<table border="0" cellspacing="2" cellpadding="2">' .
'<tr>' .
'<td class="productListing-data" valign="top"><b>' . $mfg['manufacturers_name'] . '</b>'.
'</td>' .
'</tr>' .
'</table>';
* Manufacturer Name On Admin's Invoice *
* Version 1.1 (Updated) *
* What's New? *
A special thank you goes to carrerarod and jello1 on the osCommerce forums for helping me out with a little bug testing on this one.
Alrighty, on to business. The updated 1.0 setup does enable you to view the manufacturer on the invoice, but only the first one is displayed....for each product.
I added a few more codes on the system, but have kept it as harmless as possible.
Enjoy!
* What this does: *
Well, basically, I needed to be able to see what manufacturers were being ordered from when a customer placed an order. The reason for this is that I dropship and have many suppliers for my items. That being the case I found that some model numbers were the same, while the items were different across many manufacturers. Thus, I needed to see EXACTLY what was being ordered and from which supplier.
what this system will NOT do at this time is sort the products by Manufacturer...yet. IOW, I am working on this. I am attempting to keep this contribution as simple as possible while providing the greatest amount of flexibility possible without muckin' with the database system, and without any great modifications to the core osCommerce file system.
When I proposed this idea to the community at large, the major answer i got was, "you'll need to modify the database so that each order stores the information you are looking for...". But why? The system already pulls all the data you'll need to collect a name for your manufacturer on the invoice. That being the case, I wen't searching for a way. I found it and it works nicely for me. I'm looking forward to your opinions, as I've tried to keep the installation down to two steps, and no SQL mods. So far I have.
Enjoy!
* Who could use this? *
Anyone who has multiple vendors, and doesn't wanna do alot of hacking as this is a simply insert code hack in one file period.
I would suggest this contribution to anyone who dropships just to keep your own sanity ;-}
* ToDo *
Make the system list products sorted either by Manufacturer name, or by Product Name, or by order ID.
* Addendum *
The system is now updated, I think I've covered all the bases on this one, but feel free to hit me up on the forums if you find a bug.
Please feel free to discuss about any problems for this short and quick mod here:
http://forums.oscommerce.com/index.php?showtopic=63954
)O( Cloudrunner )O(
The Noble Pagan
http://www.noblepagan.com
http://shop.noblepagan.com
noblepagan@noblepagan.com
shoppe@noblepagan.com
* Manufacturer Name On Admin's Invoice *
* Version 1.0 (Updated) *
* What's New? *
YEAH!!!
I found the secret to getting the products_id for the items ordered in the loop. What this means is that the system now reads EXACTLY the product that you are looking for, and will display the manufacturer's name properly on each item.
I have also provided a "write-over" file that you can simply drop onto the admin folder and over-write your existing invoice.php for those of you with an unmodified /admin/invoice.php from an MS2 installation.
* What this does: *
Well, basically, I needed to be able to see what manufacturers were being ordered from when a customer placed an order. The reason for this is that I dropship and have many suppliers for my items. That being the case I found that some model numbers were the same, while the items were different across many manufacturers. Thus, I needed to see EXACTLY what was being ordered and from which supplier.
What this system will NOT do at this time is sort the products by Manufacturer...yet. IOW, I am working on this. I am attempting to keep this contribution as simple as possible while providing the greatest amount of flexibility possible without muckin' with the database system, and without any great modifications to the core osCommerce file system.
When I proposed this idea to the community at large, the major answer i got was, "you'll need to modify the database so that each order stores the information you are looking for...". But why? The system already pulls all the data you'll need to collect a name for your manufacturer on the invoice. That being the case, I wen't searching for a way. I found it and it works nicely for me. I'm looking forward to your opinions, as I've tried to keep the installation down to two steps, and no SQL mods. So far I have.
Enjoy!
* Who could use this? *
Anyone who has multiple vendors, and doesn't wanna do alot of hacking as this is a simply insert code hack in one file period.
I would suggest this contribution to anyone who dropships just to keep your own sanity ;-}
* ToDo *
Make the system list products sorted either by Manufacturer name, or by Product Name, or by order ID.
* Addendum *
I found the proper way to grab the definitive products_id. So now the old limitation of the possibility of two products having the EXACT same description and causing problems is gone.
Please feel free to discuss about any problems for this short and quick mod here:
http://forums.oscommerce.com/index.php?showtopic=63954
)O( Cloudrunner )O(
The Noble Pagan
http://www.noblepagan.com
http://shop.noblepagan.com
noblepagan@noblepagan.com
shoppe@noblepagan.com
* What this does: *
Well, basically, I needed to be able to see what manufacturers were being ordered from when a customer placed an order. The reason for this is that I dropship and have many suppliers for my items. That being the case I found that some model numbers were the same, while the items were different across many manufacturers. Thus, I needed to see EXACTLY what was being ordered and from which supplier.
This contribution simply puts the manufacturer's name on the invoice right after the product's name and attributes.
* Who could use this? *
Anyone who has multiple vendors, and doesn't wanna do alot of hacking as this is a simply insert code hack in one file period.
I would suggest this contribution to anyone who dropships just to keep your own sanity ;-}
I know there has to be a better way to come up with the products_id other than the way I've done it, and if I find it I will update the contribution. Until then this is the only way I could get the products_id to show. I tried using $orders->products[$i]['id'] and even though that SHOULD work it didn't so I'm stuck here. If you find a way to do this please let me know at shoppe@noblepagan.com.
The reason for this is simple, if you have two products with the EXACT same products_name, then ony your first one will show, and that may or may not be correct.
So far that is the only limitation to this contribution. I will update it as I find better ways of doing this.
)O( Cloudrunner )O(
The Noble Pagan
http://www.noblepagan.com
http://shop.noblepagan.com
noblepagan@noblepagan.com
shoppe@noblepagan.com
Note: Contributions are used at own risk.