New Gallery Cart Mod - Jenado Cart
pomeroyt
Joined: 2002-10-14
Posts: 18 |
Posted: Fri, 2004-02-13 03:10 | |||
EDIT: 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/ 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
|
||||
Posts: 2
Just a big thanks to Tim who helped me to change the shopping cart ok to work for UK orders.
Cheers
Chris
Posts: 98
Jenado rocks! The final release is perfect..no bugs found.. :D
Posts: 126
Great, glad you started a new topic
Posts: 6
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:
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:
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:
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...
Posts: 3
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
Posts: 6
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!
Posts: 18
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
Posts: 18
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
Posts: 6
Tim what's the gallery API?
Posts: 3
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
Posts: 21
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?
Posts: 6
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:
A bug of some sort?
Thanks,
Joaquim
Posts: 21
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...
Posts: 3
i'm getting some code errors too -
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) -
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
Posts: 32
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
Posts: 60
Anywhere that explains hwo to set this cart up? I am very intrested in trying it out!
Posts: 2
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!!!
Posts: 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.
Posts: 2
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 = "";
Posts: 11
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.
Posts: 6
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!
Posts: 25
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
Posts: 32
Hi Ccast, I'm still having problems with the admin notification. At which line should I inculde the mod you gave? J
Posts: 6
There is a typo in this code, which might be why you are having trouble.
Instead of:
it should be:
(an additional quotation mark in the date function)
Joaquim
Posts: 32
Thank You,
that did the trick. J
Posts: 32
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
Posts: 6
I would like to test the cart software but I can't see the download link...any help would be greatly appreciated....
Posts: 6
either your browser is messed up or you're just blind.
Posts: 18
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
Posts: 18
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
Posts: 18
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
Posts: 18
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
Posts: 6
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
Posts: 6
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?
Posts: 17
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!!!
Posts: 6
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...
Posts: 27300
cbrown,
http://gallery.menalto.com/index.php?name=PNphpBB2&file=download&id=354
Posts: 1
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
Posts: 6
Thanks, Floridadave......
Posts: 4
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.
Posts: 3
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.
Posts: 1
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
Posts: 1
What about using this within PHP Nuke? I tried and it did not work right.
Posts: 20
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
Posts: 1
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
Posts: 1
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
Posts: 565
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
Posts: 13
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
Posts: 11
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!
Posts: 13
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?