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 ... 9 10 11 12 [13] 14 15 16 17 ... 20   Go Down

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

0 Members and 2 Guests are viewing this topic.

mikecheliak

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: add a Paypal shopping basket to your gallery.
« Reply #240 on: March 17, 2005, 08:13:02 pm »

Nevermind again...found it!

Mike
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #241 on: March 18, 2005, 08:38:22 pm »

That query does not exist in the update sql that comes with the mod.  Are you sure you replaced the sql/update.sql file with the one from the mod.

Also, are you sure you are using version 1.3.2 which was installed and working before the hack was applied?
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

Tim

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rtellis.co.uk
Re: add a Paypal shopping basket to your gallery.
« Reply #242 on: March 23, 2005, 08:43:39 pm »

We have just started using the gallery for business and this hack is perfect
thank you for making it.....

It is the final icing on the cake :D

[all we have to work out is how to make postage be added auto matically]
Logged

lcny

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
    • Steel Life Studios
Re: add a Paypal shopping basket to your gallery.
« Reply #243 on: April 08, 2005, 12:28:17 am »

Hi all,

I seem to be totally lost!!  I want to install this mod to a new CPG I just installed but after reviewing a few confusing threads and downloading two different zip files, I'm still baffled!   ???

I have downloaded :  cpg1.3.x_mod_shop_all_themes_only   &  shop-update

Neither come with instructions and I can't seem to find any update.php file.  

I currently use the hardwire template and would love it if someone could maybe give me the link to the most recent download for this mod and hopefully a link to the instructions.  

MANY THANKS!
Lisa

Steel Life Studios

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #244 on: April 08, 2005, 11:31:45 am »

Actually, the 'shop_update.zip' comes with full instuctions.  They are in the docs folder, called shop.html

You can get the latest files from http://www.picture-parade.co.uk/shop/index.php where there is also a version for mals ecommerce.
« Last Edit: April 08, 2005, 11:41:37 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

spence

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: add a Paypal shopping basket to your gallery.
« Reply #245 on: April 08, 2005, 09:20:18 pm »

Casper,

Does your "Alternate priced category" only display correctly in reynolds theme? Or is this only specific to your site's demo?

And can we count on you to port this hack to CPG 1.4 when it is available?

Thanks.
« Last Edit: April 08, 2005, 09:57:55 pm by spence »
Logged

Casper

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

Hi spence,

that is just on my demo.  The way you would do it on your own site is to make a copy of your main theme, and use that, so for the visitor it would be seamless, and look exactly the same as the other pages.

I already have it working on a 1.4 install, there are a few changes to the files, but they will be posted, along with a full downloadable version, when 1.4 is released as stable.
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

itrends

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: add a Paypal shopping basket to your gallery.
« Reply #247 on: April 13, 2005, 06:15:22 pm »

I want to use paypal but for individual orders, I dont wish to use the "basket", is there an easy way to implement a "buy now" for each image that runs via paypal for the checkout?

Cheers
Dave
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #248 on: April 14, 2005, 11:25:04 am »

Should be quite easy.

Try this, change this line of code;

Code: [Select]
<input type="hidden" name="cmd" value="_cart" />
to this;

Code: [Select]
<input type="hidden" name="cmd" value="_xclick">

Now change this;

Code: [Select]
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" name="submit" alt="cart add" />

to this;

Code: [Select]
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">


You can then remove the view basket button from the theme.php file.

This is untested, but should work.
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

Tim

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rtellis.co.uk
Re: add a Paypal shopping basket to your gallery.
« Reply #249 on: April 16, 2005, 03:48:14 pm »

Can anyone help us?
for some unknown reason we have lost the selection process when you display the image, I have looked at the coding - but nothing has changed - PLEASE HELP :D
Logged

Tim

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rtellis.co.uk
Re: add a Paypal shopping basket to your gallery.
« Reply #250 on: April 17, 2005, 10:33:11 am »

it's ok now, we have sorted it - thanks for this great hack :D
Logged

lcny

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
    • Steel Life Studios
Re: add a Paypal shopping basket to your gallery.
« Reply #251 on: April 20, 2005, 11:05:26 am »

Hi Casper,

I have the shop mod installed and I thought everything looked good until I got the "Please enter an amount greater than zero" error message that's been mentioned before.  I'm using the Hardwired theme and have no other modifications.  Also, ever since installing the Shop Mod, I can no longer log out.  Once I log in as admin I'm always logged in.  If I click on log out - it acts like it's logging me out, right down to "Bye bye", but then when it goes back to the main page I'm still logged in.

If you could help me out with these two problems, I'd be very grateful . . . and I am more than willing to pay you if you can help us resolve this.  We have an event we need to have on the web for sale by our promised date (which is now tomorrow) and I don't want to add any more pictures until I get this resolved.  

I'm sure you're as busy as I am, so if there's anything I can do to make it worth your while, please let me know by PM.  Also, I wasn't sure what files to include for you to look at, so if you'll let me know what you need to see, I'll zip them and post them  a.s.a.p.!

Thanks in advance for any help you can give us.  
This is a great mod!! (It just seems to be failing due to "user error")   :-\\
Lisa

EDIT: adding zip of theme.php and template.html
« Last Edit: April 20, 2005, 08:34:39 pm by lcny »
Logged

DobsonCentral

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
    • Dobson Central Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #252 on: April 20, 2005, 09:11:55 pm »

From what I can see, this looks like it will be a great mod.  The only issue I have is that it doesn't work for me yet.  I believe Lars had the same issue earlier in this thread, but I don't see the fix for this.  I'm using ver 1.3.2 and the Igames theme.  Without debug mode, with the paypal mod installed, I get an error on the page that says on Line 26, char 17, a semicolon is expected.  In debug mode, it tells me that there is a Use of Undefined Constant Currency_Symbol Assumed 'Currency_Symbol' in theme.php on lines 590 and 599 through 603.

Upon looking at the code, I thought I figured it out.  On the line that shows:

Code: [Select]
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
looks like it's missing the single quotes around currency.  Putting single quotes eliminates the error on this line.  Likewise where the code for all of your pricing is (20 or however many each person chooses to have), the single quotes are missing around currency_symbol.  Inserting the single quotes fixes these lines from having errors.  

Now comes the fun part, once all that is done, I start receiving the following errors:

Undefined variable: header in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1475

Undefined variable: template_tab_display in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1480

Undefined variable: lang_thumb_view in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1483

Undefined index: inactive_tab in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1484


If someone could post a fix for this, I'd greatly appreciate this.  I've been at this for two days now.  I'm hoping that whatever is causing these errors, is also causing nothing to be passed to Paypal.  Each time I've tried to add something to the cart, the cart remains empty when I'm pushed over to paypal.   As I said, I'm hoping these are all related somehow.

Thanks for any insight.  
Logged
Ken Dobson
Dobson Central

tzastrow

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: add a Paypal shopping basket to your gallery.
« Reply #253 on: April 21, 2005, 03:54:08 am »

Hey everyone, im VERY new to coppermine and im trying to set up paypal to my website, im currently using the hardwood theme it and i was curious if it is even possible to incoporate the paypal feature to my site. When i downloaded the all_themes file it didnt have the hardwood theme in there so i wasent quite sure if i could do it or not

Any help would be greatly appreciated

Thanks
Tim
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #254 on: April 21, 2005, 07:16:56 am »

I have the shop mod installed and I thought everything looked good until I got the "Please enter an amount greater than zero" error message that's been mentioned before.  I'm using the Hardwired theme and have no other modifications.

Hi Lisa,

the failure to get the amount is because your template.html does not have the javascript needed.  You have added some for stats, which may be the cause of your logout problem.

EDIT;, on visiting your site, I see your add to basket button is also missing.  I found this was because you had deleted the '</select>' tag  when you removed the unwanted selections.  I have added it in the attached zip.
« Last Edit: April 21, 2005, 07:29:20 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

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #255 on: April 21, 2005, 07:20:25 am »

Hey everyone, im VERY new to coppermine and im trying to set up paypal to my website, im currently using the hardwood theme it and i was curious if it is even possible to incoporate the paypal feature to my site. When i downloaded the all_themes file it didnt have the hardwood theme in there so i wasent quite sure if i could do it or not

Any help would be greatly appreciated

Thanks
Tim

Hi Tim,

the download for the hack itself(not the themes download) has a docs folder, and in there are a couple of html files you should read.  It is explained how to add this to other themes, or already customised themes.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #256 on: April 21, 2005, 07:37:08 am »

From what I can see, this looks like it will be a great mod.  The only issue I have is that it doesn't work for me yet.  I believe Lars had the same issue earlier in this thread, but I don't see the fix for this.

Hi,

try replacing the javascript in template.html, as here.  Find;

Code: [Select]
<script type="text/javascript">
<!-- Hide JS source from HTML validators
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;
  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);
      if (des.length == 0) des = val;
      else des = des + ", " + val;    // accumulate value
    }
  }
  obj1.item_name.value = des;
  obj1.amount.value = Dollar (amt);
  if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>

Replace it with;

Code: [Select]
<script type="text/javascript">
<!--
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>

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

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #257 on: April 21, 2005, 07:55:43 am »

I'm using ver 1.3.2 and the Igames theme.  Without debug mode, with the paypal mod installed, I get an error on the page that says on Line 26, char 17, a semicolon is expected.  In debug mode, it tells me that there is a Use of Undefined Constant Currency_Symbol Assumed 'Currency_Symbol' in theme.php on lines 590 and 599 through 603.

Upon looking at the code, I thought I figured it out.  On the line that shows:

Code: [Select]
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
looks like it's missing the single quotes around currency.  Putting single quotes eliminates the error on this line.  Likewise where the code for all of your pricing is (20 or however many each person chooses to have), the single quotes are missing around currency_symbol.  Inserting the single quotes fixes these lines from having errors. 

Now comes the fun part, once all that is done, I start receiving the following errors:

Undefined variable: header in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1475

Undefined variable: template_tab_display in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1480

Undefined variable: lang_thumb_view in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1483

Undefined index: inactive_tab in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1484




Thanks for the info on the missing single quotes.  On my install I have no problem with parse errors, only the notices.  Putting in the single quotes in the '[currency]' and '[currency_symbol]' does remove these notices.

The remaining notices are nothing to worry about, and are nothing to do with the shop hack, they appear in the regular theme as well.  Just turn off the notices and debug mode.
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

lcny

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
    • Steel Life Studios
Re: add a Paypal shopping basket to your gallery.
« Reply #258 on: April 21, 2005, 09:32:13 pm »


Hi Lisa,

the failure to get the amount is because your template.html does not have the javascript needed.  You have added some for stats, which may be the cause of your logout problem.

EDIT;, on visiting your site, I see your add to basket button is also missing.  I found this was because you had deleted the '</select>' tag  when you removed the unwanted selections.  I have added it in the attached zip.

Hi Casper,

Thanks so much for your help! The 'Add To Basket' is now working, which is what was most important, however I still can't log out.  Also, is there anyway to replace the buttons with something that fits the theme a little better.  I saw someone elses Paypal feature in his Coppermine gallery and his buttons for PayPal are gorgeous and really fit the page - it looks like it's built-in as opposed to an add-on.  You can see it at http://www.roweimages.com/ his gallery is under "Portfolio"
I know I've said it before, but I want to say it again because your help is truly appreciated . . . if I can pay you for your assistance, please just let me know!

Lisa

 

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #259 on: April 21, 2005, 10:37:07 pm »

Hi Lisa,

The buttons on that site are actually just alternative ones supplied by paypal.  If you wish to use them, open your theme.php, and do as follows.

Find;

Code: [Select]
<input type="image" src="https://www.paypal.com/en_GB/i/btn/view_cart_02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
Change it to;

Code: [Select]
<input type="image" src="https://www.paypal.com/en_US/i/btn/view_cart.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
Then find this code;

Code: [Select]
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" name="submit" alt="cart add" />
and change it to;

Code: [Select]
<input type="image" src="https://www.paypal.com//en_GB/i/btn/sc-but-03.gif" name="submit" alt="cart add" />

You can use any image you want, you don't have to use paypals.  For instance, I recently did the ones below for a friend, using an online button creator.  You can use these or any other, by simply changing the url in the codes above to point to your own images.

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
Pages: 1 ... 9 10 11 12 [13] 14 15 16 17 ... 20   Go Up
 

Page created in 0.042 seconds with 15 queries.