News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

add a Paypal shopping basket to your gallery.

Started by Casper, July 04, 2004, 07:02:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catch22

Screenshots of example of pic needing title before cart shows:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fscientificsound.com%2F01.gif&hash=27063021d8c798fea5e03180b3437ec9d7f1307f)

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fscientificsound.com%2F02.gif&hash=c258e1d3a04a88e8013b336172dc91cce901d5e8)

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fscientificsound.com%2F03.gif&hash=aa3edd3171697b89f451bb3ca932261a28bbb5de)

Casper

Yes, I accepted and agreed it needed a title.  The selection boxes will not show.  But even if they did, the paypal form would have no info on what was being ordered, as it uses the title.

But you originally said it would not work without a description, not title.  This was a problem with the first version of the hack, but should not be happening now.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

JakobG

Is it possible to do this for more than one account on one site? So say you have two users that both have paypal accounts and are using the same website to show their photos?

Casper

Yes, you can have as many installs of coppermine (and that includes ones with this hack) on one website.  You can even have them all use the same database.

What you need to do, is create each install within its own directory, then during install, specify a unique table prefix for each install.  I suggest changing the cookie names as well.

Then each install is totally seperate.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

JakobG

Fantastic, thanks for that!

I've just noticed that I cant batch add any files... the page comes up and shows select the directory and thats it... no actual selection possible! Any ideas?
Should i have created an album and batch added before adding the shop mod?

Casper

This is probably because you added them to the 'userpics' directory.  They must not be in there, but in new folders you create in the albums directory.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

JakobG


Detonate

This is an excellent hack!

And to think I was very close to dropping $399 on LightBox Photo Gallery!

There are a couple of things I was thinking about changing, and was wondering if anyone was interested in helping.

One thing I thought that might be useful would be setting the Prices/Options in the Properties of an Album Menu instead of the Global config.

Also, thinking that passing the filename of the image along with the Title would be very helpful.  If I have 100 pictures name "Red Flower" for example, it would be nice to know exactly which one I need to have printed and ship to the customer!

Has anyone else already worked up something similar before I start code diving?

I've never used Coppermine before, so it'll probably take me a long time to familize myself with the code.

Detonate

Well I got the item name stuff to work.

I'm far from a coder, so use with caution.

In displayimage.php I ADDED:
       '{FILENAME}' => $CURRENT_PIC_DATA['filename'],
AFTER
       '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),

in every theme.php I REPLACED ALL:
name="item_name" value="{TITLE}, size '{$CONFIG['size
WITH
name="item_name" value="{TITLE}, Filename: {FILENAME}, Size: '{$CONFIG['size

So now my Item name looks like Rhino, Filename: zoo_01.jpg, Size: '12x14'

I suppose I could have included the path, but the filename will always be unique for me.

Detonate

Ok, well I did a bit more research and found some info on PayPal Carts and changed some more stuff that may be of interest to others....

Basically I replaced the line having to do with the Item Name with the following lines...
<input type="hidden" name="item_name" value="Photograph Name: {TITLE}">
<input type="hidden" name="item_number" value="{FILENAME}">
<input type="hidden" name="on1" value="Print Size">
<input type="hidden" name="os1" value="{$CONFIG['size1']}">


Now I get the Photo's Title, Image Name, Print Size, and Print Paper all in visually seperate areas.  I think this makes for the least confusing display for the average customer checking out.

Here is what the Cart Looks like...
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.redreefscuba.com%2Fforum%2Fcart.jpg&hash=8081d452a3a1e403e942ff0330c0a7c52670593b)

adriano

Hello Capsar,
I just read about this wonderful mod and I think, I can use this on a new site I plan. This will give coppermine a big step foward to a shopping site. As I could see, all I can sell is only prints from my photographs. Is there a way to use the paypal account for downloading some pictures after the customer paid?
[size=10]Fotos von Norddeutschland und der Nordseeküste
Photos of Northern Germany and the North Sea Coast:
http://www.wackernah.net[/size]

Casper

@Detonate, I think the changes you have done are a great improvement, and will incorporate them in the downloads soon.  ;)

The setting the prices by album would need a complete rework, but if anyone can do it, would make having differnt prices much easier than the present method.

@adriano, this could probably be done, associating the zip downloads with the payment, but would also require a lot of changes.  It will probably be easier in version 1.4, which will have server side favourites, nstead of the current, client side favourites.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

I have updated the hack to include Detonates changes.  The files are all available to download from my shop demo.
They are not yet available from the downloads section on this site.

@ Gaugau, will email files to you.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

wprowe

Hi. I am a professional photographer and am interested in incorporating your PayPal hacks into my coppermine gallery. I applied the shop-update and the theme I like (igames). I noticed that each image size I configured shows up as a separate line. Could it be made into a drop-down menu selection (pick-list) so it doesn't take up so much real estate? It might take a little coding to determine the menu selection chosen before making the cgi-bin call to paypal to update the shopping cart. Is this possible? I saw one demo that shows something like this for paper types. That type of selection for print sizes would be great. Also, I have about 10 print sizes I offer. How hard would it be to expand it from 6 to 10 possible sizes?

Thanks much!
Walter Rowe
Music, Travel, Outdoor, Nature and Wildlife Photography

Joachim Müller

Quote from: Casper on August 24, 2004, 12:10:03 AM
@ Gaugau, will email files to you.
Got the email, sorry for the delay.

[off topic]
The medium "email" get's increasingly unusable for me, with the amount of spam and virus-infected mails sky-rocketing to over 800 unwanted emails a day. I'm still experimenting on spam filtering systems, but I either get a lot of false positives, or the filter is unusable completely for me because most spam passses through it.
[/off topic]

I changed the package names on the server, here are the new download links:
shop hack with all themes: http://prdownloads.sourceforge.net/coppermine/cpg1.3.x_mod_shop_all_themes.zip?download
shop hack with classic theme only (recommeded for usage with custom theme): http://prdownloads.sourceforge.net/coppermine/cpg1.3.x_mod_shop_classic.zip?download

@Casper: have you made up your mind yet to add the paypal hack to the coppermine core (admin settable of course) for cpg1.4.0? Maybe we need to discuss this on the dev board, as I must confess I haven't looked into the hack too deeply, so I'm not sure on the impact of adding the mod to the core would have.

Joachim

Casper

sorry for the delay in answering, I'm just back from 5 days motorcyle rally on the continent, and just catching up. 

@wprowe,

In answer to your question, if you do not offer choice of paper type, just sizes, then this would be easy to modify.  If you want to offer both, that would not have worked with my original hack, but I have done several changes, and it may be possible.  I will look into it tomorrow.


@GauGau,

I doubt it would fit well in the core code, and would be best as an add on, but as you suggested, I will bring it up on the dev board.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

jayos

This mod is just what I have wanted to do great work Casper ;)

I want to tweek a couple of things, I would like to have standard coppermine albums so friends and family can upload pics leave comments etc.
also the functionality of this mod so I can sell pictures in certain galleries

Why do we have to lose voting and comments is it possible to keep these functions?

I want to add a number of size options for my photos with different prices for each option how could I do this so it works in the same way as the link below
 
http://about.reuters.com/pictures/prints/galleries/preview.aspx?gallery=This%20Week&story=631934490331836250&picture=X002550020040822e08m0002t.jpg

Casper

Quote from: jayos on August 31, 2004, 10:51:30 AM
Why do we have to lose voting and comments is it possible to keep these functions?

The latest version available from the downloads section, or my demo, does not lose these functions.


Quote from: jayos on August 31, 2004, 10:51:30 AM
I want to add a number of size options for my photos with different prices for each option how could I do this so it works in the same way as the link below
 
http://about.reuters.com/pictures/prints/galleries/preview.aspx?gallery=This%20Week&story=631934490331836250&picture=X002550020040822e08m0002t.jpg

It is easy to add extra size/price fields, but getting them in a dropdown box, on one paypal line, I would have to look into.  You are not the first to ask for this, and I agree it would be good if all choices could be done this way.  But I have a lot to learn when it comes to paypal baskets etc.

I am looking into this.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

jayos

Thanks Casper

I want to use the smf theme is the code I will need to change the same as described in complexshop.txt ?

Casper

Hi Jayos,

what are you wanting to do.  Do you want to have different prices available in different albums/categories.  The hack for the standard shop has changed a lot since then, but I can take you through it if you tell me what you want.

Although the smf theme is not included in the downloads, it is easy to add any 1.3 theme to the standard hack.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here