Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4 5 ... 20   Go Down

Author Topic: add a Paypal shopping basket to your gallery.  (Read 299294 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
add a Paypal shopping basket to your gallery.
« on: July 04, 2004, 07:02:38 pm »

Completely updated, 12/9/04
Version for coppermine 1.4x attached to this post http://forum.coppermine-gallery.net/index.php?topic=19491.msg120378#msg120378

These is a mod that allow coppermine to use paypals shopping basket.

You can see a demo of this mod, and download the files HERE

The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript.  The original mod, which used a new line for each price option, is still available for download from the demo.  It has a neater basket, but has a maximum of 6 price options.

You can also download the files from the downloads section here.

There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.

The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt.  This does require some code changes, but all is explained.


Please note, most of this thread is about earlier versions of the shop hack.  This post, and any after and including this one, are about this current, easy to apply hack.

You may find some helpful info and tips on the other posts though.

[attachment deleted by admin]
« Last Edit: January 08, 2006, 11:00:13 am by Casper »
Logged
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

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: MOD. add a Paypal shopping basket to your gallery.
« Reply #1 on: July 04, 2004, 07:06:12 pm »

No code?  :o

I was actually going to do this next! LOL  ;D
Sweet! Now, I don't have to!


-omni
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: MOD. add a Paypal shopping basket to your gallery.
« Reply #2 on: July 04, 2004, 07:10:02 pm »

You were quick.  I'd hoped nobody had noticed  ;D
Logged
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

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: MOD. add a Paypal shopping basket to your gallery.
« Reply #3 on: July 04, 2004, 07:17:17 pm »

I actually didn't know that you had "just" posted the thread. I just caught the title when I did a refresh.  ;)


-omni
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: MOD. add a Paypal shopping basket to your gallery.
« Reply #4 on: July 05, 2004, 07:08:23 am »

Great work Casper!!!
Logged
SANIsoft PHP applications for E Biz

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: MOD[1.3x]. add a Paypal shopping basket to your gallery.
« Reply #5 on: July 05, 2004, 06:29:54 pm »

I have now added the mod that allows different buttons in different albums/categories.
It is attached to the first post, as 'complexshop.txt'.
If you want to view my test shop, I will leave it for viewing for a few weeks.  It is Here
Please feel free to use the buttons, BUT, don't checkout, it's not a real shop.
« Last Edit: December 27, 2004, 01:01:51 pm by Casper »
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #6 on: July 05, 2004, 10:52:47 pm »

I've just updated the to instruction files, on the first post, to create a cleaner interface for the admin upload and edit areas.
« Last Edit: October 01, 2004, 10:13:05 pm by Casper »
Logged
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

Incite

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #7 on: July 06, 2004, 11:56:42 pm »

I'm still working with 1.2.1, would this Hack work?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #8 on: July 07, 2004, 12:03:09 am »

I think so, and can think of no reason why notbut not tested.  I no longer have a 1.2.1 install to test on

Please remember to backup your files before trying, so if it doesn't you can return.

Also, please let us know the result.
Logged
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

Joel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • Foto Gallery
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #9 on: July 08, 2004, 05:17:11 pm »

Hi,

great work Casper!
I tried to do it on my own, but since I'm no coder it takes me three days  - and after it was done, I found your posting in here >:(

My solution looks like this:
(http://web.no-nameweb.de/shop/paypal1.jpg)


After clicking on the link "Like to buy?" this shows up
(http://web.no-nameweb.de/shop/paypal2.jpg)

The paypal-basket:
(http://web.no-nameweb.de/shop/paypal31.jpg)
The shown URL to my site (not online yet) is wiped out by purpose.

As you might notice: all of this pics don't have a "titel" - how its called in the original template - 'cause I don't want them named like "Fish 1", "Fish 2" or "Seahorse laying", "Seahorse swimming" or so. Only a description.
So for clear identifying the pic in the Paypal-basket the (p)ID (or the filename) and the URL of the picture will show up.


Because my solution is not very professional made: is there a chance to put it your way, but with getting an unique identifier in the Paypal-basket?

Thanks a lot,

Joel



Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #10 on: July 08, 2004, 07:56:49 pm »

Hi Joel,

First, I dont think your method looks unprofessional. 
I don't know exactly how you achieved your way of getting your buttons to get the info, so I'm not sure how easy/hard it is for you.
I looked at your pics, and had a look at how you could use my method to have more than one button per pic.
I found I could only do this if all the items in the album were the same price, which is probable with a photo seller, so I tried to get your layout.

I made the 3 buttons, (basically all the same except the price), and I replaced the item name line in the button code, with the following, just changing the size attribute for each button.;
Code: [Select]
<input type="hidden" name="item_name" value="{TITLE},size 130 x 178">
I then entered the pic name into the edit pics, showing the pic name and picture ID(not coppermine ID, but this may be possible), like this;
Quote
Angelfish, (pic ID 123)

This resulted in the following pages (note, I am just using the classic theme, and have not spent time formatting the layout, so it doesn't look as good as yours);


[attachment deleted by admin]
Logged
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

Joel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • Foto Gallery
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #11 on: July 08, 2004, 09:55:27 pm »

Hi Casper,

Hi Joel,

First, I dont think your method looks unprofessional. 

Thanks a lot for that and your quick reply -  I meant the way I put the code together ;)
What annoys me most at the moment is the back_link from Paypal (continue shopping) - since the referer is "pay.php" potential customers are not taken back to my gallery directly.

I don't know exactly how you achieved your way of getting your buttons to get the info, so I'm not sure how easy/hard it is for you.

There is nothing to hide: in displayimage.php (theme: hardwired) within "function html_picture()" around line 192 (means at the end of the block) I put this
Code: [Select]
$pic_html .= "</a><a href=pay.php?id=$pid&pic=$foto&path=$path_to_pic><font size= 3> Like to buy? - Kaufen?</font></a>\n";

and defined my vars at the begining of that block - not necessary, but the URL to passover the vars will be shorter :
Code: [Select]
$foto = $CURRENT_PIC_DATA['filename'];
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'];

pay.php has a very normal style: some tables and the usual "forms" and "input type" stuff, like it will be generated on the Paypal-site and you described it in  your hack, too...
I just grab the vars:
Code: [Select]
<input type="hidden" name="item_number" value="130 x 178 mm of PictureID=<?php echo htmlspecialchars($_REQUEST['id']); ?>" />
I looked at your pics, and had a look at how you could use my method to have more than one button per pic.
...
Thanks again for you help. I will try out this.

Joel
Logged

snowball7g

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #12 on: July 22, 2004, 10:27:33 pm »

Hi to all,

i have a similar problem. i try to find a way to submit the current image name (ex. img0001.jpg) by link to a shopping basket on another server. I placed a link to add to shopping basket in the theme.php right under the image. you can see at www.sc-onstmettingen.de.
But the main thing is missing the name of the current shown picture!!!
is there a variable like {image_name} or something else.

I'm sure it is easy for prof. users but it's a big problem for me as an coppermine newbie

Thanks for your help
snowball7g
Logged

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #13 on: July 23, 2004, 06:06:39 am »

haven tried on this hack but was wondering if this hack can work as a online printing service too ?
like those in webshots.com ??

just wondering  ;)
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #14 on: July 23, 2004, 07:04:46 am »

You can get the URL of the current picture in displayimage.php by using the following

$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');

Substitute normal for 'full' and 'thumb' to get URLs to fullsize and thumb respectively
Logged
SANIsoft PHP applications for E Biz

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #15 on: July 23, 2004, 09:36:38 am »

I have done a complete rework of this hack, specifically for the sale of photo prints, and it comes as a complete package, where you just drop in the new files, and run update.php.
The prices and print sizes available etc are entered in config, and stored on the db.  There are no files for the user to edit other than any custom theme.

I have done this with all the standard themes, plus Tariques 2 themes (hope that's ok Tarique), and you can see it as a working demo here. 

I am away for the weekend, leaving soon, so don't have time to post the instructions now, but will do so on Monday.
« Last Edit: December 27, 2004, 01:02:34 pm by Casper »
Logged
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

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #16 on: July 23, 2004, 10:07:10 am »

Thanks casper
looking forward to your instructions on the new hack  ;D
Logged

pinguish

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • Pinguish - A Photographic Community
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #17 on: July 23, 2004, 12:25:37 pm »

lol spent weeks working on this as well..will wait to see your download and compare against my amateur method :)

yours look (as usual) very slick...
what kind of control have you got over the pricing of each image/gallery with this 'print shop' version?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #18 on: July 26, 2004, 06:44:57 pm »

I have spent today adding currency selection to config, and updating ready for version 1.3.2.

The instructions for how to use this hack are available Here, and also within the docs folder of the download.

The demo is available Here

Download the shop-update.zip, and your choice of theme/s, from Here and just follow the instructions.  There are no files to be edited, other than any custom themes, or language files if you want more than English.  Note, do not use the paypal buttons to buy these downloads, they are free.  Just click on the file and download.

Sizes, prices and currency are all now set in config.

This hack has the same prices and sizes on each album, but it won't be too difficult to make it show different prices on different albums/categories, but this will require code changes by the user.

Hope you like it.

@Gaugau, some of these files are too big to attach here.  I would prefer to have them on this site, how should I do it?
« Last Edit: July 26, 2004, 08:07:58 pm by Casper »
Logged
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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Hack[1.3x] add a Paypal shopping basket to your gallery.
« Reply #19 on: July 27, 2004, 08:29:54 am »

zip the whole enchilada up and send it to me by email (make sure to user a good subject line, or my spam filter will eat your email). I'll then upload it to the files section.

GauGau

P.S. did you try to attach a zip?
Logged
Pages: [1] 2 3 4 5 ... 20   Go Up
 

Page created in 0.032 seconds with 20 queries.