Quick Order

Results 1 to 20 of 54
16 Apr 2007, 11:26
#1
dwno avatar

dwno

Totally Zenned

Join Date:
Jan 2005
Posts:
1,285
Plugin Contributions:
0

Quick Order

This module will let your customers add multiple products to cart at once by inserting the products' model numbers and quantities for the order into a simple form.
You will also be able to add any amount of products to cart by entering an URL, see readme for more details.

This mod assumes that product models are unique.
The mod does not work with attributes since products with attributes do not currently have a unique ID for each attribute variation in Zen-Cart.

Get the latest version from the Zen-Cart downloads area
16 Apr 2007, 12:14
#2
dwno avatar

dwno

Totally Zenned

Join Date:
Jan 2005
Posts:
1,285
Plugin Contributions:
0

Re: Quick Order

Version 1.2.3 is now available for download.
Get the latest version of Quick Order.

Changelog:
1.2.3 (2007.04.16) - Modified by Eivind E. Valderhaug

- Properly display path in breadcrumbs (Home :: Order Online).

- Set optional limit and order-by clause in config file (qo_settings.php) for similar matches results when product models are not found.
Previously if a product model was not found, all products that had similar product models would be displayed.

This can now (easily from the config file) be limited to a number and the result can be ordered by one or more columns in the products or products_description tables.

- Use common html header instead of custom header.
The downside is that the custom css file won't get included unless it's copied to the current template css directory.

16 Apr 2007, 12:20
#3
dwno avatar

dwno

Totally Zenned

Join Date:
Jan 2005
Posts:
1,285
Plugin Contributions:
0

Re: Quick Order

Just a notice for those also using the SEFU mod by Tim Kroeger: See this post for how to get these 2 mods to work together properly.
I haven't verified this because I don't use the SEFU mod.
23 Apr 2007, 12:21
#4
andrabr avatar

andrabr

New Zenner

Join Date:
Jan 2007
Posts:
36
Plugin Contributions:
0

Re: Quick Order

dwno:


The mod does not work with attributes since products with attributes do not currently have a unique ID for each attribute variation in Zen-Cart.

:


Guess what, I am trying to solve this problem and in the process have discovered something in functions_general.php:

function zen_get_uprid($prid, $params) creates that unique "productid & attribute mix identifier" that is inserted into the cart.

function zen_get_prid($uprid) is used to extract the product ID from this identifier, but can be adapted to take it apart if necessary.

This could be a perfect way to define a unique product/attribute mix to be put into cart with the "single click URL" feature of Quick Order.

You can see the actual use in actionAddProduct in includes/classes/shopping_cart.php

I know, I know, you are thinking "if you are such a smartass to have done all this research, why don't you make it happen?"

Well, because I have never written more than 6 lines of PHP code, and this one would effectively require one to create an admin version of the cart - with the "product+attribute mix ID" field... :cry:
I just hope someone ;-) will find this useful and just GOES FOR IT

23 Apr 2007, 17:11
#5
dwno avatar

dwno

Totally Zenned

Join Date:
Jan 2005
Posts:
1,285
Plugin Contributions:
0

Re: Quick Order

I'm afraid it's not that easy. Besides, even if it was you'd have to enter things like "59:3b270c58dc0fb4406c0036abeb0b41d4" into the input fields to specify the product "model" for a given attribute variation, and I don't think most customers would be comfortable with that. ;)

Why it's not so easy? Because the function you mention uses md5 encryption (can't be decrypted) on the attribute data to make it unique and so you would need a md5-hash-to-attribute-variation mapping that maps all possible attribute variations to their respective md5 hashes. That's a bad idea though for several obvious reasons. There are better ways of doing it, but it involves too much work for me to do for free anyway and I have no idea how much time it would take. I guess SKU-support would deal with this issue.

Btw, the only thing zen_get_prid() is removing the attribute md5 hash to return the product ID of the base product (without attributes).
23 Apr 2007, 21:22
#6
andrabr avatar

andrabr

New Zenner

Join Date:
Jan 2007
Posts:
36
Plugin Contributions:
0

Re: Quick Order

dwno:

I'm afraid it's not that easy. Besides, even if it was you'd have to enter things like "59:3b270c58dc0fb4406c0036abeb0b41d4" into the input fields to specify the product "model" for a given attribute variation, and I don't think most customers would be comfortable with that. ;)

Why it's not so easy? Because the function you mention uses md5 encryption (can't be decrypted) on the attribute data to make it unique and so you would need a md5-hash-to-attribute-variation mapping that maps all possible attribute variations to their respective md5 hashes. That's a bad idea though for several obvious reasons. There are better ways of doing it, but it involves too much work for me to do for free anyway and I have no idea how much time it would take. I guess SKU-support would deal with this issue.

Btw, the only thing zen_get_prid() is removing the attribute md5 hash to return the product ID of the base product (without attributes).


Got it. I missed the MD5 angle. Damn! - it was such a beautiful dream...

Granted, I use Quick Order not in the way you intended - I never display the form, just generate the URLs that are later embedded into my Wordpress pages, sort of "1-click Add-to-Cart".

Oh well, some day, when I am better at PHP...

BTW, you still get my eternal gratitude for Quick Order as it is:D
17 May 2007, 04:49
#7
godt avatar

godt

Zen Follower

Join Date:
Mar 2006
Posts:
378
Plugin Contributions:
0

Re: Quick Order

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.
21 May 2007, 23:42
#8
andrabr avatar

andrabr

New Zenner

Join Date:
Jan 2007
Posts:
36
Plugin Contributions:
0

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] //only add if does not exceed maximum
if (($add_max == 1 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_CART, zen_get_all_get_params($parameters)));

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

What do you think? :smartalec:
21 May 2007, 23:47
#9
andrabr avatar

andrabr

New Zenner

Join Date:
Jan 2007
Posts:
36
Plugin Contributions:
0

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>
06 Jun 2007, 07:26
#10
nowie avatar

nowie

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

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]$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);[/php]
06 Jun 2007, 10:34
#11
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Quick Order

Hello andrabr

I like the idea of your code. I am sure it doesnt work on my setup as I have Attributes stock mod. I will try it again when the next zencart comes out, and do a fresh install.

Regards,

Heathenmagic
22 Jun 2007, 08:01
#13
dwno avatar

dwno

Totally Zenned

Join Date:
Jan 2005
Posts:
1,285
Plugin Contributions:
0

Re: Quick Order

I don't have time to support this at the moment, but I can answer the last post. :)

lifetimewebhost, Quick Order works with products_model, not products_id, and requires the product model for all your products to be unique. You'll probably want to display the product model on your product pages, so your customers know them.
20 Jul 2007, 13:35
#14
mbheald avatar

mbheald

New Zenner

Join Date:
Feb 2007
Posts:
28
Plugin Contributions:
0

Re: Quick Order

I am creating an order form for a chain of restaurants we supply and they complain that the products are hard to find. Is there a way to sort the products alphabetically by name/model on the order page?
08 Aug 2007, 14:56
#15
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Quick Order

dwno,

Thanks for this wonderful mod! It fits perfectly into my store.

One question I have is if there is any way to turn the fields into "secure" fields? If a customer is rapidly entering product numbers and the field tries to fill in the number automatically, there's a possibility of a mistake being made in ordering. I thought making the field secure would eliminate this auto entry by the browser?

The last post mentions time is not available for support of this mod, but maybe there's a place I can be directed that answers the question? Is there anyone that has already addressed this issue? I tried a "secure field" search in the forum but didn't have any luck. Or maybe this is not even possible?

Thank you in advance!
19 Aug 2007, 06:37
#16
fubr69z avatar

fubr69z

New Zenner

Join Date:
Jun 2007
Posts:
4
Plugin Contributions:
0

Re: Quick Order

I can not find an answer to this post. I would also like to do the same and sort the products alphabetically in the Quick Order module. Is there a way?

fubr69z
24 Aug 2007, 00:47
#17
mbheald avatar

mbheald

New Zenner

Join Date:
Feb 2007
Posts:
28
Plugin Contributions:
0

Re: Quick Order

I am creating an order form for Firehouse Subs Restaurants to order all of their hot sauces on our approved list. however, I have already used this module to create an quick order form for all of our customers to use. I modified the filenames, extra datafiles, language files, template files, and header.php from "quick_order" to "fhs_quick_order" and QUICK_ORDER to "FHS_QUICK_ORDER" in their respecive places and the module will work and add items to the cart. however I am receiving some errors at the bottom of the page that I cannot figure out.

Warning: main(includes/templates/classic/fhs_quick_order//google_analytics.php) [function.main]: failed to open stream: No such file or directory in /home/hotshots/public_html/includes/templates/classic/common/tpl_main_page.php on line 180

Warning: main(includes/templates/classic/fhs_quick_order//google_analytics.php) [function.main]: failed to open stream: No such file or directory in /home/hotshots/public_html/includes/templates/classic/common/tpl_main_page.php on line 180

Fatal error: main() [function.require]: Failed opening required 'includes/templates/classic/fhs_quick_order//google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hotshots/public_html/includes/templates/classic/common/tpl_main_page.php on line 180

My first instinct was to check my install of google analytics, but everthing seems fine there and I am not getting any other errors on any other pages. Can someone please help me? The forms work, but I am slightly embarased by the errors on the bottom of the page. You can see them here:
http://hotshotshotsauce.com/index.php?main_page=fhs_quick_order
31 Aug 2007, 05:10
#18
wolflupo avatar

wolflupo

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: Quick Order

Thank you, Thank you, I will definitly support this module!! Its a lifesaver for me.. I was hoping you could also consider the following, have Quick order as an option on the account menu only after the user logs in. In addition would it be possible to also add prices to the columns in the form.
currently I made the modifications to put Quick Order as a static page in the header from previous posts, but I really would like it to appear under accounts but only after login.
08 Nov 2007, 21:09
#19
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Posts:
2,400
Plugin Contributions:
0

Re: Quick Order

I would like to add a second Quick Order form to my site. I see just above that someone else tried this for Firehouse Subs Restaurants, but had problems. Perhaps they can report back if they solved the problems? And if they could share what they modified to make a second form work, that would be greatly appreciated.

Thanks,

Rob
15 Nov 2007, 02:53
#20
mbheald avatar

mbheald

New Zenner

Join Date:
Feb 2007
Posts:
28
Plugin Contributions:
0

Re: Quick Order

rstevenson:

I would like to add a second Quick Order form to my site. I see just above that someone else tried this for Firehouse Subs Restaurants, but had problems. Perhaps they can report back if they solved the problems? And if they could share what they modified to make a second form work, that would be greatly appreciated.

Thanks,

Rob



Rob,

I have had a some difficulty in my many attempts to configure a second form. Here is what I did:

I started by modifying filenames from qo_ to fhs_qo_. Then I modified each of the files to reference the new filenames in the appropriate places and the form worked.

Later, I heard from one of our customers that the form was cutting off the orders (Uh, oh!) and quickly realized that there was a problem with the error messages. If a customer inputs an incorrect item code the form gives a list of 20 or more products that are not in any way related. I also found that the form will not add products from my preselected list if the user skips products and selects only the ones he wants. The funny thing is that these problems do not occur when using firefox, only using IE.

So I am close, but I have not fixed the problem completely. If you would like to see the live version, go to hotshotshotsauce.com and register for an account with Zen-Cart support as the company name and I will approve you. Corporate wants this fixed yesterday and is putting pressure on me to fix it or take the form down, so you may only have a short amount of time before I have to remove it. I hope we can solve this before then.


Matt