Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice/Packing slip - sort by Model (Products Model)


GwilliamP

Recommended Posts

Our inventory has nearly 2,000 items with Products Models of the A1-xx to Z9-xx style of Model Nimbers which are our location codes for picking orders.

 

To make the work of picking orders easier it would be a tremendous help to have the Invoice/Packing Slip list the purchased items in a sorted order rather than the order they were added to the cart.

 

I have been unable to locate a contribution for this.

 

Forum/Google searching lead me to a possible solution in the German osC forum. The code looked as if it would do what I wanted but I can not read German so am not quite sure.

 

German forum topic - see post #4

 

I tried modifying the Admin files but do not see a change in the output. Could this be because of the if(... code in the function?

 

$sort_products = strnatcmp($x['name'], $y['name']);
if(!$sort_products) return strnatcmp($x['model'], $y['model']);

Unfortunately my PHP is not good enough to make sense of much of this. Combined with the German language barrier I am now stumped.

 

Can anyone offer advice on getting this working?

Link to comment
Share on other sites

Our inventory has nearly 2,000 items with Products Models of the A1-xx to Z9-xx style of Model Nimbers which are our location codes for picking orders.

 

To make the work of picking orders easier it would be a tremendous help to have the Invoice/Packing Slip list the purchased items in a sorted order rather than the order they were added to the cart.

 

I have been unable to locate a contribution for this.

 

Forum/Google searching lead me to a possible solution in the German osC forum. The code looked as if it would do what I wanted but I can not read German so am not quite sure.

 

German forum topic - see post #4

 

I tried modifying the Admin files but do not see a change in the output. Could this be because of the if(... code in the function?

 

$sort_products = strnatcmp($x['name'], $y['name']);
if(!$sort_products) return strnatcmp($x['model'], $y['model']);

Unfortunately my PHP is not good enough to make sense of much of this. Combined with the German language barrier I am now stumped.

 

Can anyone offer advice on getting this working?

 

http://addons.oscommerce.com/info/2328

 

I installed this on the admin side and it works great.

 

Tim

Link to comment
Share on other sites

http://addons.oscommerce.com/info/2328

 

I installed this on the admin side and it works great.

 

Tim

 

WOW! That was fast :)

 

That looks as if it will do the job nicely.

 

I think I cracked the problem I just posted. You know how when you walk away from a problem the solution pops into your head because you are not consciously thinking about it all the time?

 

I simplified the function to only sort by Model - it works a treat (w00t)

 

I will look at the contribution just in case it is simpler.

Link to comment
Share on other sites

WOW! That was fast :)

 

That looks as if it will do the job nicely.

 

I think I cracked the problem I just posted. You know how when you walk away from a problem the solution pops into your head because you are not consciously thinking about it all the time?

 

I simplified the function to only sort by Model - it works a treat (w00t)

 

I will look at the contribution just in case it is simpler.

The mod is very simple. I also changed it to sort by product_model rather than product_name.

 

Tim

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...