Thread: Quick Order

Page 2 of 2 FirstFirst 12
Results 11 to 20 of 54

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default integrate into product/order page

    Is there some way that the quick order function can be built in to a product page, or into the product order process? Rather than go down the track of setting up attributes - which would get far too messy given the options I have, I would like to have the option to select other products (accessories). If I could get the quick_order thing to function as an adjunct to a product order, that would do it for me.

  2. #2
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Idea or Suggestion Re: Quick Order

    DWNO,

    here is a small improvement (or so I hope) - please review and incorporate into your code (or kill it if it is horribly wrong).

    The following code extends Quick Order to handle ONE (1) REQUIRED attribute.

    So, if you are adding a product via Quick Order and it has REQUIRED attributes, the product will be added into the cart together with one of them (first in the database). Optional attributes are ignored.

    Why only one? - I actually do not know. The SQL query should return all of the required attributes, but it does not. I have run the query in phpMyAdmin, and it works just fine. So, after two hours of banging my head against the wall, I am posting my code here in hope that someone way more qualified takes it and makes it work for multiple required attributes.

    So, the only changes are in the includes/modules/pages/quick_order/header_php.php file around line 185 or so. I am posting a bit of code around mine as well, so that you can see where it belongs. All my comments and variables have "aa" prefix.

    PHP Code:
                            //only add if does not exceed maximum
                            
    if (($add_max == and $cart_qty == 1)) {
                                
    // do not add
                            
    } else {

    // AA get product attributes
          
    $aa_attributes_db $db->Execute("select options_id, options_values_id from " TABLE_PRODUCTS_ATTRIBUTES "
                                 where  products_id = '" 
    $qo_item_info['pid'][$i] . "' and attributes_default='1'");

          
    $aa_attributes = array($aa_attributes_db->fields["options_id"] => $aa_attributes_db->fields["options_values_id"]);

                                
    // check for min/max and add that value or 1

    // AA: Original code was:     $_SESSION['cart']->add_cart($qo_item_info['pid'][$i], $cart_qty+$new_qty);
                                
    $_SESSION['cart']->add_cart($qo_item_info['pid'][$i], $cart_qty+$new_qty$aa_attributes);  // <-AA put new total of the product into cart by ID
                            
    }


                        }
    //end if (isset...
                    
    //end for $i < $total_models

                    
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CARTzen_get_all_get_params($parameters)));

                } 
    //end if $error === false 
    As you can see, it's just three extra lines. I am also attaching the full modified file.

    What do you think?
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: Quick Order

    Oh, and if anyone wonders why even a single required attribute is important... imagine that the product is a downloadable document! (that's why I needed it)

    A>

  4. #4
    Join Date
    May 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Quick Order

    Thank you for this wonderful mod. This is virtually what I was looking to do.

    Question: I would like for customers to be able to type in either model numbers OR product names in the input fields. In this particular case, all model numbers and product names will be unique. I've tried modifying the header_php.php file at line 123 without success as I have limited php/sql experience. Could someone possibly offer some suggestions in achieving this?

    Here is line 123 of header_php.php:
    PHP Code:
    $next_product_id mysql_query(sprintf('select p.products_id, p.products_model from %s AS p where (p.products_model = \'' implode("' OR p.products_model = '"$qo_item_info['model']) . "')"$db->prepare_input(TABLE_PRODUCTS)), $db->link); 

  5. #5
    Join Date
    Jan 2006
    Location
    Downunder - QLD - Gold Coast
    Posts
    964
    Plugin Contributions
    0

    Default Re: Quick Order

    Can we talk about attributes please?

    Would this plugin do this >> http://zucando.com/demo/index.php?ma...id=quick_order
    Downunder QLD

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

    Default Re: Quick Order

    Quote Originally Posted by oavs View Post
    Can we talk about attributes please?

    Would this plugin do this >> (link to zuc ando)
    No. This plugin doesn't have anything to do with the regular product-listing pages as your example showed, let alone injecting attribute-selection into those listings.
    As described, this plugin lets people "quick order" products by entering identifying information about the product in a grid so they can order 100 items on one page by manually typing in product models etc.
    .

    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.

  7. #7
    Join Date
    Nov 2005
    Location
    France
    Posts
    600
    Plugin Contributions
    8

    Default Re: Quick Order

    Tested this module out on a clean install of 1.5.4 as that is what it's listed as supporting, but as soon as I enter a model number I get a popup that says
    "An unknown response null: :text/html; charset=UTF-8: :Internal Server Error was received while processing an ajax call. The action you requested could not be completed."

    No other mods installed. Server is set to PHP 5.6. Database was set to utf-8 at install. Checked all files correctly uploaded. Classic template used for testing.

    Any suggestions?

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,908
    Plugin Contributions
    13

    Default Re: Quick Order

    Quote Originally Posted by strelitzia View Post
    Tested this module out on a clean install of 1.5.4 as that is what it's listed as supporting, but as soon as I enter a model number I get a popup that says
    "An unknown response null: :text/html; charset=UTF-8: :Internal Server Error was received while processing an ajax call. The action you requested could not be completed."

    No other mods installed. Server is set to PHP 5.6. Database was set to utf-8 at install. Checked all files correctly uploaded. Classic template used for testing.

    Any suggestions?
    the jscript_framework.php script in your template needs replacing. see:

    https://www.zen-cart.com/showthread....t-was-received

    play around with that file, as that is where your problem lies....
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 2 of 2 FirstFirst 12

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