New Gallery Cart Mod - Jenado Cart

pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Fri, 2004-02-13 03:10

EDIT:
This thread is toooo long to follow and the original code is not maintained therefore; I am pleased to announce the release of a new cart mod for Gallery v1.5
Please see Gallery Cart - a cart module for Gallery v1.5
& see the Project: Gallery Cart on SourceForge.

floridave

I recently installed the FOOLIE shopping cart and was really pleased with its overall flow and look and feel. However, customizing it proved to be very problem-matic. I noticed that there were several changes made to the "view_album.php" which made me a little uncomfortable and I wasn't very excited about the way that the cart manages the items within it ... so I started from scratch and wrote a compltely new cart with the same look and feel as the fooliecart. This new cart does not require any changes to the native Gallery files ... all changes occur in the cart config and the html_wrap. In addition the item types are in one multi-dimensional array stored in the config file ... just make the change in one place and all the drop downs are updated ... yippie. I have also added an admin interface and PayPal "donation" support to the cart. I've installed this new cart on my test server at home so you'll have to deal with my cable speeds if you want to demo the cart. Here is the informtaion for the test server:

Gallery Address : http://beta.syncwerks.com/gallery/
Order Admin Address : http://beta.syncwerks.com/gallery/cart/admin.php
Admin Username : admin
Admin Password : admin
User Username : demo
User Password : demo

Feel free to submit some orders and play with the admin interface.

If you want to try the cart please feel free to download it from the link below. I have also included some screenshots of the admin interface.

Tim

AttachmentSize
snap2.gif46.45 KB
 
ChrisLee

Joined: 2004-02-09
Posts: 2
Posted: Fri, 2004-02-13 19:08

Just a big thanks to Tim who helped me to change the shopping cart ok to work for UK orders.

Cheers
Chris

 
iwantmyphoto

Joined: 2003-11-05
Posts: 98
Posted: Sat, 2004-02-14 02:00

Jenado rocks! The final release is perfect..no bugs found.. :D

 
loxly

Joined: 2003-01-28
Posts: 126
Posted: Sat, 2004-02-14 08:48

Great, glad you started a new topic :)

 
jhailer

Joined: 2004-02-02
Posts: 6
Posted: Mon, 2004-02-16 04:20

First of all, I can't rave enough about this cart, it is perfect for what I need. Unfortunately I am still having a few problems, and if any PHP wizards think the solution is obvious, please steer me in the right direction.

I installed a fresh gallery and a fresh cart, went through an order, and everything worked fine. From the second test order on, I am getting the following warnings:

on the admin.php page, I get:

Quote:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/joaquim/public_html/galleries/cart/inc/config.php:98) in /home/joaquim/public_html/galleries/session.php on line 60

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/joaquim/public_html/galleries/cart/inc/config.php:98) in /home/joaquim/public_html/galleries/session.php on line 60

I get these same warnings on any of the status/details/etc pop ups that are accessed by that admin.php page.

Or, if I start a new shopping spree and add anything to the cart, I get:

Quote:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/joaquim/public_html/galleries/cart/inc/config.php:98) in /home/joaquim/public_html/galleries/cart/cart.php on line 9

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/joaquim/public_html/galleries/cart/inc/config.php:98) in /home/joaquim/public_html/galleries/cart/cart.php on line 9

I get this warning at every stage of the checkout and ordering process.

Finally, on the final cart.php page (the Please Send a Check to 123 Address.... or Please complete with Paypal button), I get:

Quote:
Warning: Invalid argument supplied for foreach() in /home/joaquim/public_html/galleries/cart/inc/functions.php on line 211

Warning: Invalid argument supplied for foreach() in /home/joaquim/public_html/galleries/cart/inc/functions.php on line 188

It appears under the cart headers but above "Thank You".

Any insight into these problems would be wonderful. In a previous cart version I moved Session_Start() to a different line, and that solved the first two warnings, but I still got the Invalid Arguement warnings.

Thanks in advance...

 
sock

Joined: 2004-02-16
Posts: 3
Posted: Mon, 2004-02-16 16:45
ChrisLee wrote:
Just a big thanks to Tim who helped me to change the shopping cart ok to work for UK orders.

Cheers
Chris

awesome work, i'd also be very interested in using this for a UK based site - would it be possible for you to post the code changes on this mod?

thanks in advance,
chris

 
Piercey

Joined: 2004-02-17
Posts: 6
Posted: Tue, 2004-02-17 04:43

nice work Tim. How would I change the info that is after "Item :" right under the picture? Right now it's pulling the filename. I'd like to change it to what I put for the title if possible...

thanks!

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Tue, 2004-02-17 16:20
Piercey wrote:
nice work Tim. How would I change the info that is after "Item :" right under the picture? Right now it's pulling the filename. I'd like to change it to what I put for the title if possible...

thanks!

to modify what the item name is all you have to do is edit the "$picture" variable in the "html_wrap/inline_photothumb.frame" and "html_wrap/inline_photo.footer". Please refer to the gallery API for the proper variables to reference to get the name you desire. Good luck and let me know if you run into any problems.

Tim

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Tue, 2004-02-17 16:22
sock wrote:
ChrisLee wrote:
Just a big thanks to Tim who helped me to change the shopping cart ok to work for UK orders.

Cheers
Chris

awesome work, i'd also be very interested in using this for a UK based site - would it be possible for you to post the code changes on this mod?

thanks in advance,
chris

I'll have to see if I can get together with ChrisLee and put together another distro that combines his modifications with my current cart ... maybe even make it something that is configurable ... that'd be cool.

Tim

 
Piercey

Joined: 2004-02-17
Posts: 6
Posted: Tue, 2004-02-17 16:28
pomeroyt wrote:

to modify what the item name is all you have to do is edit the "$picture" variable in the "html_wrap/inline_photothumb.frame" and "html_wrap/inline_photo.footer". Please refer to the gallery API for the proper variables to reference to get the name you desire. Good luck and let me know if you run into any problems.

Tim

Tim what's the gallery API?

 
sock

Joined: 2004-02-16
Posts: 3
Posted: Tue, 2004-02-17 16:41
pomeroyt wrote:
sock wrote:
ChrisLee wrote:
Just a big thanks to Tim who helped me to change the shopping cart ok to work for UK orders.

Cheers
Chris

awesome work, i'd also be very interested in using this for a UK based site - would it be possible for you to post the code changes on this mod?

thanks in advance,
chris

I'll have to see if I can get together with ChrisLee and put together another distro that combines his modifications with my current cart ... maybe even make it something that is configurable ... that'd be cool.

Tim

holy-multiquote batman!

but yes, that would be an awesome idea Tim, thanks for your time and effort on this project, it has a great future i'm sure!

chris

 
eldar

Joined: 2003-10-24
Posts: 21
Posted: Wed, 2004-02-18 03:49

This is awesome!!!

The only thing not working for me is the emails when an order is placed...it sends the client emails fine, but I never get any notification.

I saw on the old thread that they may get thrown in the bulkmail/spam folder, but they aren't there on mine. It just doesn't seem to generate one.

Any ideas?

 
jhailer

Joined: 2004-02-02
Posts: 6
Posted: Wed, 2004-02-18 14:41

Hi Tim et al

I noticed that I am getting some of the same warnings on the sample Syncwerks gallery as I get on my own test gallery. Specifically, on the 'Complete' page (http://beta.syncwerks.com/gallery/cart/cart.php) where it asks the customer to send a check, I get:

Quote:
Warning: Invalid argument supplied for foreach() in /var/www/html_beta.syncwerks.com/gallery/cart/inc/functions.php on line 216

Warning: Invalid argument supplied for foreach() in /var/www/html_beta.syncwerks.com/gallery/cart/inc/functions.php on line 193

A bug of some sort?

Thanks,
Joaquim

 
eldar

Joined: 2003-10-24
Posts: 21
Posted: Wed, 2004-02-18 19:45

Hmmm...I'm not seeing that in mine.

I was having problems with emails, but after looking at the code, I don't see anything that sends emails to the administrator when a new order comes in so I added it.

Now, the script seems flawless except I don't see the watermarks working...not sure what's up with that...

 
sock

Joined: 2004-02-16
Posts: 3
Posted: Thu, 2004-02-19 16:02

i'm getting some code errors too -

Warning: Access denied for user: 'chrisql@localhost' (Using password: YES) in /home/virtual/site28/fst/var/www/html/gallery/cart/inc/classes.php on line 24

Warning: MySQL Connection Failed: Access denied for user: 'chrisql@localhost' (Using password: YES) in /home/virtual/site28/fst/var/www/html/gallery/cart/inc/classes.php on line 24

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site28/fst/var/www/html/gallery/cart/inc/classes.php on line 25

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site28/fst/var/www/html/gallery/cart/inc/classes.php on line 30

these appear on the order completion page - no billing / shipping / order data is stored in the database.

also, the customer gets an order confirmation email, but admin doesn't get one when an order is submitted...

also, cancelling an order brings up errors on some occasions (not often, but once is more than enough) -

ERROR: requested index [] out of bounds [3]
Fatal error: Call to a member function on a non-object in /home/virtual/site28/fst/var/www/html/gallery/classes/Album.php on line 1064

any help on getting this to work properly, along with the 'UK makeover' as mentioned above, would be greatly apprieciated :)

***edit: i can't access the cart admin either, nor on the demo link you posted above :(

 
sevensleeper

Joined: 2003-11-17
Posts: 32
Posted: Thu, 2004-02-19 18:21

Hi Tim,
great cart I must say. I just had a question to you or anyone who can do this. I'm would like to use this cart for some of my wedding photography that I'm starting right now. I have 9 different packages that couples can choose from i.e. 100 4x5, 16 8x10. Most of the couples prepay for the services.

So the question is if you can add a pull down menu or something with the packages, that will then affect the price. For example when a couple choose package A, they have so and so many picture. So they choose the package from a drop down menu and then pictures, 50 4x5, 10 8x10 and 5 16x20. The price will stay zero since they already paid for it.

But I would like, if they go over the quantity specified in the package, that then it adds the extra price to the cart. Sounds great in concept, right?

So if anyone could help me with that or point me in a direction where I could learn how to do it, i would really appreciate it. Thank You.

Julian

 
jtp755

Joined: 2004-01-27
Posts: 60
Posted: Fri, 2004-02-20 02:39

Anywhere that explains hwo to set this cart up? I am very intrested in trying it out!

 
CCast

Joined: 2004-02-22
Posts: 2
Posted: Sun, 2004-02-22 01:52

This mod is awsome - great CART - The only problem that I am noticing while testing is that my Watermarks are not showing up.

Is there something that is needed to make that happen (other than setting the first item of $watermark to true)?

Thank you!!!

 
dollop

Joined: 2003-06-05
Posts: 11
Posted: Sun, 2004-02-22 02:11

I am really enjoying this cart too. When orders are placed I am not receiving notification. However I am very pleased to have the cart as is.

Huge Kudos.

 
CCast

Joined: 2004-02-22
Posts: 2
Posted: Sun, 2004-02-22 02:20

Although notification to the admin seems to have been mentioned, it does not appear to be included. I modified cart/inc/functions.php toward the end of the inject_cart function

I do not know if this is the best thing to do - but I am trying it out.

sendmail($info[0][8],"Photo Order Received",$text,$email);

////////////////////////////////////////
// add modification to alert admin of order
$text = "A Photo Order has been received from {$info[0][0]} {$info[0][1]},\n"
."and a confirmation email was sent to: {$info[0][8]} on".date("m/d/Y)."\n\n"
."Here is a copy of the confirmation email.\n\n"
."======================================================================\n\n\n"
.$text;

sendmail($email,"NEW PHOTO ORDER RCVD",$text,$email);

/////// end of mod ////////////

$cart = "";

 
cheapscot
cheapscot's picture

Joined: 2003-09-13
Posts: 11
Posted: Sun, 2004-02-22 03:44

I like this mod - thanks a bunch!

Found a problem with verifyEmail() in functions.php. The check for the user name in the email does not allow underscores.
I changed this line:
if ((!eregi("^[a-zA-Z0-9\.\-]+$",$user)) ||

to this by adding \_:
if ((!eregi("^[a-zA-Z0-9\.\-\_]+$",$user)) ||

and it accepts underscores in the user's email name.

 
jhailer

Joined: 2004-02-02
Posts: 6
Posted: Sun, 2004-02-22 04:49

Hi all -

Anyone notice any sort of session conflict with the session.php file in gallery root directory? I keep having trouble with that and can't get to the bottom of it. Seems like I'm the only one having this problem, though!

 
Arlo
Arlo's picture

Joined: 2003-02-20
Posts: 25
Posted: Sun, 2004-02-22 22:49
CCast wrote:
Although notification to the admin seems to have been mentioned, it does not appear to be included.

I found it simplest to just hardcode the CC (or BCC) address into the sendmail function at line 75...but of course a solution like yours is a bit more elegant :)

 
sevensleeper

Joined: 2003-11-17
Posts: 32
Posted: Mon, 2004-02-23 17:34

Hi Ccast, I'm still having problems with the admin notification. At which line should I inculde the mod you gave? J

 
jhailer

Joined: 2004-02-02
Posts: 6
Posted: Mon, 2004-02-23 21:26
CCast wrote:
Although notification to the admin seems to have been mentioned, it does not appear to be included. I modified cart/inc/functions.php toward the end of the inject_cart function

I do not know if this is the best thing to do - but I am trying it out.

sendmail($info[0][8],"Photo Order Received",$text,$email);

////////////////////////////////////////
// add modification to alert admin of order
$text = "A Photo Order has been received from {$info[0][0]} {$info[0][1]},\n"
."and a confirmation email was sent to: {$info[0][8]} on".date("m/d/Y)."\n\n"
."Here is a copy of the confirmation email.\n\n"
."======================================================================\n\n\n"
.$text;

sendmail($email,"NEW PHOTO ORDER RCVD",$text,$email);

/////// end of mod ////////////

$cart = "";

There is a typo in this code, which might be why you are having trouble.

Instead of:

Quote:
date("m/d/Y)."\n\n"

it should be:

Quote:
date("m/d/Y")."\n\n"

(an additional quotation mark in the date function)
Joaquim

 
sevensleeper

Joined: 2003-11-17
Posts: 32
Posted: Mon, 2004-02-23 22:06

Thank You,

that did the trick. J

 
sevensleeper

Joined: 2003-11-17
Posts: 32
Posted: Mon, 2004-02-23 23:19

Hey,

I love this cart and am almost realizing what I set out to do. I turned on the water marking but the image that is created looks really strange. Here take a look:

http://reeltorealproductions.com/gallery/steveswedding/098_G

Let me know if you ahve an idea. Thanks J

 
cbrown

Joined: 2004-02-25
Posts: 6
Posted: Wed, 2004-02-25 21:55

I would like to test the cart software but I can't see the download link...any help would be greatly appreciated....

 
Piercey

Joined: 2004-02-17
Posts: 6
Posted: Thu, 2004-02-26 03:03
cbrown wrote:
I would like to test the cart software but I can't see the download link...any help would be greatly appreciated....

either your browser is messed up or you're just blind.

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Thu, 2004-02-26 04:21
sevensleeper wrote:
Hey,

I love this cart and am almost realizing what I set out to do. I turned on the water marking but the image that is created looks really strange. Here take a look:

http://reeltorealproductions.com/gallery/steveswedding/098_G

Let me know if you ahve an idea. Thanks J

My guess is that you have GD2.0 ... in your case modify all occurances of "ImageCreate" in watermark.php to "ImageCreateTrueColor". In my next release of the cart I will be addressing this issue.

Tim

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Thu, 2004-02-26 04:22
jhailer wrote:
CCast wrote:
Although notification to the admin seems to have been mentioned, it does not appear to be included. I modified cart/inc/functions.php toward the end of the inject_cart function

I do not know if this is the best thing to do - but I am trying it out.

sendmail($info[0][8],"Photo Order Received",$text,$email);

////////////////////////////////////////
// add modification to alert admin of order
$text = "A Photo Order has been received from {$info[0][0]} {$info[0][1]},\n"
."and a confirmation email was sent to: {$info[0][8]} on".date("m/d/Y)."\n\n"
."Here is a copy of the confirmation email.\n\n"
."======================================================================\n\n\n"
.$text;

sendmail($email,"NEW PHOTO ORDER RCVD",$text,$email);

/////// end of mod ////////////

$cart = "";

There is a typo in this code, which might be why you are having trouble.

Instead of:

Quote:
date("m/d/Y)."\n\n"

it should be:

Quote:
date("m/d/Y")."\n\n"

(an additional quotation mark in the date function)
Joaquim

Thank you Joaquim for adding this back into the code release ... I had removed it between the beta and the first release when I did the re-org on the "verify" process. I will be re-adding this to the next release of the code.

Tim

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Thu, 2004-02-26 04:25
sevensleeper wrote:
Hi Tim,
great cart I must say. I just had a question to you or anyone who can do this. I'm would like to use this cart for some of my wedding photography that I'm starting right now. I have 9 different packages that couples can choose from i.e. 100 4x5, 16 8x10. Most of the couples prepay for the services.

So the question is if you can add a pull down menu or something with the packages, that will then affect the price. For example when a couple choose package A, they have so and so many picture. So they choose the package from a drop down menu and then pictures, 50 4x5, 10 8x10 and 5 16x20. The price will stay zero since they already paid for it.

But I would like, if they go over the quantity specified in the package, that then it adds the extra price to the cart. Sounds great in concept, right?

So if anyone could help me with that or point me in a direction where I could learn how to do it, i would really appreciate it. Thank You.

Julian

Sounds like a completely new mod ... but now that you mention it ... it also sounds like a good idea. Once I finish up on this other prject I'm working on maybe I'll start up on this one ... send me a an email at

so we can discuss your ideas.

Tim

 
pomeroyt
pomeroyt's picture

Joined: 2002-10-14
Posts: 18
Posted: Thu, 2004-02-26 04:27
cheapscot wrote:
I like this mod - thanks a bunch!

Found a problem with verifyEmail() in functions.php. The check for the user name in the email does not allow underscores.
I changed this line:
if ((!eregi("^[a-zA-Z0-9\.\-]+$",$user)) ||

to this by adding \_:
if ((!eregi("^[a-zA-Z0-9\.\-\_]+$",$user)) ||

and it accepts underscores in the user's email name.

great catch ... I'll be sure to add this to my next code release. Nothing like open source for helping to find stupid coding mistakes ... must have been one of those late nights ... or maybe a beer or two too many. :)

Tim

 
cbrown

Joined: 2004-02-25
Posts: 6
Posted: Thu, 2004-02-26 15:36

Well, I'm certainly not blind....so I must have a problem with my browser, can some kind person post the link to the download.....Many thanks in advance

 
Piercey

Joined: 2004-02-17
Posts: 6
Posted: Thu, 2004-02-26 16:01

well the download is at the very bottom of the first post. also, make sure that you're scolled all the way over to the right because it's a wide post.

what browser are you using?

 
stubby

Joined: 2004-02-26
Posts: 17
Posted: Thu, 2004-02-26 22:27

Hi All,

I'm fairly new to all this PHP stuff, but have got Gallery up & running. However, I've followed the readme in the cart mod, but all I'm getting now is the following in the header:

Warning: Failed opening './cart/inc/config.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/xponent/html/mdp/gallery/html_wrap/cart.config.php on line 3

What's wrong? :(

[27/02/2004]
DOH - Fixed this, should have realised it was all to do with permissions!!!

 
cbrown

Joined: 2004-02-25
Posts: 6
Posted: Fri, 2004-02-27 16:16

i'm using IE6, my screen resolution is set to 1024x768 so I only had to scroll to the right a little bit to see the entire post but the link is just not showing up me...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-02-27 17:38
 
in-sight

Joined: 2004-02-29
Posts: 1
Posted: Sun, 2004-02-29 13:15

This is an amazing cart! I love it. The install was easy. I had a couple of problems with the admin email, but the prior posts made it clear how to fix things.

I have two questions:

1) I have three types of clients: a) fine art b) event photography c) portraits

I want to have three sets of prices. Is this possible to do with the current set-up? If not, can anyone think of a modification? I was thinking I could have three different gallery/cart installations, but I would rather keep it simple.

2) When a client cancels the order, no admin notification is sent. Can someone share how I can: a) prevent someone from cancelling the order or b) set-up admin notification.

in-sight

 
cbrown

Joined: 2004-02-25
Posts: 6
Posted: Mon, 2004-03-01 02:23

Thanks, Floridadave......

 
cross2010

Joined: 2004-01-17
Posts: 4
Posted: Thu, 2004-03-04 02:29

Hi Everyone,

First off, I would like to thank Tim for creating such a user friendly add-on to Gallery. You ROCK!

Is there any way to setup the zip code section of the order form to include letters? I'm Canadian, and we have alpha-numeric zip codes (i.e. A1A 1A1). I figured out how to modify the 'state' section and added the provinces.

I welcome your comments.

Cheers,
Richard.

 
nalim00

Joined: 2004-03-04
Posts: 3
Posted: Thu, 2004-03-04 15:51

So I've been trying to add the shopping cart to the gallery I've been using and at first glance I thought it went in perfectly no problems. You look at it and all the thumbs for the albums are there, but then I went into the albums. When I got in the albums I think everything was there except the thumbs of the actual pictures. So here's the error I keep getting:

Warning: main(./html_wrap/frames//frame.def): failed to open stream: No such file or directory
in ../gallery/html_wrap/inline_imagewrap.inc on line 78

Warning: main(): Failed opening './html_wrap/frames//frame.def' for inclusion (include_path='.:/s2/intranet/php') in ../gallery/html_wrap/inline_imagewrap.inc on line 78

Any ideas would be helpful. I looked through the code and couldn't really see what was going on so I had someone a lot wiser than I look at it and he thought it may have something to do $frame in the inline_imagwrap.inc. When I move the frame.def file up from the picture folder I don't get an error but I just get this tiny box. Or my friend just made $frame = none and that made the box appear too. I don't know where else to go so any help would be great. Thanks.

Update:
So we finally fixed the problem. It turned out that the $href and $tag variables in the inline_imagewrap.inc where calling for 'imageHref' and 'imageTag' which were never getting passed down. So we changed it to 'thumbHref' and 'thumbTag' and all got better for the picture showing up.
Next we found that the cart button was working when you were viewing a single photo (in view_photo.php) but while not while looking at multiple images (in view_album.php). To fix that we had to add

."<form name=\"buy{$picture}\" action=\"{$home}/cart.php?action=add\" method=\"post\">"

after the

echo "<center><div style=\"padding:5px;\"><font size=\"-1\"><b>Item</b> : {$picture}</font></div>"

line. Because it wasn't recognizing a form. Ok, big headache done for that, woo hoo. Hope this helps if anyone needs it.

 
digitalman

Joined: 2004-03-04
Posts: 1
Posted: Thu, 2004-03-04 21:11

hello all,
great cart, i almost have it working properly...
sometimes while going from the invoice thank you page to the paypal page i get the following errors,

Warning: Invalid argument supplied for foreach() in /home/heatherl/.panel/web/gallery/cart/inc/functions.php on line 211

Warning: Invalid argument supplied for foreach() in /home/heatherl/.panel/web/gallery/cart/inc/functions.php on line 188

then it only transfers the shipping amount to the paypal page...
anyone have a fix for this?
any help would be greatly appreciated..
thx, gary

 
mano

Joined: 2004-03-07
Posts: 1
Posted: Sun, 2004-03-07 07:03

What about using this within PHP Nuke? I tried and it did not work right.

 
jonday
jonday's picture

Joined: 2002-07-24
Posts: 20
Posted: Sun, 2004-03-07 15:26

Hi

Great cart. Unfortunately I am getting the same errors as several others at the order completion stage, namely:

Warning: Invalid argument supplied for foreach() in /home/virtual/site52/fst/var/www/html/gallery/cart/inc/functions.php on line 211

Warning: Invalid argument supplied for foreach() in /home/virtual/site52/fst/var/www/html/gallery/cart/inc/functions.php on line 188

I would also love to use this cart for a UK based site and need to remove all the coding around zip codes, phone number formats etc. and use a £ etc.

Finally, the watermark issue is also showing up on my server with GD2.0.

Tim, have you had a chance to code a newer version with a UK option and an amended watermark.php?

Many thanks
Jon

 
texasyankee

Joined: 2004-03-10
Posts: 1
Posted: Wed, 2004-03-10 20:53

I have the cart installed and running smoothly thanks to the advice I read on this board!

I would like to work on a modification to allow the users shopping cart to be remembered from session to session. For example, if a bride starts to order pictures and then wants to come back to the site the next day to finish her order the pictures she puts in the cart need to be remembered.

Does anyone have some advice on how I should tackle this? Is this too complicated for cookies? Should we add the order to the database just to hold it?

Thanks!

Jon

 
lucasEn

Joined: 2004-03-15
Posts: 1
Posted: Tue, 2004-03-16 11:11

Tim, et al,

First, I'd like to say great job on the cart mod. It's exactly what I was
looking for.

I've been fiddling around in it, and have ideas that I'd
like to mention here, and hopefully get some feedback.

As another user mentioned, the ability to have 'packages' would be excellent.
The example of a wedding photographer giving the bride and her guests a URL
and letting them pick from a couple of 'packages', which would automatically
add specific pictures to the cart, is ideal. Now, the question is, how
would that be accomplished?

I was thinking of a simple hack that would require intelligent naming of the subAlbums and a hack to the price list, such that any subAlbumName with 'packageN' in its name, for example, would get pricelistN instead of the general price list. This, of course, assumes that /path/to/cart/inc/config.php is loaded every single time an album page is loaded. And, this also assumes that I could grab the album name from within config.php (can I?).

Or, perhaps we could change the code that displays the price list pulldown to look for some keyword in the photo's description or name and then load $items.$keyword[] which would be predefined in the config.php. That seems even easier and wouldn't require the use of subAlbums.

I assume either of these would work, but I'm not sure that either are the
slickest solution. What do you think?

Another feature that I think would be useful would be the ability to turn off
the cart feature for certain albums. I suppose a hack such as the second one
mentioned above would work, where we could just not load the price list pulldown
at all if A) a certain keyword was present, or B) the file was named *keyword*.
I think that A) would be less intrusive, as B) would require files having some
keyword in their name, which could get ugly.

And, of course, there's probably a solution where we could modify the db and add
a field that described the cost of the item (either fixed or some_word to load a
specific $items.$some_word[]) and then we could simply not load the pulldown
and related buttons when an item cost was NULL and/or 0.

Those are my ideas. What do you all think?

Lucas

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Tue, 2004-03-16 15:28

Tim

Your Jornado piece is a Grand Job:-) Thank you. Is there a European edition anywhere in the offing? One without references to US Dollars, US states, US ZIP codes, US telephone numbers and the like? Currently trawling through, tweaking this and that, attempting to teach myself how your facilities work for local customisation... in the fond hope that my meagre coding talents are up to this task;~/ Once again, well done.

best wishes, Robert

 
crangelmd

Joined: 2004-03-17
Posts: 13
Posted: Wed, 2004-03-17 05:34

Great cart. I am also getting the same error mentioned above:
-----------------------------
Cart > Shipping/Billing Information > Confirm > Complete

Warning: Invalid argument supplied for foreach() in C:\websites\shutter\gallery\cart\inc\functions.php on line 211

Warning: Invalid argument supplied for foreach() in C:\websites\shutter\gallery\cart\inc\functions.php on line 188

Thank you

Thank you for your order from our online store. Please complete your order via PayPal by clicking on the following button :
-------------------------------------------

Has anyone found a solution or work around this?

Thanks,

Chrissie

 
cheapscot
cheapscot's picture

Joined: 2003-09-13
Posts: 11
Posted: Thu, 2004-03-18 02:48

I've modified this great mod to do a few things I and others have wanted:

- Alternate pricing for products by Album
- Albums that are not for sale
- Custom product lists per album (e.g. photo packages)

My implementation could be better (e.g., more flexible product pricing) and there are more changes I still want to do. See the changes.txt file for a list of what I have done.

Some other major changes to note:
- Moved the product list to the database
- Added some attributes to the cart array and cart table
- Administration of products and the other new options is integrated into the orders admin screens.

You will need to use my modified table setup file in the sql directory called new_sql.txt. Other than that, the original readme.txt and setup should be the same. Have fun!

 
crangelmd

Joined: 2004-03-17
Posts: 13
Posted: Thu, 2004-03-18 20:37
nalim00 wrote:
... Next we found that the cart button was working when you were viewing a single photo (in view_photo.php) but while not while looking at multiple images (in view_album.php). To fix that we had to add

."<form name=\"buy{$picture}\" action=\"{$home}/cart.php?action=add\" method=\"post\">"

after the

echo "<center><div style=\"padding:5px;\"><font size=\"-1\"><b>Item</b> : {$picture}</font></div>"

line. Because it wasn't recognizing a form. Ok, big headache done for that, woo hoo. Hope this helps if anyone needs it.

I have the opposite: the cart works fine when I am selecting a photo from the 'view_album.php' but not when I try to 'add to cart' from 'view_photo.php'.

Anyone has the same issues?