Jump to content

Packing Sheet Product Display Order


bigpedro

Recommended Posts

There are two ways to do this:

Modify the query used to pull the items for an order to sort the resulting recordset.

Build a complex Smarty plugin function as a modifier to sort the array of items that was given to the template engine.

 

In the admin file /sources/orders.index.inc.php, at around line 423, find:

if (($inventory = $GLOBALS['db']->select('CubeCart_order_inventory', false, array('cart_order_id' => $summary['cart_order_id']))) !== false) {


add the new part:


if (($inventory = $GLOBALS['db']->select('CubeCart_order_inventory', false, array('cart_order_id' => $summary['cart_order_id']), array('product_code'=>'ASC'))) !== false) {

 

There is no single PHP function that will sort an array based on the kth-dimension value. So we will skip that effort.

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
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...