forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Selling pictures => Topic started by: Casper on January 14, 2006, 02:05:01 pm

Title: Paypal shop hack, easy install, online admin
Post by: Casper 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;

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 (http://clive.photography-cafe.com/shop/) and a live install using just 2 pricing structures and no other options at this site, http://www.landscapeandlight.co.uk/ (http://www.landscapeandlight.co.uk/)


updated 30/1/06 to include fix for bug found here (http://forum.coppermine-gallery.net/index.php?topic=26454.msg124523#msg124523)
Title: Re: Paypal shop hack, easy install, online admin
Post by: bluerider32 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!
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharpo 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
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharpo 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharpo 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper 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;
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharpo 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: ibd12c 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
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on January 23, 2006, 09:58:22 pm
I think it would be over my head as well, sorry.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver 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 (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
Title: Re: Paypal shop hack, easy install, online admin
Post by: SonjaSt 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?
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on January 30, 2006, 04:33:23 pm
Sonja,

it sounds to me like you have not updated the database.  A link would help.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper 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']} " ;
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp 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.
Title: Re: Paypal shop hack, easy install, online admin
Post by: tmpicture 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

 
Title: Re: Paypal shop hack, easy install, online admin
Post by: BROSVILLE 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/
Title: Re: Paypal shop hack, easy install, online admin
Post by: BROSVILLE on February 16, 2006, 02:04:41 am
found it! - perhaps I'm a klutz, but didn't realise you had to "switch on" payments for each picture (blessed laborious)- is there any way of doing it globally? ;)
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on February 16, 2006, 06:43:40 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/

Looks to be working fine to me.
Title: Re: Paypal shop hack, easy install, online admin
Post by: BROSVILLE on February 16, 2006, 08:02:33 pm
duuuuuuuuuuuhhh! -it helps to "switch the pics on!" ;D
Title: Re: Paypal shop hack, easy install, online admin
Post by: netfalls on February 17, 2006, 10:08:28 am
Hi all,

I added to the script the "I agree with all terms and conditions" option that doesn't allow customers to place an order without checking the terms.

Just remplace the displayimage.php and put your terms into the tou2.php file

preview at www.netfalls.com (http://www.netfalls.com)
Title: Re: Paypal shop hack, easy install, online admin
Post by: wildlifeshots on February 25, 2006, 06:51:18 pm
Hey All, I am having a little problem with the hack here. The install seem to go fine however when i click on the shop button all there is is the expand buttons and no menu for setup. i am using the latest 1.4 version of coppermine and the classic theme i also updated the database. any help is appreciated
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on February 25, 2006, 08:30:20 pm
Hi,
Please explain exactly what is missing, the admin menu etc?  Are you sure you replaced all the files included, such as the english lang file.

a link would also help.
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on February 27, 2006, 04:36:23 am
I'm undoubtedly missing something easy....  Found Coppermine last night; added the PayPal hack (awesome, BTW!).  I've got it minimally configured (www.rnlphoto.com/coppermine/index.php (http://www.rnlphoto.com/coppermine/index.php)) but I can't find the reference to:

Buy with confidence

You are looking at , file ref: 11-25-04_-_1_Photos_071.CRW_Aviation_Nation.jpg.

Regardless of size, all of our products are made to provide you with the best possible image quality and workmanship. All products come with a money back guarantee. See our products info page for full details.


I'd like to modify this...  can someone point me in the right direction?

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver on February 27, 2006, 04:56:24 am
lang/english.php is what you want.  Look for the string "looking2" and modify at will.

Normally I would say to make a copy of english.php, naming it english-mod.php or some such thing, modify that file, then point your Coppermine language to "english-mod" so that when you do upgrades to new versions of Coppermine, it's clear what you modified.  However since this Paypal mod is already a hack of the core scripts, it's probably OK to just modify the already hacked file.
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on February 27, 2006, 05:45:21 am
Perfect - thank you!

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: wildlifeshots on February 27, 2006, 02:13:07 pm
Hi,
Please explain exactly what is missing, the admin menu etc?  Are you sure you replaced all the files included, such as the english lang file.

a link would also help.


I thought i would try and replace all files again and now i have a menu in the shop section.....thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: wildlifeshots on February 27, 2006, 05:02:19 pm
the hack is installed set up all my options however no price shows up it just says email for info on item i have replaced all files with the latest hack files have updated the database nuemerous times here is the link to my site any help appreciated http://www.wildlifeshots.net (http://www.wildlifeshots.net)

thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on February 27, 2006, 07:36:52 pm
Have you edited the file info for each photo, to add which price structure it should use.

If you have, please pm me an admin log in to your gallery.
Title: Re: Paypal shop hack, easy install, online admin
Post by: wildlifeshots on February 27, 2006, 07:42:14 pm
Have you edited the file info for each photo, to add which price structure it should use.

If you have, please pm me an admin log in to your gallery.

I didnt know anything about that, i will pm you the login info thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: wildlifeshots on February 27, 2006, 08:02:14 pm
i got it figured out casper.......thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on March 01, 2006, 05:36:13 am
One difficulty that doesn't make sense - I have set up 3 tiers of pricing and have each photo set with either a 1, 2 or 3 (www.rnlphoto.com/coppermine/index.php (http://www.rnlphoto.com/coppermine/index.php)).  The #1 tier has 6 descriptions & possible prices; only 4 of them are populated into the drop down box (the majority of the pictures).  The #2 tier has one description & one possible price, yet there are 3 instances of  blank lines with @ US$ in the drop down box (ex: 4-5-05_Las_Vegas_Lights_002_-_12x36_FINAL.jpg).  The #3 tier has two descriptions and possible prices yet there are 2 instances of @ US$ (ex:  CRW_7043.jpg). 

Obviously, something is forcing the # of entries to 4 instead of picking up only the fields that are populated.  How do I fix this?

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on March 01, 2006, 08:50:12 am
Hi Rick,

I don't understand why 2 of the prices don't show on the first set, but I'll look into it further if the attached file does not fix it.

Please replace your displayimage.php with the attached file, renamed to displayimage.php.  That should deal with the other problems.

Casper
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on March 01, 2006, 01:51:01 pm
Thanks, Casper!  I should have mentioned that I'm using the "agree to terms" mod that Netfalls posted in #23 above.  The new one you provided will likely kill that, right?  FTP to my site is down at the moment, so I can't test yet.

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on March 01, 2006, 04:24:34 pm
OK Rick,

looking into that new info, and I found that Netfalls mod will only display 4 options per price set.

I have amended a copy of that displayimage.php to display 6, and also done the mods required for your set-up, so just replace your displayimage.php with the new attached file, and that should then both preserve the 'agree to terms' mod and display as you want.

Casper
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on March 02, 2006, 01:56:02 am
You're awesome - thanks!  I'll plug it in when I get home!

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp on March 02, 2006, 02:06:28 am
Casper, if U dont mind me asking, is it possible you can make it so that when the customer/user pays for the item/picture etc, it gives them a download link, or sends them back to an area where they can download the item purchased?

That would help a lot. If no, no problem, just asking as that would speed things up.

If its possible now, then I apologize I didnt know how to get that setup.

Thankx and U are owesome, your mod works perfect and its splendid.
Title: Re: Paypal shop hack, easy install, online admin
Post by: RNLVideo on March 02, 2006, 06:04:45 am
Casper - works as advertised!  Thanks again!

So I can learn, it looks getting the right number of available lines in the option boxes is a matter of editing in or out the right number of these lines 1st Option, 2nd option, etc, correct?

  $Option1    = " {$CONFIG['1size1']} @{$CONFIG['1size1_price']} ";
   $Desc1      = " {$CONFIG['1size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size1_price']} " ;

Rick
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on March 02, 2006, 06:54:52 pm
Hi Rick,

glad it works.  Yes, you have answer to getting each option to display the correct number of lines.
Title: Re: Paypal shop hack, easy install, online admin
Post by: livinonthedge on March 02, 2006, 11:09:00 pm
Sonja,

it sounds to me like you have not updated the database. 

Casper, I am having the same problem.  What do you mean by üpdate the database?  Sorry, I'm pretty new at this.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Gizmo on March 03, 2006, 03:33:40 am
Casper, I am having the same problem.  What do you mean by üpdate the database?  Sorry, I'm pretty new at this.

Hey Livin,

I found a post by Madeinhawaii that led me to check the database tables for some missing values. My problem was after installing the mod and running the update.php, I couldn't get my Configuration to save the values I put in for the PayPal email and options. The link to the post is http://forum.coppermine-gallery.net/index.php?topic=19491.msg108523#msg108523 so give this a try. I used phpMyadmin to check to see what was missing and besides

('paypal_email', 'your_paypal_email');
('currency_symbol', '$');
('currency', 'US');

I was also missing the values for the sizes and prices. Once I added these to the database (see below for examples) everything worked as it should.

('size1', '4x6');
('size2', '5x7');
...
('size1_price', '5.00');
('size2_price', '6.00');
...

Hope this helps.

Billy


Title: Re: Paypal shop hack, easy install, online admin
Post by: livinonthedge on March 03, 2006, 08:56:46 pm
That's it.  Thank you.
Title: Re: Paypal shop hack, easy install, online admin
Post by: ayehli on March 06, 2006, 11:09:36 am
Casper!  This add-on is fantastic!

Is there any way to batch edit files to have the same pricing structure?  It takes quite a bit of time to adjust each one manually.  This was asked once before, but I didn't see a response.  My apologies if I missed it!

ayehli
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on March 06, 2006, 04:23:28 pm
If you use the edit files button, you can do all the pics in an album at once with just one 'apply changes', but other than that, no there isn't, sorry.
Title: Re: Paypal shop hack, easy install, online admin
Post by: chillyp on March 15, 2006, 02:15:17 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?
I have a similar issue

I am running 1.4.4 and I just installed the mod brand new.   The only option under 'Place your order here' is 'Please email for details on this item'.

You had a reply to the original post with another shop.php file that I also tried as well, and it didn't work.

Any thoughts?  Thanks!!

/edit: my gallery is at www.detroitgreeks.com/forum/coppermine
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp on March 15, 2006, 02:56:39 pm
I had that same problem the first time I went thru the setup, and the only thing I forgot to do is to set a price for the picture in question.
Once I set the price setup for the pictures, the Email For Details On This Item was gone and the price appeared.

After U install the mod, goto each picture properties, and under it it will show "Price Structure, use 1,2,3,4, or 5". Set your choices there. If that field is empty, when customers look at the picture, it will NOT show any price.

I just tried it myself and test it, and it is correct. I emptied the Price Structure field and looked at the picture. It states to Email to more information. Then I went and filled in the Price Structure with 1 (which is basic charge), and looked at the picture, then it showed the basic charge price.

Hope this helps U.
Title: Re: Paypal shop hack, easy install, online admin
Post by: chillyp on March 15, 2006, 03:38:56 pm
I had that same problem the first time I went thru the setup, and the only thing I forgot to do is to set a price for the picture in question.
Once I set the price setup for the pictures, the Email For Details On This Item was gone and the price appeared.

After U install the mod, goto each picture properties, and under it it will show "Price Structure, use 1,2,3,4, or 5". Set your choices there. If that field is empty, when customers look at the picture, it will NOT show any price.

I just tried it myself and test it, and it is correct. I emptied the Price Structure field and looked at the picture. It states to Email to more information. Then I went and filled in the Price Structure with 1 (which is basic charge), and looked at the picture, then it showed the basic charge price.

Hope this helps U.
I'm completely lost LOL

I mean, if I understand you correctly, then I must not be adding options (in one of the 5 main categories), but not adding a price to the option?

I have done that, and then I just went back and set up all 5 category options with the same pricing, etc.  Still having the issue.

I'm probably not understanding you..
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp on March 15, 2006, 05:14:50 pm
Once U set the price structure in the Shop Admin Tab, U must set a price for each picture. Under each picture, U have a price structure. U must set the price for each picture before u will see a price in the drop down list.

See the attached picture.
Title: Re: Paypal shop hack, easy install, online admin
Post by: chillyp on March 15, 2006, 05:33:11 pm
Once U set the price structure in the Shop Admin Tab, U must set a price for each picture. Under each picture, U have a price structure. U must set the price for each picture before u will see a price in the drop down list.

See the attached picture.
Well I guess I have 2 issues with that:

1) I don't have that option under the picture

and

2) I have almost 16,000 pictures.  There's no change I'm going to do that with all of them

I had a simple Paypal mod (from the hawaii guy) in place before the upgrade, and it worked without me having to choose a price structure.

Thanks alot for your response by the way.
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp on March 15, 2006, 05:45:18 pm
If that option is NOT available under your pictures, then either I dont know what the problem is, or i suspect the installation was not correct (on the MOD Part). Beyond that, sorry, I cant help.

I believe that Casper stated in the earlier post (7 posts above this one), that U can apply the price to all picture in each album by selecting All Files and set the price there. Maybe he can help U with that part.

Sorry, but thats all I know, lol.

THANKX
Title: Re: Paypal shop hack, easy install, online admin
Post by: Casper on March 15, 2006, 07:42:15 pm
OK,

first, this mod is for installs that want to have a variety of price settings available.  It is probably not as suitable for existing galleries with thousands of pics already displayed, as each photo or file has to have the price structure applicable added to the file information.

This is done using the 'Edit File Information' button under each pic, or using the 'Edit Files' button next to the album thumbnail, as explained in the docs/shop.html file in the download.

If most of your files use just one of the price structures, then using MadeinHawaii's mod will be easier, as only the photos using the non standard prices will need this editing.

I suggest you restore the original files, then re-apply the mod by Madeinhawaii.
Title: Re: Paypal shop hack, easy install, online admin
Post by: chillyp on March 15, 2006, 07:43:41 pm
OK,

first, this mod is for installs that want to have a variety of price settings available.  It is probably not as suitable for existing galleries with thousands of pics already displayed, as each photo or file has to have the price structure applicable added to the file information.

This is done using the 'Edit File Information' button under each pic, or using the 'Edit Files' button next to the album thumbnail, as explained in the docs/shop.html file in the download.

If most of your files use just one of the price structures, then using MadeinHawaii's mod will be easier, as only the photos using the non standard prices will need this editing.

I suggest you restore the original files, then re-apply the mod by Madeinhawaii.
Thanks a ton, I appreciate it
Title: Re: Paypal shop hack, easy install, online admin
Post by: fotoshopper on March 22, 2006, 12:04:07 am
Nice mod, but I want to sell digital products not prints.

Is there a possibility that customers pay for a product (image) and after that they get a download link to get the digital file?

Or do you know a mod which realize this?

Thanks for answers
Title: Re: Paypal shop hack, easy install, online admin
Post by: cornelp on March 22, 2006, 12:50:42 am
This is exactly what I am lookin for. I asked Casper bout it, but that probably would be another build or another mod. If anoyne knows of one like this, I would be interested as well.


Cornelp
Title: Re: Paypal shop hack, easy install, online admin
Post by: Joachim Müller on March 22, 2006, 09:37:41 am
Please don't clutter this thread by requesting other mods. Into this thread, only questions directly related to the mod are meant to go.
Title: Re: Paypal shop hack, easy install, online admin
Post by: fotoshopper on March 22, 2006, 09:49:46 am
Please don't clutter this thread by requesting other mods. Into this thread, only questions directly related to the mod are meant to go.

What do you mean?
My question refers to this mod and the possibility of downloading a digital file after pay.
Or what you think?

I think this is the right mod for me, with a little extension.

For example open source shopsystems like oscommerce and virtuemart (in combination with joomla) can do thi.

fotoshopper
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver on March 22, 2006, 03:22:24 pm
You're asking for an addition to the current mod or a new mod - something that doesn't exist in the current mod.  Start a new thread with your request, referencing this thread appropriately.

This thread is only intended to be used to discuss the current mod as it currently exists - if you have trouble installing it or find a bug or issue with the current code.

This falls under the overall "one issue per thread" rule.  This thread announces the mod and discussion is only about the mod itself - no additions or new code for the mod.  The "one issue per thread" rule is very important to keep discussions easy to follow and easy to resolve.  It's very difficult to follow 10 discussions about this feature or that feature in one thread.

So if you start a new thread about what you are proposing, people will discuss that one topic there and once it's implemented, that thread is effectively resolved.  In the particular case of the download cart you are requesting, it's possible that another mod or plugin could be used and in that case your thread might be resolved in a way that's not related to this thread.

If you disagree with this policy, start a thread questioning it on the "General Discussion" board.  In any case, there's nothing to discuss here.  Start a new thread and let's move on.
Title: Re: Paypal shop hack, easy install, online admin
Post by: fotoshopper on March 23, 2006, 12:10:26 am
1. I don´t know what problems you have. Many Threads above mine, two members asked the same question and nobody is feeling disturbed.

2. I open a new thread before I posted here, but can you tell me what is the idea of a discussion board when I nowhere can ask something?
http://forum.coppermine-gallery.net/index.php?topic=29417.0

I know everything about a discussion board and the rules, because of the knowledge with my own board (with over 25.000 Members).
I´am not a new member in this board, I were activ for over one year ago, but lost my E-Mail Account (Yahoo) and Password.

So please tell me what the problem is? I have only one question to this modifikation like others board members. And when I get a simple NO I am happy.

So I am happy that there are friendly boards in the Internet
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver on March 23, 2006, 02:02:03 am
My response was to everyone who asked for the addition you requested or any other additions that are not appropriate for this thread.  I didn't mean to single you out.

It's very difficult to keep track of so many mods & feature requests & so on without keeping things to one issue per thread.  You have to think about the future where other people come by and want to do something similar.  Separate threads makes things much easier to understand.

What seems appropriate to me is for you to continue your other thread by adding a post saying that the Paypal mods you have seen do not have a "download" option and so your request is still open for discussion.  It would also be useful if you pick out one Paypal mod (like this one) and describe how it could be modified to do what you want.  With a simple step-by-step request on the support board, it's more likely that someone reading it might be able to give you a hand in implementing it.  General or vague requests require a lot more work for the person helping out and so often no one steps up to give a hand due to the time & effort required.  I'll post over on that thread to help the discussion along.  If I find time and think it's easy to do what you want (once you describe what you want in precise terms), I might have something to contribute.

Yes, Casper has added some features requested in this thread in earlier posts; I have done the same thing in my plugin threads.  But that's not a sustainable way to organize feature additions.  Consider those earlier requests freebies.  You might not get caught everytime you drive faster than the speed limit, but that doesn't mean you cannot get caught when you do it later.  (Not an exact analogy but you get the idea.)

So let's move on and keep this thread for appropriate installation or bug-related support only.  GauGau is correct in trying to rein us in and put things in the correct place.
Title: Re: Paypal shop hack, easy install, online admin
Post by: fotoshopper on March 23, 2006, 09:50:16 am
Ok
Title: Re: Paypal shop hack, easy install, online admin
Post by: ashart on March 23, 2006, 11:29:18 pm
ive just got a small problem with the full image view????

pricing is fine in thumnail view but when you click on the image and go to full view the pricing does not show up???

www.ashartphotography.com/photos

other than that great hack thanks :D
Title: Re: Paypal shop hack, easy install, online admin
Post by: JimmyLee on March 24, 2006, 06:58:47 am
question about this hack.

if I want to be able to offer a discounted price on images purchased over certain quantities, how can I do that? ultimately I think I need a 'cart' style setup..

Eg offer:

a single image costs $25
two images costs $20 each ($40)
three images costs $17.50 each
four images costs $15 each
ten + images costs $10 each..

A user might click to buy one image in one album, then want another two images from other albums, so i only want to charge that person for three images at $17.50 per image. (discounted rated)

James
Title: Re: Paypal shop hack, easy install, online admin
Post by: mskonfa on April 02, 2006, 07:44:54 am
Hi there Casper,

Thanks for this upgrade.  Where can I find the latest mod files to be downloaded?
I read through the post, but could not find it, sorry.

Kerwin.
www.cruisinaltitude.com/gallery
Title: Re: Paypal shop hack, easy install, online admin
Post by: lordprodigy on April 14, 2006, 05:03:56 pm
Hello,

I would be very interested in this mod but I have one concern. I am really careful with the design and layout of the site, as i want the photos to really have the spotlight. Therefore instead of adding your buy options by default below each and every image, I want to have a BUY button in the displayimage navigation menu right next to the File Information button, which would turn on and off a LAYER with the buy info, exactly as you can turn on and off the File info.

Can someone help me out to do that? I would greatly appreciate it. Thanks a lot!
Title: Re: Paypal shop hack, easy install, online admin
Post by: jeep11 on April 26, 2006, 11:13:33 am
Perfect! Got it working straiight out of the box, just two stupid "newbie" questions, firstly which file do I modify to change the  "Buy with confidence" text and how do I remove the blank "@" options in the drop down price catergory as I only sell two image sizes and don't need the rest? Thanks for an excellent mod though hope these questions are not too dumb!   ???
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver on April 26, 2006, 02:14:18 pm
All the text is in lang/english.php.  Search for what you want to modify.  The drop-down list is in displayimage.php.  Search for '@'.  A good cross-file search tool is very useful.  I use Windows Grep (http://www.wingrep.com/) (in Windows).
Title: Re: Paypal shop hack, easy install, online admin
Post by: yakand on May 06, 2006, 04:18:25 pm
Casper,

Downloaded the Paypal shop hack, but got the same problem with the pop-up window as in your test sample - the first field "Select Print size and frame options" doesn't show up in the pop-up window. Any fix for this? And, also, can the pop-up, actualy, shows only the picture, as it does with the original cpg145 displayimage.php?

Regards,

Bog

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 (http://clive.photography-cafe.com/shop/) and a live install using just 2 pricing structures and no other options at this site, http://www.landscapeandlight.co.uk/ (http://www.landscapeandlight.co.uk/)


updated 30/1/06 to include fix for bug found here (http://forum.coppermine-gallery.net/index.php?topic=26454.msg124523#msg124523)
Title: Re: Paypal shop hack, easy install, online admin
Post by: bb123 on May 11, 2006, 10:31:45 pm
Hope this is now the correct and appropriate thread have re installed all but same problem.. all was working before I put 1.4.5 on..


Hi I just installed installed the 1.4.5 over the previous version which also had the paypal shop hack ... shop-1.4x-serverside-online-admin

but shop button which should come next to the config button is missing!!

I have done a database update.... 

when I look at a image in user mode all the details are there for the purchase view cart etc even goes to my paypal account..

on Versioncheck I have

displayimage.php showing version 1.4.3       and lang/english.php showing 1.4.3

also the update.sql has a ? mark and this...
No local file version
The script was unable to extract a local file version - your file is either outdated or you have modified it, removing the header information on the way. Updating the file is recommended.

so using the update.sql file in  1.4.5 still the add to cart details showing..

If I change update.sql to the files in 1.4.5 the cart still works..

So I guess Im looking for updated files for the shop hack .... as I am unable to change any of the shop settings..


Thanks for help
bb123
Title: Re: Paypal shop hack, easy install, online admin
Post by: SonjaSt on May 15, 2006, 01:38:54 pm
I moved my database to a new server. All works fine except for the film strip.
The images are very tiny, much smaller than the thumbnails.
I removed the PayPal Add-on and the problem was fixed.
I re-installed the PayPal Add-on and the problem returned.

How can that be?

All is working great except for this problem.
(Well, I could solve it by removing the film strip but I'd like to use it if possible)

Sonja
Title: Re: Paypal shop hack, easy install, online admin
Post by: Nibbler on May 15, 2006, 02:22:54 pm
Try removing the theme_display_film_strip function from your theme.php
Title: Re: Paypal shop hack, easy install, online admin
Post by: minnie on May 16, 2006, 08:17:14 am
I've same issue with Coppermine 1.4.5 + Paypal mod hack(shop-1-4-easy-install-online-admin-beta3.zip) which was already fixed few months back. Ie, i enter Shop configuration under Shop Admin and save it. When i select one of the photos, it just displays "@" under Price. Also, when i go to Shop Admin page, all the fields are blank. I tried using beta-3 version of shop.php fix but still the problem remains.

Would greatly appreciate any help as I'm extremely new here.

Thanks a lot,
Minnie.
Title: Re: Paypal shop hack, easy install, online admin
Post by: SonjaSt on May 16, 2006, 09:55:48 am
Minnie,
I've had the same problem. My store, too, did not save the prices. That happened because I forgot to run the update after installing the shop.
To update the database & fix the problem, please type in your browser: www.YourSite.com/YourCoppermine/update.php
(please enter your correct URL).
Then you should read in one of the lines: UPDATE `cpg143_config` SET value='Price structure, use 1,2,3,4 or 5' WHERE name='user_field1_name'   OK

If so, please go back to the shop admin, enter your prices and check if the prices show up under your photos.

Hope that helps,
Sonja
Title: Re: Paypal shop hack, easy install, online admin
Post by: minnie on May 16, 2006, 04:36:41 pm
Thank you so much. It works great now after running www.mysite.com/coppermine/update.php and I can see that right information is showing up under Shop Admin. Previously I did update database soon after moving paypal hack mod files into my coppermine directory but it didn’t help. I guess, everytime any of the files change/gets updated, will have to run update.php through browser?

Once again thanks a lot Sonja for helping me out.
Minnie.
Title: Re: Paypal shop hack, easy install, online admin
Post by: yakand on May 17, 2006, 09:55:08 am
Hi Guys,

I have a problem with ordering - whenever I place an order a new updated paypal screen opens. So, if I make 5 orders, there will be 5 paypal screens, first one with one item order, second with two items .... and the last one with all 5 items ordered.

I did something wrong, but I don't know what.

Can you help?
Title: Re: Paypal shop hack, easy install, online admin
Post by: yakand on May 17, 2006, 03:46:03 pm
Found this calculator on the net and I am interested if it can be modified and inserted into Paypal hack mod made by Casper. It would be nice to see the total cost of the item before an order is placed. I attached the script as a .txt file, but if you change the extension to htm or html, you'll be able to open it in your browser and do the calculation yourself. There are four different currencies to choose (I put AUD as default).
Title: When I add a file to basket, Coppermine generates a unique code....
Post by: arendzen on May 18, 2006, 01:09:38 am
--------------------------------------------------------------------------------
Hi - I've installed the Paypal shop hack ok. When I add a picture to the basket, Coppermine generates a code number that identifies each picture. This number is diplayed after the picture description in the "Item" box.

I am using IPN at Paypal to send confirmation to a PHP script on my website that in turn sends the purchaser a link to the file. I need to find these unique numbers so that I can enter them into the PHP code for the IPN notification.

Any ideas where I can start looking? The alternative is for me to "add to basket" every single picture, one after the other, in order to read the file number assigned to it - a task that will test my patience, possibly to destruction. Please help!

(Apologies to Nibbler - I finally understand what he meant about posting in the appropriate thread)
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharpo on May 19, 2006, 08:09:29 pm
Installed the paypal shop hack & got it working, but need to mention something slightly off topic (sorry!!)

I noticed the text in the title was not "found" by any search engines. I thought this strange as normally search engines had "found" the text within just a few days before the hack had been installed. Anyway, a few days ago I removed the hack due to not having the time to deal with selling images, and to my surprise my images can now be found within a few days again.

Has anybody else noticed this problem with their files after installing the hack?
Title: Re: Paypal shop hack, easy install, online admin
Post by: badgerdid on May 25, 2006, 03:11:35 pm
Hi peeps

I love this mod and have just about got to grips with it, but have just noticed, or need help, with a little problem, where do i add the postage?

I use an online printer and they charge a fixed £6 postage however many prints you order, but i need to add this to an order in the paypal screen.

Is this possible, obviously i dont want to add it as an option as delivery charges are compulsery, i cannot add it to the images if they order 2 then it will add twice.

Or am i missing something?
Thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: arendzen on May 26, 2006, 11:29:32 am
Hi, you can add postage at the Paypal website. Just log in to your account and follow the links. You decide how much postage and Paypal automatically adds it to the order.
Title: Re: Paypal shop hack, easy install, online admin
Post by: romans815 on May 30, 2006, 07:20:41 pm
Am having problems with displaying of price options.

I have price option 1,2 listed and it will not show anything, so I figured out you can only show one price option. IS THERE A WAY TO ADD MORE OPTIONS TO THE PRICE OPTION, LETS SAY I WANT IT TO HAVE 20 OPTIONS?

ALSO IS THERE A WAY TO APPLY THE PRICE OPTION TO THE ALBUM? As i see it now, you have to go through each image, I have 50,000 + images in a cpg 1.3 version that I wnat to upgrade to this version.

Thanks
Title: Re: Paypal shop hack, easy install, online admin
Post by: romans815 on May 31, 2006, 12:36:19 am
Am having problems with displaying of price options.

I have price option 1,2 listed and it will not show anything, so I figured out you can only show one price option. IS THERE A WAY TO ADD MORE OPTIONS TO THE PRICE OPTION, LETS SAY I WANT IT TO HAVE 20 OPTIONS?

ALSO IS THERE A WAY TO APPLY THE PRICE OPTION TO THE ALBUM? As i see it now, you have to go through each image, I have 50,000 + images in a cpg 1.3 version that I wnat to upgrade to this version.

Thanks
OK, So I figured out how to add options by editing the shop.php, displayimage.php, english.php and inserting more fileds into the db and it all works fine.

I also read in the post where you stated that there is no way to batch apply pricing structures.

Can you create a mod to do that?
Title: Re: Paypal shop hack, easy install, online admin
Post by: ashart on June 01, 2006, 02:11:12 pm
ok ive still got prblems with the display pic when you click on a thumbnail and it opens up the full view of my pic there is no info in the "buy with confedance" section

"Buy with confidence

    You are looking at , file ref: .

    Regardless of size, all of our products are made to provide you with the best possible image quality and workmanship. All products come with a money back guarantee. See our products info page for full details. "

that is what it shows PLEASE HELP.....

http://www.ashartphotography.com/photos/index.php
Title: Re: Paypal shop hack, easy install, online admin
Post by: equine on June 02, 2006, 01:28:21 pm
Casper,

Your PayPal hack is exactly what I'm looking for.  I've a small business producing equine event pictures -

http://www.equine-photos.co.uk

and have just moved over to Coppermine.

Can you please point me towards where I can get the code.

Many thanks,

Simon
Title: Re: Paypal shop hack, easy install, online admin
Post by: Dr Preacox on June 02, 2006, 01:32:04 pm
found your way here ay??

The Mod links are usually attached to posts so you need to look at the bottom of people posts but anyway here is the link

http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=26454.0;attach=3103
Title: Re: Paypal shop hack, easy install, online admin
Post by: equine on June 02, 2006, 08:52:35 pm
Thanks Doctor!

When I've patched the code in how do I go about linking my shopping cart to my specific PayPal account to recieve payments as this isn't evident in the "read me" documents - unless in my haste I've missed something (has happend before)!

S ;D
Title: Re: Paypal shop hack, easy install, online admin
Post by: Dr Preacox on June 03, 2006, 06:51:07 am
Okee Dokie!

First go to Shop Configuration --> Then look for "Shop Main Settings" --> Then under "Paypal Email Account" you add your email addresse which is your paypal ID, then your done!

Anything else I can help you with Equine?
Title: Re: Paypal shop hack, easy install, online admin
Post by: yakand on June 03, 2006, 02:51:32 pm
Hi Everybody,

Configured today the Paypal shop hack, but when I “tried” to order, Paypal didn’t show all the options from the order – only three lines, with only two options (out of five). Checked Casper’s sample shop, and I’ve got only this info in the “item” column:

“Title: , Ref#: two-excavators.jpg , 8" x 10" un-framed @20 selected, Paper: Matte (+5%) %5, Print tone type:B&W (+£1) +1 ,
Item Number20”

…and the rest three options were missing (Select Frame, Select Decorative overlay (all + 10%) and  Select Gift Wrapping (£5 extra, includes greeting card of picture) .

Can anyone fix this?
Title: Re: Paypal shop hack, easy install, online admin
Post by: jesphoto on June 08, 2006, 02:49:45 am
Hi All. I am new to this and kind of confuse. I installed the Latest version Coppermine 1.4.7. I add images to albums - pain ia a a... I have running Gallery 1.5 and I choose album and drop images to that album 10 at a time. The problem with Gallery is that do not support buy cart. V2 support, but I could not install. My host do not support that gallery.
I havea dillema. It took me 2 days to install thee CMN and shop,add images.Put price and everythink working fine except that I have nice gallery with paypall button what do not work as I expected. My paypall have option for return to web site . If I activate this then what next.?
How the buyer will be able to download full size image(3.3M) after the payment goes trough.
I read all those posts in this forum and I saw that some users asked question and never got response.
The only response was kind of "nasty" from moderator. I do believe that those questions was valid and applay to this mod as those people spend some time trying to install to find out that all what they got it is a button(or is not?).
I would ask Casper a valid question. What next after the buyer pay for image( or product)?.
The only response from moderator I would like to see is how to fix it. After all the moderator know a php- I shure do not.
Thank You
http://www.jesphoto.net :(
Title: Re: Paypal shop hack, easy install, online admin
Post by: Alex53 on June 13, 2006, 01:13:41 pm
Hi, I installed this and it works great. The installation was easy and it works straight away with little setup.

I have just 2 small issues. Well the second one is not even an issue just a suggestion/request.

1. The choices display empty choices when I dont enter any options. For example for paper type I dont want 3 choices as I dont want to offer pearl, just matte and glossy. When I amended the boxes to display just these I still have one radio button with no text beside it. Equally, when choosing the size, I have 3 available sizes, but I get a list of "@ £" appearing in the drop down box under the actual choices I filled in.

2. My request. Sometimes, especially for event photographs, some customers want either a full set of all the images, or many of them. Right now this would be a long process as you have to view each image one by one and add it to the cart. An option to 'add all prints in this album' and/or little boxes with the prize and size to tick under each thumbnail and then an 'add selected to cart' button would work a treat!
Title: Re: Paypal shop hack, easy install, online admin
Post by: tinorebel on June 15, 2006, 06:39:34 pm
Hi, first of all my greetings to casper who developed this exelent mod, it really works fine and is very easy to manage trough on line shop administrator. Thoug I have same problem as others: having 1000 photos in my gallery was looking for a way to batch-add price structure to pictures.

Would it be posible to do that trough myPhp adm?
sorry I'm quite new to all this stuff, maby just a stupid question.

Thanks for suport.

My page: www.tripodart.net
Title: Re: Paypal shop hack, easy install, online admin
Post by: csondagar on June 20, 2006, 05:40:48 am
Is there an easy uninstall of this mod?  Just in case I get into trouble and I decide to uninstall.  Cheers!
Title: Re: Paypal shop hack, easy install, online admin
Post by: Joachim Müller on June 20, 2006, 08:08:49 am
Basically, you uninstall all mods in the same way: you either roll back an unmodified copy of the file (if you were clever and though of that, backing up your files before starting the modification), or you go through the code and undo the changes that are suggested in the mod thread. Things only get a bit more complicated if a mod requires changes in the database structure: for some mods that only add additional database fields, it's OK to leave those fields as they are, they probably won't hurt to keep (maybe except a small performance penalty that can easily be ignored). Other mods need the database changes to be undone.
Bottom line: no, there is no uninstall routine. There isn't an uninstall for any mod. After all, you hack the code when applying a mod. You must be aware of this. Another drawback of mods/hacks is that you will loose them when a new version comes out, forcing you to re-apply the mod. Again, this happens for all mods. That's why we encourage contributors to come up with plugins instead of mods; plugins can be uninstalled, and they should work after upgrades as well.
Title: Re: Paypal shop hack, easy install, online admin
Post by: pcbill on July 04, 2006, 06:48:04 am
Hello,

Great hack, looks as if it will work fine for me.

I’m having a slight problem though. When either using the theme.php template for hardwired or editing the my file per the doc file it adds “{CLICK}” to the middle of the bar in the Thumbnail page where the Album name is displayed

This section of code is causing the problem:
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;

When absent all seems to work with the mod

The Mod uses Custom Field 1 to store what pricing structure to use, 1-5. This field now becomes visible to all when the file information is displayed. Anyway to hide this? I would guess it really needs to be visible under the edit image screen or to the admin.

Bill
Title: Re: Paypal shop hack, easy install, online admin
Post by: pcbill on July 04, 2006, 04:18:36 pm
In regards to the custom 1 field issue from the post above

In the displayimage.php file I changed the following line from
   
Code: [Select]
for ($i = 1; $i <= 4; $i++) {to:
   
Code: [Select]
for ($i = 2; $i <= 4; $i++) {
in order for custom field 1 to be suppressed. It works and as far as I can tell it causes no other issues.

Bill
Title: Re: Paypal shop hack, easy install, online admin
Post by: tinorebel on July 08, 2006, 03:41:36 pm
Hi to everyone,
I'm runnin a cpg 148 with more than 1500 photos and installed the shop mod one month ago findig it very useful and running well.
 Reacently I realized my gallery hase slowed down a lot, lasting more than 20 seconds in generating some pages, and I cant find out where is the bug.

Hase anyone found my same problem? ???
I have dis-installed the shop mod at the moment and the problem persists.

Any idea on how to speed up the page generation?

this is the link to my cpg homepage. It hase debug mode eneabled.


http://www.tripodart.net/website/gal/index.php?cat=0 (http://www.tripodart.net/website/gal/index.php?cat=0)

Title: Re: Paypal shop hack, easy install, online admin
Post by: ashart on July 09, 2006, 11:26:55 am
ok with my display full view image, i just want the image not the buying info underneath (i still want that with the thumnail slideshow part though) were would i find the code to edit the full view buying info out.

www.ashartphotography.com
Title: Re: Paypal shop hack, easy install, online admin [errors after installing]
Post by: LWAA on July 13, 2006, 12:37:45 pm
help!
Coppermine 1.4.3 Shop hack
Coppermine Gallery 1.4.8
when I try to rotate an image in the gallery, I get this error:
Can anyone help me get this sorted asap?
Thanks!

Here's the error info:
Critical error
There was an error while processing a database query.
File: /home/basetho1/public_html/i-am-that-i-am/flrouiedscv3/include/functions.inc.php - Line: 249

While executing query "UPDATE cpg133_pictures
                          SET pheight = ,
                            pwidth = ,
                                                        filesize = 4096,
                                                        total_filesize = 7548
                          WHERE pid = '5'" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
                            pwidth = ,
                                        ' at line 2
Title: Re: Paypal shop hack, easy install, online admin
Post by: Puffinstuff on July 20, 2006, 11:19:38 pm
Just upgrade to 1.4.8 and added Paypal hack.  All went well but ...

I now have "Price structure, use 1,2,3,4 or 5:" displayed in my File Info. (Which I would prefer if it was not there)

http://www.lumieres.com.au/gallery/displayimage.php?album=101&pos=16

I have searched everywhere within the site and cannot find this to comment it out.

Where is this so can I comment it out?

regards and thanks in advance...
Title: Re: Paypal shop hack, easy install, online admin
Post by: Puffinstuff on July 23, 2006, 02:51:32 am
After hours of searching my site as to what code this hack has added, I can see what it is doing, but unable to to determine how to comment out so it does not disply.

It appears, that the hack utilises what would normally be one of the custom user fields that can be set up in the configuration section: User field 1 (user_field1_name, user1 )

I cannnot seem to trace where that is sourced for display in the file info.

Tried even to comment that out in displayimage.php to find out how it is working.  The result (as expected) was that it removes the pricing option from the paypal at the bottom.

Any clues would be gretly appreciated.

(I have had a bad/frustrating weekend on this -see Karma - and hope for forgiveness. :) )
Title: Re: Paypal shop hack, easy install, online admin
Post by: jaty on August 08, 2006, 10:09:44 am
the price does not show up in paypal

im a newbie, apologize.

try it : http://www.fotowarung.com/archive/
login : user
pwd : user
Title: Re: Paypal shop hack, easy install, online admin
Post by: jaty on August 08, 2006, 11:51:11 am
sorry .. since the above post could not be deleted, i will put up another post. the above post can be ignored.

the price does not show up in paypal

im a newbie, apologize.

try it : http://www.fotowarung.com/archive/
login : user
pwd : user

im selling digital image, not print.

im using 1.4.8.

TKS in advance.
Title: Re: Paypal shop hack, easy install, online admin
Post by: eight9offsuit on August 29, 2006, 07:20:15 am
ok with my display full view image, i just want the image not the buying info underneath (i still want that with the thumnail slideshow part though) were would i find the code to edit the full view buying info out.

www.ashartphotography.com

I'm actually wondering the same thing as ashart is (even if his site is down and he's not around anymore).  I realized Casper hasn't been posting in this topic lately, but has anyone else found a solution to this for 1.4.8?  Other than that this mod is perfect for my site.
Title: Re: Paypal shop hack, easy install, online admin
Post by: barramyainc on September 13, 2006, 08:22:48 pm
Hi all.

Love the mod - I've found one possible hick-up if someone would be able to help me at all.

I have some pictures which are for sale and others which aren't for sale however someone has been able to add, and send funds for pictures which aren't for sale.  They have chosen to add a quality setting (in this case high which adds £1 to the price) which has meant that actual funds are exchanged between the accounts.

Just a heads up.

Cheers

Sarah
Title: Re: Paypal shop hack, easy install, online admin
Post by: johndankey on September 19, 2006, 06:04:18 am
Sarah,

What about setting a price structure with a price of zero?

JD
Title: Re: Paypal shop hack, easy install, online admin
Post by: faceman on September 23, 2006, 05:35:25 pm
I've got a problem updating the database after I install the mod.  Here's what I get when I do a database update:

Code: [Select]
Warning: fopen(sql/update.sql) [function.fopen]: failed to open stream: Permission denied in /var/www/localhost/htdocs/cpg149/update.php on line 142

Warning: fread(): supplied argument is not a valid stream resource in /var/www/localhost/htdocs/cpg149/update.php on line 142

Can anyone help?  I've got permissions set correctly to the include and albums dir, and I can upload pictures all day long, but the database won't update.

Thanks.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Nibbler on September 24, 2006, 12:10:16 am
Set permissons on sql/update.sql so that it is readable.
Title: Re: Paypal shop hack, easy install, online admin
Post by: faceman on September 25, 2006, 04:32:57 am
Thanks - worked perfectly.
Title: Where can I download this?
Post by: albert1956 on October 13, 2006, 10:13:16 pm
I'd be really interested in this, but cannot find where to download it?
Title: Re: Paypal shop hack, easy install, online admin
Post by: Paver on October 13, 2006, 10:24:50 pm
@albert1956: It's attached to the first post (http://forum.coppermine-gallery.net/index.php?topic=26454.0) (and called "shop-1-4-easy-install-online-admin-beta3.zip").
Title: Re: Paypal shop hack, easy install, online admin
Post by: garyafarmer on October 28, 2006, 11:48:50 am
Hi all,

I have just installed this mod, works perfectly except I need to be able to exclude certain pictures/albums from being sold. Ideally the shopping basket/purchase section on the displyimage.php page would not appear for these pics or where the shopping basket/purchase section is it would come up "sorry this picture is not for sale".
Title: Paypal shop hack uninstall
Post by: glenc on November 13, 2006, 05:17:14 pm
I am usin 1.4.10 modpack v1, I installed shop-1-4-easy-install-online-admin-beta3.zip. I am using eyeball theme. After updating database, I went to shop admin and filled out the first section and set the first two pricing options. At first it worked fine, I thought I would be able to set different prices for each but that’s not the case. I went in and removed the rest of the options. Thumbnails work fine except when you click on them now the image does not show and the price comes up @$. I uninstalled it and reinstalled with the same effect.  PW & UN= user   My question is how to get the images to show up again. I will not be using this paypal hack and have unistalled it. TIA
Title: Re: Paypal shop hack, easy install, online admin
Post by: glenc on November 13, 2006, 05:18:46 pm
 ::) link would help  http://www.kiscme.com/postcards (http://www.kiscme.com/postcards)
Title: Re: Paypal shop hack, easy install, online admin
Post by: glenc on November 13, 2006, 05:24:55 pm
 ;) I just uninstalled it by replacing with files from cpg1.4.10_modpack_stramm_1 and all is well. TY
Title: Re: Paypal shop hack, easy install, online admin
Post by: 3rw1n on November 15, 2006, 05:31:36 pm
Hi,

I just installed the mod, but I can't acces the shop admin, I get a normal coppermine page but with no informations in it.
I'm using cpg 1.4.10 install files frome sourceforge and downloaded the mod on the first post of this thread.
What have I done wrong?

Thanks in advance and sorry for my bad english.
Title: Re: Paypal shop hack, easy install, online admin
Post by: KWH on December 25, 2006, 09:56:24 pm
I have just loaded this hack and like the way it works.  I do have two questions though.  Can I get it to work when I batch upload instead of having to edit each image individually?  I will be posting galleries of 100+ images on an almost daily basis once I get this all set up.  Also I notice that the @ $ stays in the drop down box if I don't use all 10 entries in the pricing section.  Have I missed something?

http://haesslyphoto.com/cpg1410/thumbnails.php?album=6 (http://haesslyphoto.com/cpg1410/thumbnails.php?album=6)

Thanks.

Keith
Title: Re: Paypal shop hack, easy install, online admin
Post by: tantley on December 29, 2006, 07:52:16 am
I've installed this mod, without any problems, following the directions verbatim. Awaiting the first sale through the processor now.

This is most impressive- in that it is easy to install and quick to administrate. If I could suggest a batch utility to set price packages for existing files (already requested in prior posts) or at least a default value to appear when a price is not yet set.

Also, I found that when a picture is displayed full-size, the mod does not display the filename in the resulting new window. I added text to the 'looking2' string in lang/English.php to notify would-be purchasers that a filename needed to be displayed by returning to the previous window to order. But this may be confusing to purchasers to some extent and result in lost sales.

Secondly, I did modify a portion of the code, as it was displaying what appeared to be an incorrect text string:

From this:
Code: [Select]
<table  align="center"  width="90%">
<tr >
        <td>
            <fieldset><legend><b><big><big>{$lang_picinfo['confidence']}</big></big></b> </legend>
                <blockquote><div align="justify"  >  <font size=-1>
                    <p><center>{$lang_picinfo['looking']} <b>$pic_title</b>, file ref:<i> $pic_id</i>. </center><br />
                    {$lang_picinfo['looking2']}</p>
                  </font>
                    </blockquote></fieldset>
         </td>
     </tr>
</table>

To this:
Code: [Select]
<table  align="center"  width="90%">
<tr >
        <td>
            <fieldset><legend><b><big><big>{$lang_picinfo['confidence']}</big></big></b> </legend>
                <blockquote><div align="left"  >  <font size=-1>
                    <p><center>{$lang_picinfo['looking']} <b>$pic_title</b><i> $pic_id</i>. </center><br />
                    {$lang_picinfo['looking2']}</p>
                  </font>
                    </blockquote></fieldset>
         </td>
     </tr>
</table>

Basically, aligned the text to the left (since the 'looking' & 'looking2' strings are left justified also), and removed the ", file ref" portion of the string also.

And this is installed with SMF v1.1.1 / Tiny Portal v0.97 wrapped around CPG bridged, for reference.

Thanks for the great mod!
Title: Re: Paypal shop hack, easy install, online admin
Post by: btos on January 18, 2007, 07:38:23 am
I've got an artist client/ friend who makes jewelry and wanted an online gallery and virutal storefront. The look of the gallery took shape nicely with color mods to the template. Coppermine has the look and feel of the showcase gallery, since every item is photographed and displayed beautifully with photography (btw, I'm a photographer). The cart is a problem.
 
With carts built for photograpy print sales- variables with paper sizes etc - can I modify the application to work with jewelry? Sure, I can change the text but I've just installed the first cart and I'm not so sure it's gonna work- simple ecart files for cpg1.4x. Sales structures of jewelry include pricing for each item that's one-of-a-kind and the prices are variable for each category- though I could separate each price range into albums, groups, or categories with the same prices. I believe I saw a Coppermine solution for a shopping cart that had different pricing available per category or album - as in bracelets, necklaces, & earrings- albums for jewelry and batiks and other items for sale- both high and low end pricing. I'm a little overwhelmed from searching through the Coppermine forum for a silvermine solution so I thought I would ask for some advice from someone who may have already tried this. At this point I'm unsure if it will work at all. The simple ecart files for cpg1.4x- installed now- looks doubtful...gotta meet with the client soon. Any suggestions on my search for the right cart application adaptation would be appreciated...if there is one for Coppermine at all. I'll sleep better tomorrow night with the right decision. Thanks.
Title: Re: Paypal shop hack, easy install, online admin
Post by: tantley on January 20, 2007, 11:56:12 am
For the beginning gallery ONLY, to set the same price on everything, as this will update ALL media throughout ALL of the gallery:

Through phpMyAdmin, I opened my CPG MySQL database, made two backups of CPG table for pictures through the "Operations" function, just in case.

Then, using the "SQL" tab, I ran this command:

Code: [Select]
UPDATE `cpg1410_pictures` SET `user1`="1"
Make sure the "cpg1410" corresponds to your CPG version.

This updated everything in the gallery to price structure #1, overwriting existing values that I had previously assigned.

If you're not familiar with SQL or otherwise don't believe in backups, I strongly encourage you not to use this method.

I had over 3,400 images online and needed to place a default value in one operation. This is NOT for an existing gallery who has already set prices up.
Title: Re: Paypal shop hack, easy install, online admin
Post by: rusty1001 on January 22, 2007, 06:29:26 am
Hi

Thanks for the contrib...I have just tried it out looks like it works great,,
I have one problem though,, how does a customer purchase more than one item??
it seems to do straight to the paypal? is that correct? there is no cart as such?
thanks

russell
Title: Re: Paypal shop hack, easy install, online admin
Post by: dnsphoto on February 22, 2007, 04:10:11 am
Hey guys great job with the hack. Easy to install and works from what I can tell. BUT I only need the 1 price op. I dont need paper type  or any of the other stuff. How can I take that out? 2. When I load pictures I load between 300 to 1000 at a time and to edit all the pics to put the 1 in takes a long time. Can you make it so all pictures just get it right off the bat when loaded? I have been use gallery before this and you can do that but its not working real good on the loads so I think I need a change so I am trying this. I am willing to pay for the help to get this fixed.

Thanks again
Dan
Title: The shop admin menu dont show
Post by: arnestad on February 22, 2007, 08:44:52 pm
Hi Casper.
I'm getting in late on this thread but I just found it, everything looks great by the way! I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong?

Hope you can help me out on this one so I can get started:)

Thomas
Title: Re: The shop admin menu dont show
Post by: arnestad on February 22, 2007, 08:46:06 pm
Hi Casper.
I'm getting in late on this thread but I just found it, everything looks great by the way! I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong?

Hope you can help me out on this one so I can get started:)

Thomas

The website adress is http://www.arnestadphotography.com/portofolio/
Title: Re: Paypal shop hack, easy install, online admin
Post by: tantley on February 23, 2007, 08:01:33 am
I have made a PHP/MySQL script for mass-updating of price classes as set by Casper's PayPal mod.

This is recommended for newly modded galleries to easily change existing items all at once.

As always, backup your database prior to using this script. I have tested it extensively with my own database prior to posting it here.

The script does not have any security implementation; install and run for your needs, then remove from your site.

Modify the values in the script for your site. It has some very rudimentary error-checking for values and database connection.

Oh, it is my first MySQL script also...

Code: [Select]
<?php

// Update Price Class For Coppermine Photo Gallery w/ Casper's PayPal MOD
// Feb 23, 2006
// Tim Antley - www.bayoumx.com

// Standard Disclaimer!
// You should always make a backup of your files and databases prior to using any script of this nature.
// There is absolutely NO security with this script whatsoever. Use it and delete it from server to avoid security breaches. 

// This script has been tested and works as designed. Any modification to it will void the "90 seconds or 90 feet" warranty.
// The title bar will have the load time inserted; used to check for operation on multiple page loads.

// And if that wasn't enough warning to back up your database, this is my first MySQL script!

// Change values within the single quotes only; don't edit anything below the warning line.
// Minor error checking for variables to have set values only.
// General error check when accessing the MySQL database specified- no extensive error parsing.
// Specifying a price out of range may cause unwanted problems. Use the price classes you have set up in the mod.

$server =''; // Could be 'localhost' or 'mysql3.secureserver.net'.
$username =''; // User name for access to server.
$password =''; // Password for user name.
$database =''; // Name for the datebase that CPG is using.

$cpg_version=''; // CPG prefix; i.e. CPG1410_
$cpg_table  =''; // CPG table for pictures

$oldprice =''; // Existing price class to be changed; numeric value only
$newprice =''; // New price class; numeric value only

// *******************************************************************
// Nothing below this line should require modification.
// *******************************************************************

$table=$cpg_version.$cpg_table;

echo 
'<TITLE>Price Set Script : '.date("h:i:s").'</TITLE><CENTER>';

echo 
'Set Price Script For Coppermine Photo Gallery & Casper\'s Paypal Mod';
echo 
'<hr>Script by Tim Antley<br><a href="http://www.bayoumx.com">www.bayoumx.com</a><hr>';

if (!
$server or !$username or !$password or !$database)
{
echo 
'<b>Database information values has not been set up.</b>';
exit;
}

if (!
$cpg_version or !$cpg_table)
{
echo 
'<b>Coppermine Photo Gallery table information has not been set correctly.<b>';
exit;
}

if (!
$oldprice or !$newprice)
{
echo 
'<b>Error with price values!</b>';
exit;
}

echo 
'<TABLE align=center>';
echo 
'<TR><TD align=right>Server :  </TD><TD>'.$server.' </TD></TR>';
echo 
'<TR><TD align=right>Database : </TD><TD>'.$database.' </TD></TR>';
echo 
'<TR><TD align=right>User Name : </TD><TD>'.$username.' </TD></TR>';
echo 
'<TR><TD align=right>Table Name : </TD><TD>'.$table.' </TD></TR>';
echo 
'<TR><TD align=right>Existing Price Class :</TD><TD>'.$oldprice.' </TD></TR>';
echo 
'<TR><TD align=right>New Price Class : </TD><TD>'.$newprice.' </TD></TR>';
echo 
'</TABLE>';
echo 
'<HR>';

if (!
$con = @mysql_connect($server$username$password)) 
{
echo 
'<b>Error in MySQL connection!</b><br>';
echo 
'Verify above information with values in script.<br>';
echo 
'Check password (<i>not listed here</i>) for correct value.';
exit;
}

$con mysql_connect($server$username$password);
mysql_select_db($database$con);

$sql 'SELECT * FROM '.$table.' WHERE `user1`="'.$oldprice.'"';

mysql_query($sql);

$sql 'UPDATE '.$table.' SET `user1`="'.$newprice.'"';

mysql_query($sql);

print(
mysql_affected_rows() . " Items Modified\n");

mysql_close($con); 

?>
Title: Re: Paypal shop hack, easy install, online admin
Post by: tantley on February 23, 2007, 08:06:47 am
And I see that the code box I posted has some undesireable characters in there from SMF...

Here it is (again):

<?php

// Update Price Class For Coppermine Photo Gallery w/ Casper's PayPal MOD
// Feb 23, 2006
// Tim Antley - www.bayoumx.com

// Standard Disclaimer!
// You should always make a backup of your files and databases prior to using any script of this nature.
// There is absolutely NO security with this script whatsoever. Use it and delete it from server to avoid security breaches.

// This script has been tested and works as designed. Any modification to it will void the "90 seconds or 90 feet" warranty.
// The title bar will have the load time inserted; used to check for operation on multiple page loads.

// And if that wasn't enough warning to back up your database, this is my first MySQL script!

// Change values within the single quotes only; don't edit anything below the warning line.
// Minor error checking for variables to have set values only.
// General error check when accessing the MySQL database specified- no extensive error parsing.
// Specifying a price out of range may cause unwanted problems. Use the price classes you have set up in the mod.

$server =''; // Could be 'localhost' or 'mysql3.secureserver.net'.
$username =''; // User name for access to server.
$password =''; // Password for user name.
$database =''; // Name for the datebase that CPG is using.

$cpg_version=''; // CPG prefix; i.e. CPG1410_
$cpg_table  =''; // CPG table for pictures

$oldprice =''; // Existing price class to be changed; numeric value only
$newprice =''; // New price class; numeric value only

// *******************************************************************
// Nothing below this line should require modification.
// *******************************************************************

$table=$cpg_version.$cpg_table;

echo '<TITLE>Price Set Script : '.date("h:i:s").'</TITLE><CENTER>';

echo 'Set Price Script For Coppermine Photo Gallery & Casper\'s Paypal Mod';
echo '<hr>Script by Tim Antley<br><a href="http://www.bayoumx.com">www.bayoumx.com</a><hr>';

if (!$server or !$username or !$password or !$database)
{
echo '<b>Database information values has not been set up.</b>';
exit;
}

if (!$cpg_version or !$cpg_table)
{
echo '<b>Coppermine Photo Gallery table information has not been set correctly.<b>';
exit;
}

if (!$oldprice or !$newprice)
{
echo '<b>Error with price values!</b>';
exit;
}

echo '<TABLE align=center>';
echo '<TR><TD align=right>Server : </TD><TD>'.$server.' </TD></TR>';
echo '<TR><TD align=right>Database : </TD><TD>'.$database.' </TD></TR>';
echo '<TR><TD align=right>User Name : </TD><TD>'.$username.' </TD></TR>';
echo '<TR><TD align=right>Table Name : </TD><TD>'.$table.' </TD></TR>';
echo '<TR><TD align=right>Existing Price Class :</TD><TD>'.$oldprice.' </TD></TR>';
echo '<TR><TD align=right>New Price Class : </TD><TD>'.$newprice.' </TD></TR>';
echo '</TABLE>';
echo '<HR>';

if (!$con = @mysql_connect($server, $username, $password))
{
echo '<b>Error in MySQL connection!</b><br>';
echo 'Verify above information with values in script.<br>';
echo 'Check password (<i>not listed here</i>) for correct value.';
exit;
}

$con = mysql_connect($server, $username, $password);
mysql_select_db($database, $con);

$sql = 'SELECT * FROM '.$table.' WHERE `user1`="'.$oldprice.'"';

mysql_query($sql);

$sql = 'UPDATE '.$table.' SET `user1`="'.$newprice.'"';

mysql_query($sql);

print(mysql_affected_rows() . " Items Modified\n");

mysql_close($con);

?>
Title: Re: Paypal shop hack, easy install, online admin
Post by: tinorebel on March 18, 2007, 11:59:56 am
Thanks tantley! :)

I have been waiting so much for something like your  PHP/MySQL script for mass-updating of price classes ....
Caspers Plug in is wonderfull, just simple and effective!
But when you have 1000 pictures to give a prize you cant do it manually.... i'ts nuts!
I use a progam called quick keys which permits to record an action made on a web page and repeat it as many times you like.
That's fine for 50-100 photos or so, but when numbers grow it becomes a huge waste of time.

Now, i'm quite a newby in php - mysql... and really not shure obout what your script is doing.
Someone could be so kind to clarify me ideas?
If I understood right, I make a php page with the script, with my username, password server name and then just load the page.


This will change all the photos in cpg whith pricing structure $oldprice to $newprice ( example structure 2 to structure 5)
What if I need to give a struture price to all photos in a category (from none to 1)
If someone can help me on this issue I would be very thankfull.

 :) :) :)

Get happy!
Title: Re: Paypal shop hack, easy install, online admin
Post by: ttfphoto on March 24, 2007, 07:01:46 pm
alright, every time I try to upload this plugin to coppermine I get a Critical Error

does anyone have any ideas?
Title: Re: Paypal shop hack, easy install, online admin
Post by: Joachim Müller on March 26, 2007, 10:46:52 am
1) This is not a plugin, but a mod
2) Post the actual error message (not the debug_output) - turn debug_mode on in Coppermine's config to enable it.
Title: Can't access my index.php
Post by: arnestad on March 26, 2007, 11:31:12 am
Hi.
I followed the all the instructions and modified all files as told. I had to replace all the codes etc due to using norwegian language for this gallery. However, when I'm finished I can't access my gallery, I only get a blank page and I cant tell where I went wrong.

My gallery is located within www.fotokunstner.no/kunst

Hope someone can check this out for me and tell me what to adjust so that I can get my gallery up and running.
Title: Re: Paypal shop hack, easy install, online admin
Post by: tantley on March 27, 2007, 06:07:04 am
Now, i'm quite a newby in php - mysql... and really not shure obout what your script is doing.
Someone could be so kind to clarify me ideas?
If I understood right, I make a php page with the script, with my username, password server name and then just load the page.


This will change all the photos in cpg whith pricing structure $oldprice to $newprice ( example structure 2 to structure 5)
What if I need to give a struture price to all photos in a category (from none to 1)
If someone can help me on this issue I would be very thankfull.

I apologize for the delay in answering. Missed the notification for replies...

Insert your existing database information (server, user, password, and database name) in the first few lines of the script. You should only need to modify the 8 values in that section- no need to modify below those lines.

Use the $oldprice & $newprice lines to set the price class for the photos; this should be 1,2,3,4, or 5 based on your setting in the PayPal mod configuration panel.

The script should then be saved and placed on your webserver (by FTP). Using your browser, load the script (such as "www.yourserver.com/scriptname.php") and it should report the total number of items modified in your database. Otherwise, an simple error message will display, requiring correct values to run properly.

I must stress that you should immediately delete the script from your webserver after running it. It has crucial database connection information that need not be exploited.

You can run the script multiple times (for whatever reason) but once should modify the entire contents to the new price class you set.

To answer your last question, the script will set all items that are not priced already to the new price class.
Title: Re: Paypal shop hack, easy install, online admin
Post by: tmas73 on March 31, 2007, 11:18:38 pm
I just installed the mod the first time on "http://www.photobomb.com/components/com_copperminevis/cpg" (http://"http://www.photobomb.com/components/com_copperminevis/cpg") but when I browse the Shop admin button I get page not found error. I use a joomla bridge. Any info on this error?

Thanks
TMAS
Title: Re: Paypal shop hack, easy install, online admin
Post by: JJRuhle on April 03, 2007, 01:40:50 am
Umm.... I may sound like an idiot and open myself to some sever flaming, but where can I download this hack? I do not see a link in the Sourceforge site or this thread?

Thanks!
Title: Re: Paypal shop hack, easy install, online admin
Post by: JJRuhle on April 03, 2007, 01:45:57 am
Nevermind.... I AM an idiot, but figured it out  :o
Title: Re: Paypal shop hack, easy install, online admin
Post by: erika_conn on April 19, 2007, 08:50:47 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 (http://clive.photography-cafe.com/shop/) and a live install using just 2 pricing structures and no other options at this site, http://www.landscapeandlight.co.uk/ (http://www.landscapeandlight.co.uk/)


updated 30/1/06 to include fix for bug found here (http://forum.coppermine-gallery.net/index.php?topic=26454.msg124523#msg124523)
I just visited your website.  Just beautiful.  You're telling me that is using your paypal shop hack?  It's so clean and elegant.  Much nicer than coppermine themes, I think.
I'd like to create something like that as well.  I uploaded your program into coppermine and there it sits.  I'm afraid to go further. 
I think what spooked me is overwriting files.  What if Coppermine doesn't work at all after that?
Title: Re: Paypal shop hack, easy install, online admin
Post by: QBO on April 24, 2007, 05:42:00 am
I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong? I have updated the database. I'm using the eyeball theme, cpg 1.4.6. in the thumbnail I can see all the default spaces in "Buy with confidence" and "Place your order here".
Please help.

Title: Re: Paypal shop hack, easy install, online admin
Post by: sharon1 on July 21, 2007, 07:42:11 pm
My first time with .php, I have installed Coppermine and your paypal shop hack.  I would like to add something into the "Place your order here area".  With the same font used for "Main options name" and to the right of that, I would like to add a line that says For Rights-Managed Usage, Please Email ...and include my email address that is linkable.  Is this possible? 

Thanks,

Sharon
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharon1 on July 22, 2007, 02:09:41 pm
Hello,

I thought since I had worked with Coppermine more since my last post, I might be a little clearer.  Here is a link to my gallery.

http://www.vanlieuphotography.com/stock/

I have the one option of Royalty Free Images.  I need another option for Rights Managed Images.  But I need to have both options for each image.  I would like to add this second drop down menu to the right of the existing one.  If that is not possible, I would like to put a clickable email link to the right of the drop down menu.  Is this possible?  If not, do you have any suggestions for something I could use with Coppermine that would allow that option?

Thanks for your help,

Sharon
Title: Re: Paypal shop hack, easy install, online admin
Post by: sharon1 on July 24, 2007, 07:25:18 pm
I guess there's no longer any support for this mod.   

Sharon
Title: Re: Paypal shop hack, easy install, online admin
Post by: Joachim Müller on July 25, 2007, 08:26:38 am
Correct.
Title: Re: Paypal shop hack, easy install, online admin
Post by: Nigep on May 12, 2008, 10:57:38 pm
I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong? I have updated the database. I'm using the eyeball theme, cpg 1.4.6. in the thumbnail I can see all the default spaces in "Buy with confidence" and "Place your order here".
Please help.

I tried to install this, have reinstalled coppermine, the mod several times. Get the same arrows as above. I`ve searched and am not sure if any of these mods are now supported. I think I`ve reached a dead-end and dont know where to go  :(
Title: Re: Paypal shop hack, easy install, online admin
Post by: Joachim Müller on May 13, 2008, 09:04:37 am
I guess there's no longer any support for this mod.
Correct.
Locking.