Thread: Quick Order

Results 1 to 10 of 54

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Quick Order

    Assuming you're using the latest version of the quick orders module, you can make a couple edits to manage sorting:

    Edit the /includes/classes/ajax/zcAjaxQuickOrder.php file ... around line 39 you'll see a section like the following. Add the lines in red, as shown:
    Code:
          while (!$result->EOF) {        $product_list_array[$result->fields['products_model']] = $result->fields['products_name'];
            $result->MoveNext();
          }
    
    
          // sort specifically by the order listed in the $qo_model_array() in the config file:
          $temp_array = $product_list_array;
          $product_list_array = array();
          foreach($qo_model_array as $key) {
            $product_list_array[$key] = $temp_array[$key];
          }
          unset($temp_array);
    
    
          // Uncomment the next line to sort by products_model
          // ksort($product_list_array);
    
    
          // Uncomment the next line to sort by products_name
          // asort($product_list_array);
    
    
    
    
          // finally, build list of models for menu use
          if (is_array($product_list_array)) {
            $product_list_models = array_keys($product_list_array);
          }
        }
    EDIT:
    I've added a variation of this code to the downloadable plugin, so that all sorting can be controlled by a new setting $qo_model_sortorder in the qo_settings.php file.
    Last edited by DrByte; 20 Jun 2015 at 09:35 PM. Reason: updated
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Quick Order

    I've added a variation of the above sorting code to the latest update of the plugin, so that all sorting can be controlled by a new setting $qo_model_sortorder in the qo_settings.php file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jan 2016
    Location
    louisville, ky
    Posts
    1
    Plugin Contributions
    0

    Default Re: Quick Order

    Quote Originally Posted by DrByte View Post
    I've added a variation of the above sorting code to the latest update of the plugin, so that all sorting can be controlled by a new setting $qo_model_sortorder in the qo_settings.php file.
    Hi - great plugin - btw is there a way to make it default to the qty of 1 after typing in the model number, etc.? I am trying to use a barcode reader and the model is the same number as the upc for now and it will read the model number, but then stops and gives an error as opposed to going on to the next line.? Any help is appreciated. Thanks

 

 

Similar Threads

  1. v154 Quick Order - How to change sort order?
    By anduril3019 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Jun 2015, 09:09 PM
  2. v138a Quick Re-order aka order_history.php history beyond last order
    By beyerg in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Jan 2012, 11:14 PM
  3. Quick Order
    By medgollc in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 27 Dec 2010, 06:20 PM
  4. Quick Re-order
    By LoriW. in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 30 Sep 2007, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg