Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 13 14 15 16 [17] 18 19 20   Go Down

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

0 Members and 1 Guest are viewing this topic.

LWAA

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: add a Paypal shopping basket to your gallery.
« Reply #320 on: July 05, 2005, 02:01:36 pm »

I've added this hack (thanks!!) but when I select an option in the menu (eg 8x10 print $10), I'm taken to a paypal page and it says "please enter an amoutn greater than zero" even though the amounts are listed in the config file.
I noticed however, when I update the database, it says values are zero, and currency is GBP when IO specified in the config that it should use Can$. DO I need to duplicate my additions to the config file elsewhere, or change permissions to a file to allow the config page to write to it?

http://66.78.27.233/~basement/flrouiedscv3/

thanks!
Logged
<i>"I understand everything, except what you're telling me"</i>

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #321 on: July 05, 2005, 04:19:26 pm »

I've added this hack (thanks!!) but when I select an option in the menu (eg 8x10 print $10), I'm taken to a paypal page and it says "please enter an amoutn greater than zero" even though the amounts are listed in the config file.
I noticed however, when I update the database, it says values are zero, and currency is GBP when IO specified in the config that it should use Can$. DO I need to duplicate my additions to the config file elsewhere, or change permissions to a file to allow the config page to write to it?

http://66.78.27.233/~basement/flrouiedscv3/

thanks!

First, the ammount greater than zero problem has been discussed several times.  The answer is at http://forum.coppermine-gallery.net/index.php?topic=19491.msg79859#msg79859

Please search before asking.


When I visited your site it was showing the currency as Can$, so it seems you have fixed that.
« Last Edit: October 11, 2005, 10:46:56 am by Casper »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

LWAA

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: add a Paypal shopping basket to your gallery.
« Reply #322 on: July 05, 2005, 04:53:13 pm »

thanks and sorry.

I swapped out the javascript code, but still get the same error. I updated the database too in case that was causing it.

When I go to Admin Tools and click on Update Database, I still see  £ and currency says GBP.
« Last Edit: July 05, 2005, 05:16:23 pm by LWAA »
Logged
<i>"I understand everything, except what you're telling me"</i>

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #323 on: July 05, 2005, 08:39:12 pm »

thanks and sorry.

I swapped out the javascript code, but still get the same error. I updated the database too in case that was causing it.

When I go to Admin Tools and click on Update Database, I still see  £ and currency says GBP.


OK, there is a problem with your java script, with a load of funny characters.

This is what you should have;

Code: [Select]
<!--
function Dollar (val) {  // force to valid dollar amount
var str,pos,rnd=0;
  if (val < .995) rnd = 1;  // for old Netscape browsers
  str = escape (val*1.0 + 0.005001 + rnd);  // float, round, escape
  pos = str.indexOf (".");
  if (pos > 0) str = str.substring (rnd, pos + 3);
  return str;
}

function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
  amt = obj1.baseamt.value*1.0;       // base amount
  des = obj1.basedes.value;           // base description
  for (i=0; i<obj1.length; i++) {     // run entire form
    obj = obj1.elements[i];           // a form element
    if (obj.type == "select-one" &&   // just get selects
        obj.name == "") {             // must be un-named
      pos = obj.selectedIndex;        // which option selected
      val = obj.options[pos].value;   // selected value
      pos  = val.indexOf ("@");       // price set?
      if (pos >= 0) amt = val.substring (pos + 1)*1.0;
      pos  = val.indexOf ("+");       // price increment?
      if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
      pos  = val.indexOf ("%");       // percent change?
      if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
      pos  = val.indexOf ("#");       // item number?
      if (pos > 0) {                  //  yes
        num = val.substring (pos + 1);// get number, and rest of line
        val = val.substring (0, pos); // lop off some stuff
        pos = num.indexOf (" ");      // end it with space
        if (pos > 0) num = num.substring (0, pos);
      }
      if (des.length == 0) des = val;
      else des = des + ", " + val;    // accumulate value
    }
  }
  if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
  obj1.item_name.value = des;
  obj1.amount.value = Dollar (amt);
  if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>



And this is what you have;

Code: [Select]
<!--
function Dollar (val) {Ý // force to valid dollar amount
var str,pos,rnd=0;
Ý if (val < .995) rnd = 1;Ý // for old Netscape browsers
Ý str = escape (val*1.0 + 0.005001 + rnd);Ý // float, round, escape
Ý pos = str.indexOf (".");
Ý if (pos > 0) str = str.substring (rnd, pos + 3);
Ý return str;
}

function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
Ý amt = obj1.baseamt.value*1.0;Ý Ý Ý Ý// base amount
Ý des = obj1.basedes.value;Ý Ý Ý Ý Ý Ý// base description
Ý for (i=0; i<obj1.length; i++) {Ý Ý Ý// run entire form
Ý Ý obj = obj1.elements[i];Ý Ý Ý Ý Ý Ý// a form element
Ý Ý if (obj.type == "select-one" &&Ý Ý// just get selects
Ý Ý Ý Ý obj.name == "") {Ý Ý Ý Ý Ý Ý Ý// must be un-named
Ý Ý Ý pos = obj.selectedIndex;Ý Ý Ý Ý // which option selected
Ý Ý Ý val = obj.options[pos].value;Ý Ý// selected value
Ý Ý Ý posÝ = val.indexOf ("@");Ý Ý Ý Ý// price set?
Ý Ý Ý if (pos >= 0) amt = val.substring (pos + 1)*1.0;
Ý Ý Ý posÝ = val.indexOf ("+");Ý Ý Ý Ý// price increment?
Ý Ý Ý if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
Ý Ý Ý posÝ = val.indexOf ("%");Ý Ý Ý Ý// percent change?
Ý Ý Ý if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
Ý Ý Ý posÝ = val.indexOf ("#");Ý Ý Ý Ý// item number?
Ý Ý Ý if (pos > 0) {Ý Ý Ý Ý Ý Ý Ý Ý Ý //Ý yes
Ý Ý Ý Ý num = val.substring (pos + 1);// get number, and rest of line
Ý Ý Ý Ý val = val.substring (0, pos); // lop off some stuff
Ý Ý Ý Ý pos = num.indexOf (" ");Ý Ý Ý // end it with space
Ý Ý Ý Ý if (pos > 0) num = num.substring (0, pos);
Ý Ý Ý }
Ý Ý Ý if (des.length == 0) des = val;
Ý Ý Ý else des = des + ", " + val;Ý Ý // accumulate value
Ý Ý }
Ý }
Ý if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
Ý obj1.item_name.value = des;
Ý obj1.amount.value = Dollar (amt);
Ý if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>

See all those 'Y' like figures where there should be spaces.

And as for the currency, I suspect when you used the admin tools to update again, it reset it to default.

Just change it in config.  It is certainly showing Can$ in the dropdown boxes and codes.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

LWAA

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: add a Paypal shopping basket to your gallery.
« Reply #324 on: July 05, 2005, 08:50:27 pm »

ah! they look like little martini glasses !! Thanks.
Logged
<i>"I understand everything, except what you're telling me"</i>

Okie

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
  • "The Wind Is What It Is."
    • Red Earth Reflections
Re: add a Paypal shopping basket to your gallery.
« Reply #325 on: July 06, 2005, 06:18:32 am »

Hi Casper,
I need some help, please?  I've spent the last 4 days uploading, installing, deleting, reading, uploading, installing, and deleting.  I installed cpg133, and had it operating fine for a few weeks.  Then I saw Mal's paypal zip and downloaded it.  I followed the instructions meticulously but never could get things to work properly.  That's when I would delete cpg133 and begin again, trying to be more precise.  Well things have progressed to the point that today, alone, I have installed cpg133, and either Mal's mod, or yours, 4 times and deleted it 3 times.  The last time was this evening and I was sure I downloaded your most recent zip, including the 3 files that had been corrected.  I had already installed cpg133 and had it up and running, in a manner that appeared to be fine.  I downloaded the rainy-day theme you have already tweaked, added a button to my home page, changed the location of the "view basket" button, and uploaded it and everything else, as is.  I completed the operation with the update.php.
Now, my frustration.  There never is a PayPal section on the Configuration Menu.  I'm under the impression it should be there.  Also, the icons that indicate the result of a batch upload are never there either, but the files seem to be uploading just fine.
Will you see if you can help me?   http://okiedokiephotos.com/cpg133
Thanks!   :)
Carl
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #326 on: July 06, 2005, 12:37:14 pm »

@ Carl,

I think you have mixed up the 2 paypal mods.

Please send me a pm, with an admin account login. 

Please also confirm which mod you are trying to use, the one with the same prices and options throughout the gallery, or the one where each item can be priced and optioned differently.

And if you want, your ftp log in, and I will install the mod you want for you.

Others please note, I'll only do that as it's my fault for not seperating the 2 different hacks.

I will split the 2 mods now into seperate threads.

Edit, the new mod, with options and prices set seperately for each item can now be found here
« Last Edit: July 06, 2005, 12:48:00 pm by Casper »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

nad13

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 26
Re: add a Paypal shopping basket to your gallery.
« Reply #327 on: July 27, 2005, 12:33:56 pm »

I English does not include/understand well... But I have reussi has to include Paypal with the MOD of Casper: -)  I have a problem as I want to add photographs?  

message :

Warning: exec() has been disabled for security reasons in /home/users/m/maltese13/www/photomaltese/albums/include/picmgmt.inc.php on line 162

Warning: chmod(): No such file or directory in /home/users/m/maltese13/www/photomaltese/albums/include/picmgmt.inc.php on line 224

Warning: getimagesize(albums/nb/thumb_16.jpg): failed to open stream: No such file or directory in /home/users/m/maltese13/www/photomaltese/albums/include/picmgmt.inc.php on line 226
Impossible de créer la vignette ou l'image réduite.


thank you for your assistance

Nadine
photographe FRANCE
http://www.photomaltese.com

coppermine  + Paypal here : http://www.photomaltese.com/albums

 :\'(
Logged
e.com/site/images/stories/Bannieres/petition_animation.gif[/img][/url]

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: add a Paypal shopping basket to your gallery.
« Reply #328 on: July 28, 2005, 06:05:04 am »

not related to the paypal hack. The error message you get means that you can't use ImageMagick due to server-sided restrictions - use GD instead. For details, ask your webhost, or search this board for the error message you get (has been asked frequently). If this is a language issue, you're wlecome to post on the french support board.
Logged

nad13

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 26
Re: add a Paypal shopping basket to your gallery.
« Reply #329 on: July 28, 2005, 12:09:39 pm »

Thank you very much... 

It is GD x2 which goes: -) 

I do not know why it had become "image magic" in the configuration..
mauvaise handling

thank you : -) 

Nadine
Photographe France
 :D
http://www.photomaltese.com
Logged
e.com/site/images/stories/Bannieres/petition_animation.gif[/img][/url]

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: add a Paypal shopping basket to your gallery.
« Reply #330 on: August 03, 2005, 12:33:22 pm »

Great hack Casper. 

I'm totally new to HTML and PHP -- about three weeks!   The first week I spent trying all those other gallery software using java and html. All of them only allowed users to build one gallery with ONE category and maybe just ONE sub-category or album.   Then I discovered Coppermine! Then your hack! I not only got it installed on successfully on coppermine 1.33 but also on coppermine 1.4.  At this rate, I'll have my site up and running in a couple of weeks not months.

Thanks again.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

falki

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: add a Paypal shopping basket to your gallery.
« Reply #331 on: August 11, 2005, 09:14:33 am »

Hey Casper

Your hack is just great!
I have intergatet in my new "Foto Shop"
See it working at: http://www.magic-places.ch/canada/

Thanks a lot  :)
Falki
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #332 on: August 11, 2005, 10:50:32 am »

Thanks madeinhawaii and falki,

It's always good to here that what you have done has helped others.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: add a Paypal shopping basket to your gallery.
« Reply #333 on: August 30, 2005, 04:32:33 am »

 ??? what happened to the old version of this hack.. the one where every item had the same prices attached to them and the prices for everything is set in the config panel .  Now I only have the option to set the price for each individal item and there is nowhere to enter prices in config.  Feeling dense.. I have done this a couple of times before.  What am I missing?  I downloaded the hack from the downloads section where there is only this one version. 



 8) Nevermind I found it on an earlier post (page 5)

http://prdownloads.sourceforge.net/coppermine/cpg1.3.x_mod_shop_no_themes.zip?download
« Last Edit: August 30, 2005, 05:30:23 am by zac »
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: add a Paypal shopping basket to your gallery.
« Reply #334 on: August 30, 2005, 05:42:15 am »

ok.. back with a ? that i dont think i can solve.  i installed the older version of your hack and everything seemed to work ok..

i have the options in the config now but nothing is showing up on the site.. no options, no buy it button..

test drive @ http://www.folkphotography.com/client_portraits/index.php

thanks for any help on this
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #335 on: August 30, 2005, 12:37:25 pm »

Hi zac,

This used to happen when the photos had no title.  If this is what's causing it, there are posts about how to change the code.

Alternately, you could get the latest version of the first hack from my test site, at http://www.picture-parade.co.uk/shop/

If this doesn't fix it for you, please zip up your theme files and attach them to a posting here, for me to look at.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: add a Paypal shopping basket to your gallery.
« Reply #336 on: August 30, 2005, 09:19:34 pm »

Thanks Capser!  They just needed titles.  Cheers!
Logged

djmac

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
Re: add a Paypal shopping basket to your gallery.
« Reply #337 on: August 31, 2005, 07:35:49 am »

Casper

I recently sent you a PM. Ignore it. Here is my problem. Maybe you can help me. I have created a drop down menu using the following code. It works well but will not show the purchase information

Code: [Select]
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_number" value="Size"><input type="hidden" name="item_name" value="Print"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="add" value="1"><input type="hidden" name="business" value="me@anytown.com">

<!-- create drop down for the price -->
<!-- add as many selections as you need here
in the following format
<select name="amount">
<option value="dollaramount">nameshownindropdownlist</option>
.
.
.
<option value="x">x</option>
</select> -->

<select name="amount">
<option value="">Print Size and Price</option>
<option value="0.19">4x6 $0.19</option>
<option value="0.79">5x7 $0.79</option>
<option value="3.99">8x10 $3.99</option>
<option value="8.99">11x14 $8.99</option>
<option value="18.99">16x20 $18.99</option>
<option value="24.99">20x30 $24.99</option>
<option value="1.79">Wallet(4) $1.79</option>
<option value="1.69">Wallet(8) $1.69</option>
<option value="1.59">Wallet(12) $1.59</option>
<option value="1.49">Wallet(16) $1.49</option>


</select>
<input type="submit">

I get the following results. Under Item I get PRINT and #Size What I want to see is PRINT and 4x6 or 5x7 etc etc

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.imagemarket.biz%2Fimages%2Fcart.gif&hash=786f85b0cbe015b3cb851f5f500b7a4a7fcbddd2)       


Thanks in advance

Regards
Don McLaughlin
 
« Last Edit: August 31, 2005, 09:17:40 am by djmac »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #338 on: August 31, 2005, 12:26:42 pm »

I was fully intending to ignore the pm, as per my signature.

But as you asked here, try this.  Change each option line from this;

Code: [Select]
<option value="0.19">4x6 $0.19</option>
to this;

Code: [Select]
<option value="4x6 @0.19">4x6 $0.19</option>
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

djmac

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
Re: add a Paypal shopping basket to your gallery.
« Reply #339 on: August 31, 2005, 12:35:00 pm »

I was fully intending to ignore the pm, as per my signature.

But as you asked here, try this.  Change each option line from this;

Code: [Select]
<option value="0.19">4x6 $0.19</option>
to this;

Code: [Select]
<option value="4x6 @0.19">4x6 $0.19</option>



Sad to say I tried it and it comes back empty with an error that says:

The link you have used to enter the PayPal system contains an incorrectly formatted item amount.

Casper

I am going to bed. I have been up all night - its 6:54am  here I need to get some sleep. I really appreciate anything you can do for me

Best Regards
Don

ps, I just saw the signature. Won't happen again
« Last Edit: August 31, 2005, 12:54:00 pm by djmac »
Logged
Pages: 1 ... 13 14 15 16 [17] 18 19 20   Go Up
 

Page created in 0.03 seconds with 19 queries.