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 ... 8   Go Down

Author Topic: Paypal shop hack, easy install, online admin  (Read 194437 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Paypal shop hack, easy install, online admin
« on: January 14, 2006, 02:05:01 pm »

Here is a new paypal shop hack, which is designed so that non-coders can easily install it with no code editing needed, and is administered from an online admin page.

It is based on Madeinhawaii's simple server-side shop hack.

Features;
  • Up to 5 different pricing structures, each with up to 10 options
  • Up to 5 further option sets, including;
    • One radio button set, with 3 options
    • Three drop down lists for up to 5 options each list
    • One dropdown list for up to 8 options
  • Only those options used are shown
  • Each additional option can charged extra (or discounted)
  • On-line administration, change your prices or options anytime, from within an easy to use admin page
  • A seperate instruction page for both installation and administration.

Installation for unmodified coppermine installations using any of the stock themes, and the english (or english_gb) language file is simple, just upload the mod files (replace the existing ones where they exist), and then run update (admin menu/admin tools/update database)

Read the docs/shop.html for how to administer your shop.

Installation for existing modified installs, or those using non-stock themes or other language is easy following the instructions in the docs/shop_install.html.
The mod is 'internationalised', if using a stock theme but a different language, it is only your own language file that will need editing.

You can see my test version of this here and a live install using just 2 pricing structures and no other options at this site, http://www.landscapeandlight.co.uk/


updated 30/1/06 to include fix for bug found here
« Last Edit: January 30, 2006, 05:14:14 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

bluerider32

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Paypal shop hack, easy install, online admin
« Reply #1 on: January 20, 2006, 03:46:07 pm »

Wow.  What else can I say!  :D I'm new to Coppermine (coming from Postnuke) and I'm amazed with your PayPal features.  I used PayPal quite a bit in Postnuke so all users could sell online.  Is there a way in your PayPal mod to include a variable for the "user_email" address rather than defaulting to the admin's?  Being new to Coppermine, my learning curve is just beginning so my apologies.  Well done Casper!
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #2 on: January 20, 2006, 06:38:15 pm »

Do you mean so that your registered members could sell from their albums?

That would be beyond my skills, but may be possible.  Has been asked before on other paypal mods here, as far as I know no-one has done it.
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

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Paypal shop hack, easy install, online admin
« Reply #3 on: January 20, 2006, 07:33:48 pm »

I'm a "non-coder" but was doing quite well with the Madeinhawaii version which I downloaded a few days ago. For me, this should be easier to use & modify as I develop the new gallery I am working on.

Thanks Casper (and Madeinhawaii for the earlier version) I managed to get this one set up & working in a very short time, and it has solved one of the problems I had posted regarding Maideinhawaiis earlier version, must remember to amend it accordingly
« Last Edit: January 21, 2006, 02:03:21 am by sharpo »
Logged
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Paypal shop hack, easy install, online admin
« Reply #4 on: January 23, 2006, 01:36:46 am »

Casper,

Does this hack remove the sorting controls on the album's thumbnails display page? It seems to have disappeared, and I notice it does not show on your test version.

Sorry to trouble you if I have missed an optional setting in config. but I have looked for it, and in documentation. All I could see was the default order.
Logged
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #5 on: January 23, 2006, 01:03:10 pm »

Yes it does, but they can be replaced if you need them. What theme are you using, I'll tell you how to replace them.
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

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Paypal shop hack, easy install, online admin
« Reply #6 on: January 23, 2006, 01:17:10 pm »

Yes it does, but they can be replaced if you need them. What theme are you using, I'll tell you how to replace them.

Thanks Casper, I am using a variation of the Classic theme.

Only a few moments ago I was wading through the theme.php trying to see if it had been replaced, thinking I may have to copy it from the original Classic theme & add it myself, but the code appears to be there.

Sorry to be a pain, but I am learning it all, even though I might be a bit slow.
Logged
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #7 on: January 23, 2006, 06:23:18 pm »

Ok, if you need it back, open your theme.php and find this code;

Code: [Select]
// HTML template for title row of the thumbnail view (album title + sort options)
if (!isset($template_thumb_view_title_row))  //{THEMES}
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="35%" class="statlink"><h2>{ALBUM_NAME}</h2></td>                           
<td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td>
                                       {CLICK}
                                </td>
                        </tr>
                        </table>

EOT;


Replace it with;

Code: [Select]
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
                                <td>{CLICK}</td>
                                <td class="sortorder_cell">
                                        <table cellpadding="0" cellspacing="0">
                                        <tr>
                                                <td class="sortorder_options">{TITLE}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        <tr>
                                                <td class="sortorder_options">{NAME}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        <tr>
                                                <td class="sortorder_options">{DATE}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        <tr>
                                                <td class="sortorder_options">{POSITION}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pa" title="{SORT_PA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pd" title="{SORT_PD}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        </table>
                                </td>
                        </tr>
                        </table>

EOT;
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

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Paypal shop hack, easy install, online admin
« Reply #8 on: January 23, 2006, 08:01:19 pm »

Casper,

Thanks very much for showing me how to do that. Everything looks fine now.

There was one little alteration (which I managed to do myself, impressed?) the "Click on the thumbnails .........." message was crammed on the right hand side of the screen, taking up something like 7 or 8 lines, and I altered the 100% to read 33% in the following line:-

<td width="33%" class="statlink"><h2>{ALBUM_NAME}</h2></td>

The "Click on the......" message is now on a single line, more or less in the centre of the screen, but depending on screen settings of course.
Logged
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

ibd12c

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Paypal shop hack, easy install, online admin
« Reply #9 on: January 23, 2006, 09:46:15 pm »

Casper,
Thanks for a great add-on.  I do have a question though...  I'm setting up a new coppermine site which I'll use to sell portrait/wedding prints.  I'd like to put in a feature request.  Instead of a pull-down menu with the 10 options to purchase, would it be very hard to have them in columns (say 2 columns and 5 rows) with checkboxes?  This would allow a client to quickly order a 5x7, 8x10, and 16x20 of the same print with one click.  I have a little knowledge of coppermine and php (i have several coppermine galleries, but none that sell prints) but that change might be over my head.

Thanks again,
Ray
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #10 on: January 23, 2006, 09:58:22 pm »

I think it would be over my head as well, sorry.
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

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Paypal shop hack, easy install, online admin
« Reply #11 on: January 27, 2006, 01:43:39 am »

@Casper: We discovered an issue with your hack regarding the renaming of the core thumbs.  Please see this thread for details: http://forum.coppermine-gallery.net/index.php?topic=26951.0.

I might be able to provide additional support related to this issue, but keep in mind that I haven't used your Paypal shop personally.

Please take that thread as constructive criticism, particularly where I question your motives.   ;D
Logged

SonjaSt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Paypal shop hack, easy install, online admin
« Reply #12 on: January 27, 2006, 12:12:11 pm »

I installed the mod and found a funny problem:

This is what I do:
I go to the button SHOP ADMIN (URL: 3w.mywebsite/shop.php) and type in my paypal email account, currency information, some options & prices. Then say SAVE NEW CONFIGURATION. Coppermine answers Your shop configuration was updated.
All sounds fine.

Now the problem:
I go to one of my photos and want to buy it. But there is NO PRICE saved. Neither is the information on my paypal account available.
When I go back to SHOP ADMIN, all fields are blank again.

What I am using:
Coppermine 1.4.3 basic version, no additions or changed made. Theme "classic"

I installed CPG 1.4.3 & PayPal Hack twice - same error occured.

What am I doing wrong?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #13 on: January 30, 2006, 04:33:23 pm »

Sonja,

it sounds to me like you have not updated the database.  A link would help.
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: Paypal shop hack, easy install, online admin
« Reply #14 on: January 30, 2006, 05:10:09 pm »

BUG FIX,

for the bug mentioned above, if you already have the beta-2 download, just replace the shop.php with the one attached here.  The beta-3 zip now attached to the top post has the fix included.
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

cornelp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Paypal shop hack, easy install, online admin
« Reply #15 on: January 31, 2006, 02:47:58 am »

Casper, first THANK YOU for this great owesome add-on. I installed it on a gallery, and everything works great, with the exception of the drop down list price. I only need/want 1 price (FOR NOW) with 1 option pretty much. I set that up in the admin side, and when I goto the pic and pull the dropdown to see the price, I see the price, but below the price its a whole bunch of US$ over and over again. Why is it doing that? I just installed it as PER INSTRUCTIONS, nothing more.
U can check it here.
www.softlightcreations.com/Gallery

Thankx for your help, much appreciate it.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Paypal shop hack, easy install, online admin
« Reply #16 on: January 31, 2006, 07:37:15 pm »

Hi cornelp,

open your displayimage.php from the hack, and find this code;

Code: [Select]
   $Option1    = " {$CONFIG['1size1']} @{$CONFIG['1size1_price']} ";
   $Desc1      = " {$CONFIG['1size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size1_price']} " ;
   $Option2    = " {$CONFIG['1size2']} @{$CONFIG['1size2_price']} ";
   $Desc2      = " {$CONFIG['1size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size2_price']} ";
   $Option3    = " {$CONFIG['1size3']} @{$CONFIG['1size3_price']} ";
   $Desc3      = " {$CONFIG['1size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size3_price']} ";
   $Option4    = " {$CONFIG['1size4']} @{$CONFIG['1size4_price']} ";
   $Desc4      = " {$CONFIG['1size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size4_price']} ";
   $Option5    = " {$CONFIG['1size5']} @{$CONFIG['1size5_price']} ";
   $Desc5      = " {$CONFIG['1size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size5_price']} ";
   $Option6    = "{$CONFIG['1size6']} @{$CONFIG['1size6_price']}";
   $Desc6      = "{$CONFIG['1size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size6_price']}";
   $Option7    = "{$CONFIG['1size7']} @{$CONFIG['1size7_price']}";
   $Desc7      = "{$CONFIG['1size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size7_price']}";
   $Option8    = "{$CONFIG['1size8']} @{$CONFIG['1size8_price']}";
   $Desc8      = "{$CONFIG['1size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size8_price']}";
   $Option9    = "{$CONFIG['1size9']} @{$CONFIG['1size9_price']}";
   $Desc9      = "{$CONFIG['1size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size9_price']}";
   $Option10   = "{$CONFIG['1size10']} @{$CONFIG['1size10_price']}";
   $Desc10     = "{$CONFIG['1size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size10_price']}";

Simply remove the lines you don't want, so you will be left with this;

Code: [Select]
   $Option1    = " {$CONFIG['1size1']} @{$CONFIG['1size1_price']} ";
   $Desc1      = " {$CONFIG['1size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size1_price']} " ;
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

cornelp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Paypal shop hack, easy install, online admin
« Reply #17 on: February 01, 2006, 01:01:49 am »

 ;D
Thank You very much Casper, worked like a charm, but I had to remove those extra options from 4 places, one below each other, otherwise it would not work.

One more question please if U dont mind, PLEASE.

When I click on the image itself, the big version comes up. When that happens, below the image shows up the shop options, but says Print and Size. and then below it NOTHING, just a blank dropdown. Can I put the price there? Instead of the print and size option? If not possible, then can I remove that area from the big picture When clicked on?

Thankx again for your quick response, U are owesome.

THANK YOU.


www.softlightcreations.com/Gallery is the site.
Logged

tmpicture

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Re: Paypal shop hack, easy install, online admin
« Reply #18 on: February 11, 2006, 09:04:03 am »

Hi,

I want to do that.
Download file after payment. If the client has paid correctly he get a download link (mail..??) or any other possibility to get all purchased files.
Is that possible?

Thanks, Thomas
Germany

 
Logged

BROSVILLE

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Paypal shop hack, easy install, online admin
« Reply #19 on: February 15, 2006, 11:17:43 pm »

installed coppermine - very smooth - added the shop hack - checked all the permissions- made a category, put an album in it  - set up the shop section - updated database - have spent 2 hours trying to get my head round WHY it won't work (all I get is "pic not available) :-\
here - http://farmco.co.uk/gallery/
Logged
Pages: [1] 2 3 4 5 ... 8   Go Up
 

Page created in 0.039 seconds with 20 queries.