[checkout] Default quantity patch

whizzkid
whizzkid's picture

Joined: 2006-03-05
Posts: 4
Posted: Fri, 2006-03-31 10:33

I have made an attempt at putting a default quantity in new items added to the cart.

When the cart is viewed it checks for items that have no quantity set for any product. If it finds any, it sets the quantity of the first product on the item's product list to 1.

It works with both the table and drop-down versions of the cart.

I have attached a new version of templates/SelectProducts.tpl which should replace the one supplied with the checkout module. I have also attached a patch for those that prefer it.

I'm new to coding for Gallery so please make backups of any files you change and test it thoroughly before accepting it.

Mike.


Gallery version = 2.1 core 1.1.0
PHP version = 4.1.2 apache
Webserver = Apache
Database = mysql 3.23.49-log, lock.system=database
Toolkits = Gd, NetPBM, Exif
Acceleration = none, none
Operating system = Linux (Debian 3.0)
Default theme = matrix
Locale = en_GB
Browser = Mozilla/5.0 Gecko/20050920 Firefox/1.0.7 SUSE/1.0.7-0.1

AttachmentSize
SelectProducts.tpl.patch.txt2.32 KB
SelectProducts.tpl.txt6.87 KB
 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Fri, 2006-03-31 20:36

Excellent! Thank you again, this is another feature request I can cross off. I'll patch the code ready for the weekend release :)

 
amulrooney

Joined: 2006-07-03
Posts: 5
Posted: Mon, 2006-07-10 10:46

You top, top person.

This is exactly what I needed.

Cheers

Al.

 
saul11

Joined: 2005-10-04
Posts: 109
Posted: Mon, 2006-12-04 19:18

has this been added to the released files yet?

 
depach

Joined: 2006-11-19
Posts: 2
Posted: Wed, 2006-12-06 20:46

doesnt look like its added yet, i think it must have slipped his mind :)

If a customer doesnt add a quantity, the product doesnt show in the cart but shows up on checkout, for free!

 
barleywine

Joined: 2007-04-10
Posts: 24
Posted: Mon, 2007-06-04 17:26

Hi,

It looks like this is not a current thread, but I'll try anyway.

Several weeks ago I was looking for some help in using the Checkout module with Gallery 2.2
(See the unanswered post here)

I have tried starting from scratch with creating a completely new gallery with a new database, uploaded and configured the checkout module successfully, and re-entered every one of the 39 items with the custom fields and per-item pricing exactly as detailed in the directions. I get the exact same result as before - a shopping cart page with the thumbnail of the item, but empty fields when you try to add a quantity.

Then I found this patch, and thought it might solve my problem and it almost did - it added a default quantity of one (which I needed too), but I still have the original problem of the cart page not recognizing the custom field info, and not allowing me to go to checkout.
[img]http://anneleinb.com/screenshot.jpg[/img]

I briefly thought about using ZenCart instead, but saw how much trouble people were having with that too, and I really just need this simple cart to paypal solution.

Here's the rebuilt new version of the gallery - using Matrix for now but eventually going back to PGTheme like I was using before:
http://anneleinb.com/g2/main.php

My client has been waiting patiently for weeks now for this to be resolved - please please please, can anyone help me?
I asked nicely several times before and never even got a response.

Thanks for ANY help on this,

 
whizzkid
whizzkid's picture

Joined: 2006-03-05
Posts: 4
Posted: Mon, 2007-06-04 17:45

Have a look at the new improved version of the checkout modules: http://gallery.menalto.com/node/61732

I have just tried them out and they work great.

 
barleywine

Joined: 2007-04-10
Posts: 24
Posted: Mon, 2007-06-04 18:53

Wow - thanks for the quick reply!

I can't beleive I missed this - I've been scouring the forums for weeks now.

I'll give this a try and let you know.

 
barleywine

Joined: 2007-04-10
Posts: 24
Posted: Mon, 2007-06-04 19:41

Thank you thank you thank you!!!!!!

In showing me this new version of checkout, it also helped me find the tiny little problem that was keeping my custom fields from showing up - I forgot to add the name along with the price (duh).
Now I can finally finish this site!

Thank so you much for taking the time to reply!