forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Selling pictures => Topic started by: artistsinhawaii on October 03, 2005, 02:47:34 am

Title: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: artistsinhawaii on October 03, 2005, 02:47:34 am
Newly Updated as of 11-11-2005!   3 New Versions!


See:

http://forum.coppermine-gallery.net/index.php?topic=22357.msg108825#msg108825

for most recent version.   Also see the two posts that follow the above link for two other renditions of this paypal mod.


Now with a simple if..else routine to handle different pricing structures for different items in your gallery.

Now buttons will display under intermediate image even if picture has no title. (updated instructions on  11/12/2005)

Aloha!

 For Cpg 1.3x and Cpg 1.4x

To test this cart, simply download the file. Unzip, copy the files to their respective folders and Open an intermediate image and replace the "displayimage.php" portion of the URL in your browser with "orders.php".   That's it.

This is a theme consistent, single order, server-side, paypal cart form that opens from a button in the nav bar above the intermediate view, or as a button under your intermediate image, or as a link in your picture information section OR you can choose to install two or all three methods. It offers the admin a very professional looking paypal interface that displays the image and all purchase options and information. It can be customized like any other php/html page with any additional information about the image or product you deem important.
 

As is, it offers the following:
   5 drop down lists
   1 set of radio buttons
    Each drop down list can contain any number of choices, prices, options, etc.
    Additional drop down lists can be easily added to increase your options and offerings.
   Support for checked boxes as well.

In essense you have 6 to the nth power of options = unlimited.   You can also customize the page to include as much information about your services as you want - Guarantees, disclaimers, etc.

If you have a number of uniquely different items that call for different price options, you can modify the if ... else... routine in the script to change the pricing options automatically and create as many different pricing structures as your site requires (see installation instructions included in the package).  You will need to reserve a "Custom fields for image description" field for this option.   

Permanent installation requires that you follow the steps outlined in the instructions.   This is the least invasive, easiest to install, yet most versatile paypal mod for coppermine available.

To DOWNLOAD follow this link: http://forum.coppermine-gallery.net/index.php?topic=22357.msg108825#msg108825

Dennis

PS. For those who have very basic paypal needs, the next two posts following the link above have even simpler, easier to install versions of this mod. The choice is yours.
Title: Re: New Paypal Mod using a customizable page.
Post by: artistsinhawaii on October 03, 2005, 03:20:34 am
Same mod, but for Coppermine 1.4x.

Updated follow the link below:

Dennis

http://forum.coppermine-gallery.net/index.php?topic=22357.msg108825#msg108825  (http://forum.coppermine-gallery.net/index.php?topic=22357.msg108825#msg108825). 
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: RazorsEdge on October 04, 2005, 02:08:37 pm
excellent, I will try this out today when I get home from work.

Thanks.

-Razors Edge-

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: joker on October 05, 2005, 03:40:33 am
I think you forgot some steps..

I couldnt get it to work until I added the following.

in Displayimage.php
--------#1--------
Find:
function html_img_nav_menu()

Insert this after the 'IF' statements:
$ecart_tgt = "ecart.php?album=$album$cat_link&pid=$pid&pos=$pos";

What was the error?  All the other instructions show you using 'ecart.php' but this line originally had cart_sim.php at the beginning.

--------#2---------
Find:
'{ECARD_TGT}' => $ecard_tgt,

Insert after:
'{ECART_TGT}' => $ecart_tgt,

What was the error?  Just needed this to actually replace the {ECART_TGT} in the URL of the link.

Hope I helped.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 05, 2005, 03:55:54 am
Ah thanks joker... originally while I was writing the mod, I was using ecart_sim.php as the file name.   I must have forgotten to rename that one in the instructions.

For those 20 or so who downloaded prior to today, here are the updated instructions: 



CHANGES in instructions (These are the full instructions for installing this mod as a button on the nav_bar:

In theme.php, (theme.inc.php for cpg1.4x) search for:

Quote
<td align="center" valign="middle" class="navmenu" width="48"><a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a> </td>
 

and insert just under that:

Quote
<td align="center" valign="middle" class="navmenu" width="48"> <a href="{ECART_TGT}" title="Availability"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="Availability"></a> </td> 

save your theme.php file (theme.inc.php).

(NOTE: This will display a second ecard.gif button on your nav bar with a popup that reads "Availability". You will probably want to edit your ecard.gif image and save it under a unique name and change the src="images/ecard.gif" line to reflect this change. Make this image stand out so that people will click on it out of curiosity.)

In displayimage.php, search for:

Quote
function html_img_nav_menu()


and insert the following below the "If" statements.

Quote
$ecart_tgt  = "ecart.php?album=&album&cat_link&pid=&pid&pos=&pos";


Next, look for:

Quote
'{ECARD_TITLE}' => $ecard_title, 


and insert just below that:

Quote
'{ECART_TITLE}' => $ecart_title,   


Save displayimage.php. That is it! Your ecart is now installed!


Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 06, 2005, 12:45:41 am
To All,

I've received a number of emails regarding this mod.  While I DO appreciate the interest in this mod,  please, do not email me with questions.  Rather, post your questions here where it will benefit everyone else. 


Yes, ecart.txt is for Coppermine 1.30,1.31,1.3.2,1.35,...,1.3x.
AND,
ecart cpg1.4x.txt  is for Coppermine 1.40,...,1.4x.

Thank you,

Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: joker on October 06, 2005, 12:01:22 pm
Is there a way you can implement an auto email script to email the file they requested after they have paid.  If so,  can you add the option to send the un-watermarked image?

joker
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 06, 2005, 12:27:02 pm
Is there a way you can implement an auto email script to email the file they requested after they have paid. If so, can you add the option to send the un-watermarked image?

joker

Actually there are methods to have email sent to you, you would have to add it to the submit portion of the button.  But you should receive one automatically from paypal anyway, which would make this redundant.

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 06, 2005, 12:28:01 pm
If you have a number of DIFFERENT items that require DIFFERENT pricing structures.. read this!!!
(The following set of instructions supercedes the instructions in the mod for addressing different pricing structures, it is easier, more efficient, and faster)

Using "if...else..." statements in this mod to set different price options.     

This feature is useful if you have a variety of products that have completely different prices. To use this feature, you must:
- have at least one "Custom fields for image description (leave blank if unused)" field available.  The example below allows for four (4) different pricing structures.   
- have installed the paypal mod as a button on the navbar.

1) This setup assumes that you are using the first custom field.  Assign a value for this field in your CONFIG setup.   For now use "Available Editions".   Save your configuration.  Next, Edit Description of  4 of your pictures.  Enter one of the following words into the "Available Editions" field for each:   panorama, square, standard, triangle

2) In the paypal mod (ecart.php), near the top, scroll to the bottom of this section.

               
Quote
// Get picture thumbnail url

And add the following lines:

Quote
   $set_item = $row['user1'];    // we will use this custom field variable to set our price options.

if ($set_item == panorama)  //custom field entry is "panorama"
{
    $bcharge = 120;    //base charge
    $acharge = 10;     //additional charge option 'a'
    $ccharge = 20;     //additional charge option 'b'
    $dcharge = 30;     //additional charge option 'c'
}
else
if ($set_item == square)   //custom field entry is "square"
{
    $bcharge = 140;
    $acharge = 15;     //additional charge option 'a'
    $ccharge = 25;     //additional charge option 'b'
    $dcharge = 35;     //additional charge option 'c'
}
else
if ($set_item == standard) //custom field entry is "standard"
{
    $bcharge = 130;
    $acharge = 22;     //additional charge option 'a'
    $ccharge = 27;     //additional charge option 'b'
    $dcharge = 37;     //additional charge option 'c'
}
else
{
    $bcharge = 110;    //sets default
    $acharge = 18;     //additional charge option 'a'
    $ccharge = 28;     //additional charge option 'b'
    $dcharge = 38;     //additional charge option 'c'
}



NEXT,
find this line:   
Quote
<b>Your cost: $110.00</b></p>

change  to:
Quote
<b>Your cost: $bcharge </b></p>



As you can see, we used the variable $bcharge that is assigned to whatever word we put in the custom field to set the base charge.  If you decide not to use a base charge in your paypal setup and use only the drop down lists, you can still use this variable in the various "<option value=" fields.

For example:

find this line:   
Quote
<option value="20.00">Bridging with Mambo ($20.00)</option>
change that to:
Quote
<option value="$ccharge">Bridging with Mambo ($ccharge)</option>

You can declare any number of variables and use them in the <option value= fields to customize your paypal mod.   Experiment and find the combinations that best suit your needs.
I think you will agree that this is by far the most versatile and easy to apply paypal mod for coppermine, ever.

Save your ecart.php file and test it out.

Dennis aka madeinhawaii
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: joker on October 06, 2005, 05:13:15 pm
Thanks for the tips.

I know paypal will email me.  I was wanting Coppermine + Paypal mod to email the purchased picture (without the watermark) after the purchase is final.

Also,  I moved my menu to the side of the Gallery Tables and the ecart is the only page that the tables are below the menu.
Ex. http://okinawanimages.com/ecart.php?album=3&pid=17&pos=

Is there any way to muve the whole maintable up?  It is using the starttable(); tag I believe.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Stramm on October 06, 2005, 05:35:33 pm
If I may interrupt... that there's some space between your header and the main area has nothing to do with starttable(). This function just creates a html table.
The problem is a <br> after your closing image table row tag. Cause it's not in between td and /td it's pushed to the top and causes the space
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 06, 2005, 08:07:21 pm
If I may interrupt... that there's some space between your header and the main area has nothing to do with starttable(). This function just creates a html table.
The problem is a <br> after your closing image table row tag. Cause it's not in between td and /td it's pushed to the top and causes the space

Thanks Stramm.   Interrupt at anytime!

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 06, 2005, 09:37:36 pm
I know paypal will email me.  I was wanting Coppermine + Paypal mod to email the purchased picture (without the watermark) after the purchase is final.


This sounds more like an htpassword/CGI type of process that I can't help you with.  You would need to regulate access using a password to a single file in your unwatermarked folder. I suppose there is a way you could create a response using paypal's response system to return to a thank you page on your site (same as the paypal page but stripped of the everything except the variable calls).  Where you use the variables to create a path for the user directly to the photo that was purchased, with a password to view the folder it is in.  You would need to change the password regularly as users will probably try different filenames in the url to see if they can get other freebies, especially if the filenames in your unwatermarked folder is the same as those in your gallery.  Sorry, this goes beyond what this mod was intended for and I can't help you more on this subject as my knowlege of cgi and htpassword as well as htaccess is severely limited.

Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Stramm on October 07, 2005, 08:48:26 am
do you know who that response system works? What variables can be passed... it's somehow interesting. I know similar system from cc systems but these pass just a username/ pwassword combination created from the biller. So it's not usable. But if the return pwd/ usr and the order ID, so that you can identify the user in the coppermine db .... ;) just a few lines of code and you have a neat system. Only problem is, that it's not that easy to setup cause users will have to deal with cpg, a paypal perl script, a mod and they have to setup all three... uhhh
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 07, 2005, 08:53:27 am
But if the return pwd/ usr and the order ID, so that you can identify the user in the coppermine db .... ;) just a few lines of code and you have a neat system. Only problem is, that it's not that easy to setup cause users will have to deal with cpg, a paypal perl script, a mod and they have to setup all three... uhhh

One more problem... even if you got that far, you would have to limit purchases to 'registered' users only. I suspect that would probably work against you if you are trying to sell things, unless you offered a substantial savings to registered users over unregistered ones.  That's like taking money out of your pocket because you don't want to keep an eye on your business.

Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Stramm on October 07, 2005, 10:21:25 am
That's not a problem at all (in my opinion) cause peaople are used to that. Where can you buy things online without the need to register? And it's good for every shopowner to have a huge buyers db ;) 
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 07, 2005, 10:50:56 am
That's not a problem at all (in my opinion) cause peaople are used to that. Where can you buy things online without the need to register? And it's good for every shopowner to have a huge buyers db ;) 

Hmmm... point taken.  I will consider it and see where and how a prompt to encourage users to register might fit in.  Since this mod is essentially an add-in rather than a hack, I suppose someone with code savy could even adopt it for standard ecommerce credit card handling without paypal and in such a case, it would be desireable to have people register their complete info as an option.  Maybe I'll save that for the client-side mod I've almost completed though, as that is where it would make more sense.

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: joker on October 07, 2005, 01:04:26 pm
So you guys get this info from http://www.paypaldev.org?

I was snooping around there today looking for help with this.
Would the IPG function be what I am trying to use?


V/R,
joker
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 07, 2005, 09:26:30 pm
Would the IPG function be what I am trying to use?
joker

IPG?  If you meant, IPN, yes.  In fact, the second to the last posting in http://www.paypaldev.org/topic.asp?TOPIC_ID=8752 might be a good place to start.

I don't know if you can extract the filename from what you get back from paypal, but if you can, you could setup a return URL with if else statements to include a number of passwords and paths for downloads.

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: jrv on October 12, 2005, 05:02:07 pm
This must be a silly question, buut WHERE do I download the code from?  I can't seem to find the link.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Casper on October 12, 2005, 05:52:44 pm
The bottom of the very first post in this thread, there are 2 attachments.  Just click on the one you want.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Joachim Müller on October 12, 2005, 07:29:53 pm
attached to the postings. Hover over the attachment names with your mouse, you'll notice that they're in fact download links.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Ifmracin on October 13, 2005, 05:38:43 am
Does anyone have this set-up where I can view a working version?
Just curious what it looks like in the intermediate view, etc.

Thanks
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 13, 2005, 10:14:09 am
Ifmracin,

All you have to do is download the file, rename it to ecart.php, and upload it to your coppermine installation folder.  Then open an ecard of any file you have and replace the "ecard.php" in your browser's URL address with "ecart.php" and you will have a working example on your own website to experiment and modify as you please. 

The only reason it's not on my site is that I'm working to complete the client-side version of this mod.  It will install the same way, with a couple of additional javascript files so upgrading will not be that difficult. But the mod on this thread will show you the potential of having your paypal mod on a separate page.

Joker on the previous page has a very stripped down version of the mod and a link to his example.

Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: Casper on October 14, 2005, 09:14:29 pm
Hi Dennis,

just had a go at the 1.4 mod, and found a couple of changes to the instructions are needed.

The instructions for;
Quote
function html_img_nav_menu()

Should be;
Code: [Select]
function theme_html_img_nav_menu()
The changes in 1.3 to displayimage.php are done in themes.inc.php in 1.4, this is not clear in the instructions.
The following changes;
Quote
$ecart_tgt = "ecart.php?album=&album&cat_link&pid=&pid&pos=&pos";

Should be;
Code: [Select]
$ecart_tgt = "ecart.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";
There should also be an extra line as here;
The insert;
Quote
'{ECART_TITLE}' => $ecart_title,

Should be insert;
Code: [Select]
'{ECART_TITLE}' => $ecart_title,
'{ECART_TGT}' =>  $ecart_tgt,
Note, this is probably needed in the 1.3 mod as well.

Then it all works fine. 


Very nice mod.


Hope this helps,
Casper
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 14, 2005, 09:41:55 pm
Casper,

Oh boy, I overlooked that too, huh?

Thanks,
Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: massive on October 17, 2005, 07:38:01 am
I've been working with the nifty new PayPal mod, and I'm loving it, except one thing... I upload a ton of photos, and can't be bothered to individually title each photo. Can I make my mod point to the filename instead of the title? it would make everything much slicker for me...

a link to my test gallery: www.massiveimageworks.com/ultimate (http://www.massiveimageworks.com/ultimate)


also, when I've tested my orders, I'm getting an item that says "Options: 0.00" in the Paypal shopping cart... where does that come from? it must be something I neglected to delete from the original php file, but I can't figure it out.

thanks.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 17, 2005, 09:30:03 am
1st things first.

You can add anything to the purchase description by adding it to this line that was at the top of the < form > block:     Use any of the declared variables at the top of the form.  $pic_url will give you the pictures URL.  $pic_id will give you the filename.

Quote
<input type="hidden" name="item_name" value="$pic_title Webmaster Package">
 

so what you probably want is:

Quote
<input type="hidden" name="item_name" value="$pic_title  $pic_url ">

Is there any particular reason why you want separate drop down lists for each item you are offering?  You could get away with just one dropdown list and it would probably work better as your customers wouldn't have to deselect options.   

Otherwise, If you still want to list them separately, I'd opt to use radio buttons instead.  I think I still have that code lying around somewhere.  I'll try to dig it out for you.

As for the 0.00 issue.  I don't see it anywhere.


For a single drop down list, try this:

Quote
<table>
                    <tr>
                       <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" name="cmd" value="_cart">

<!--paypal email-->         <input type="hidden" name="business" value="test@paypal.com">
<!--title-->             <input type="hidden" name="item_name" value="$pic_title $pic_url">
<!--currency code-->        <input type="hidden" name="currency_code" value="USD">
<!--base $ value-->            <input type="hidden" name="amount" value="">
<!--base $ value-->            <input type="hidden" name="baseamt" value="">



<!--Each paired set below represents 1 drop down list form, add more if you need more options.-->
                           <input type="hidden" name="on0" value="Base Price ">
                        <input type="hidden" name="os0" value="">
                            <br /><br />
                    </tr>
<!--START 1st Dropdown List Form -->
                    <tr>

To order using PayPal: select print sizes from the dropdown menus below. You will be redirected to PayPal.com to finish your order. You can change print quantities from your PayPal shopping cart. <br />
                        <select>
                           <option value=""select>  </option>
                       <option value="3.00">4"x6" - Printed on Canon postcard stock - $3.00</option>
                       <option value="2.00">4"x6" - Printed on Kodak Royal Glossy Paper - $2.00 </option>
                       <option value="6.00">5"x7" - Printed on Kodak Royal Glossy Paper - $6.00 </option>
                       <option value="10.00">8"x10" - Printed on Kodak Royal Glossy Paper - $10.00 </option>
                  </select>
                  <br /><br />
                    </tr>
<!--END 1st Dropdown List Form -->

<!--START Order Now process -->
                      <tr>
                          <td>   <input type="submit" value="Order Now!" border="0" name="Order Now!"
                                 onclick = "TallyIt (this.form);">
                             <input type="hidden" name="add" value="1">

                          </td>
                         </form>
<!--END Order Now process -->
<!-- START view cart Form -->
   <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="viewcart" name="viewcart">
      <input type="hidden" name="cmd" value="_cart" />
      <input type="hidden" name="display" value="1" />
      <input type="hidden" name="business" value="test@paypal.com" />
   </form>
                          <td align="top">
 <input type="submit" value="View Purchases" border="0" name="View Cart"
  onclick="document.forms.viewcart.target = 'paypal';
           document.forms.viewcart.submit ();
           return false;" />
                          </td>
                      </tr>
<!-- End of the viewcart FORM -->

                       <br /><br />
                </table>


TO USE RADIO buttons instead of a dropdown list it's a bit more complicated but you could try this.[/size][/size]

Replace the JavaScript section of the mod with

Quote
<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;
}

var amt,des,obj,val,op1a,op1b,op2a,op2b,itmn;

function ChkTok (obj1) {
var j,tok,ary=new Array ();       // where we parse
  ary = val.split (" ");          // break apart
  for (j=0; j<ary.length; j++) {  // look at all items
// first we do single character tokens...
    if (ary[j].length < 2) continue;
    tok = ary[j].substring (0,1); // first character
    val = ary[j].substring (1);   // get data
    if (tok == "@") amt = val * 1.0;
    if (tok == "+") amt = amt + val*1.0;
    if (tok == "%") amt = amt + (amt * val/100.0);
    if (tok == "#") {             // record item number
      if (obj1.item_number) obj1.item_number.value = val;
      ary[j] = "";                // zap this array element
    }
// Now we do 3-character tokens...
    if (ary[j].length < 4) continue;
    tok = ary[j].substring (0,3); // first 3 chars
    val = ary[j].substring (3);   // get data
    if (tok == "s1=") {           // value for shipping
      if (obj1.shipping)  obj1.shipping.value  = val;
      ary[j] = "";                // clear it out
    }
    if (tok == "s2=") {           // value for shipping2
      if (obj1.shipping2) obj1.shipping2.value = val;
      ary[j] = "";                // clear it out
    }
  }
  val = ary.join (" ");           // rebuild val with what's left
}

function StorVal () {
var tag;
  tag = obj.name.substring (obj.name.length-2);  // get flag
  if      (tag == "1a") op1a = op1a + " " + val;
  else if (tag == "1b") op1b = op1b + " " + val;
  else if (tag == "2a") op2a = op2a + " " + val;
  else if (tag == "2b") op2b = op2b + " " + val;
  else if (tag == "3i") itmn = itmn + " " + val;
  else if (des.length == 0) des = val;
  else des = des + ", " + val;
}

function ReadForm (obj1, tst) { // Read the user form
var i,j,pos;
  amt=0;des="";op1a="";op1b="";op2a="";op2b="";itmn="";
  if (obj1.baseamt) amt  = obj1.baseamt.value*1.0;  // base amount
  if (obj1.basedes) des  = obj1.basedes.value;  // base description
  if (obj1.baseon0) op1a = obj1.baseon0.value;  // base options
  if (obj1.baseos0) op1b = obj1.baseos0.value;
  if (obj1.baseon1) op2a = obj1.baseon1.value;
  if (obj1.baseos1) op2b = obj1.baseos1.value;
  if (obj1.baseitn) itmn = obj1.baseitn.value;
  for (i=0; i<obj1.length; i++) {     // run entire form
    obj = obj1.elements;           // a form element
    if (obj.type == "select-one") {   // just selects
      if (obj.name == "quantity" ||
          obj.name == "amount") continue;
      pos = obj.selectedIndex;        // which option selected
      val = obj.options[pos].value;   // selected value
      ChkTok (obj1);                  // check for any specials

      if (obj.name == "on0" ||        // let this go where it wants
          obj.name == "os0" ||
          obj.name == "on1" ||
          obj.name == "os1") continue;

      StorVal ();

    } else
    if (obj.type == "checkbox" ||     // just get checkboxex
        obj.type == "radio") {        //  and radios
      if (obj.checked) {
        val = obj.value;              // the value of the selection
        ChkTok (obj1);
        StorVal ();
      }
    } else
    if (obj.type == "select-multiple") {  //one or more
      for (j=0; j<obj.options.length; j++) {  // run all options
        if (obj.options[j].selected) {
          val = obj.options[j].value; // selected value (default)
          ChkTok (obj1);
          StorVal ();
        }
      }
    } else
    if ((obj.type == "text" ||        // just read text,
         obj.type == "textarea") &&
         obj.name != "tot" &&         //  but not from here
         obj.name != "quantity") {
      val = obj.value;                // get the data
      if (val == "" && tst) {         // force an entry
        alert ("Enter data for " + obj.name);
        return false;
      }
      StorVal ();
    }
  }
// Now summarize stuff we just processed, above
  if (op1a.length > 0) obj1.on0.value = op1a;
  if (op1b.length > 0) obj1.os0.value = op1b;
  if (op2a.length > 0) obj1.on1.value = op2a;
  if (op2b.length > 0) obj1.os1.value = op2b;
  if (itmn.length > 0) obj1.item_number.value = itmn;
  obj1.item_name.value = des;
  obj1.amount.value = Dollar (amt);
  if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
function TallyIt (obj1) {  // process un-named selects
            var i,obj,pos,tot=0,txt="";
              for (i=0; i<obj1.length; i++) {     // run entire form
             obj = obj1.elements;           // a form element
             if (obj.type == "select-one" &&   // what sort is it
              obj.name == "") {             // must be un-named
               pos = obj.selectedIndex;        // which option selected
               tot = tot + obj.options[pos].value*1.00;    // price mod
               txt = txt + " +" + obj.options[pos].text;  // and text
                   }
              }
              obj1.os0.value = obj1.baseamt.value;
              obj1.amount.value = Dollar ( tot + amt);
              obj1.os1.value = txt;
            }
//-->
</script>

Then replace the table that the entire < form > block is in  with:
Quote
<table width="100%" align="center">
                    <tr columnspan ="2">
                        <form action="https://www.paypal.com/cgi-bin/webscr" method="post"
onsubmit="this.target = 'paypal';
          return ReadForm(this, true);">
<p>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="james_mckenzie@mac.com" />
<input type="hidden" name="item_name" value="" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="baseamt" value="" />
<input type="hidden" name="basedes" value="" />
<input type="hidden" name="baseon0" value="" />
<input type="hidden" name="baseos0" value="" />
<input type="hidden" name="baseon1" value="" />
<input type="hidden" name="baseos1" value="" />
<input type="hidden" name="baseitn" value="" />
<input type="hidden" name="item_number" value="" />


                              <br /><br />

<!--//START Radio Buttons-->
   <br />

<input type     = "radio"
       value    = "4x6 of $pic_url (Printed on Canon Postcard Stock)  +3.00"
       onclick  = "ReadForm (this.form, false);"
       name     = "rad" />&nbsp; 4" x &nbsp; 6" - Printed on Canon postcard stock&nbsp;&nbsp;&nbsp;&nbsp;   - &nbsp;$3.00.
<br/> <br/>

<input type     = "radio"
       value    = "4x6 of $pic_url  (Printed on Kodak Royal Glossy Paper) +2.00"
       onclick  = "ReadForm (this.form, false);"
       name     = "rad" />&nbsp; 4" x &nbsp; 6" - Printed on Kodak Royal Glossy Paper - &nbsp;$2.00.
<br/> <br/>

<input type     = "radio"
       value    = "5x7 of $pic_url   (Printed on Kodak Royal Glossy Paper) +6.00"
       onclick  = "ReadForm (this.form, false);"
       name     = "rad" />&nbsp; 5" x &nbsp; 7" - Printed on Kodak Royal Glossy Paper - &nbsp;$6.00.
<br/> <br/>

<input type     = "radio"
       value    = "8x10 of $pic_url (Printed on Kodak Royal Glossy Paper) +10.00"
       onclick  = "ReadForm (this.form, false);"
       name     = "rad" />&nbsp; 8" x 10" - Printed on Kodak Royal Glossy Paper - $10.00.

       <br/>
<!--//START Radio Buttons-->


<!--//START Order Now process -->
                      <tr>
                          <td>

                                <input type="submit" value="Order Now!" border="0" name="Order Now!"
                                 onclick = "TallyIt (this.form);">
                             <input type="hidden" name="add" value="1">
                                 &nbsp;

                        <input type    = "button" value   = "Reset Form"
                                onclick = "this.form.reset ();" />


                          </td>
                       </form>
<!--//END Order Now process -->
<!-- //START view cart Form -->
   <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="viewcart" name="viewcart">
      <input type="hidden" name="cmd" value="_cart" />
      <input type="hidden" name="display" value="1" />
      <input type="hidden" name="business" value="test@paypal.com" />
   </form>
                          <td align="top">
 <input type="submit" value="View Purchases" border="0" name="View Cart"
  onclick="document.forms.viewcart.target = 'paypal';
           document.forms.viewcart.submit ();
           return false;" />
                          </td>
                      </tr>   </FONT>
<!-- //End of the viewcart FORM -->

                       <br /><br />
                </table>


Dennis

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: massive on October 17, 2005, 05:08:21 pm
thanks for the filename help for sure... an easy fix, as it turns out...

the reason I've kept dropdowns for all the options is in case someone wants to buy, say, an 8"x10" AND a 4"x6" of the same photo. I couldn't figure out a more graceful way to do that... If I use radio buttons, can't I only have one selected at a time?

ooh... actually, I bet a checkbox would work perfectly. They can select more than one option at a time, and it's easy to uncheck... I'll play with that...

Finally, with the "Options: 0.00" business... I'm attaching a screenshot of a paypal window that shows it... it appears to be related to this:
Code: [Select]
<!--base $ value-->     <input type="hidden" name="baseamt" value="0.00">If I blast the whole line, paypal gives me an error that says "please select a value greater than zero." If I just remove the "0.00" part, the "Options: 0.00" turns to "Options: " on the paypal page. I must be telling paypal that I'm going to use another set of variables that I'm not actually using...

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.massiveimageworks.com%2Fultimate%2Fscreen.jpg&hash=9e2a955c679fcf8a6977c0888838832495dc1c83)

It's not a huge deal, I just think it's a little messy to have the extra stuff up there... Also, can I change the way it displays the options below the blank one? For instance, can I get rid of all those + signs? thanks again.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 17, 2005, 07:42:19 pm
Massive,

See the difference in  the example I posted to you?

Quote
<input type="hidden" name="baseamt" value="">

Just leave the value null. "" <--nothing between the quotes.

If you go with checkboxes, you must use the jscript I posted in the previous message.  In fact, you can even use the same radio code, just change where it says "radio" to "checkbox'  and delete the "name = "rad"/> part of the last line in each radio button block.


Oh yeah, insofar as the "+" signs go, you can change this line in the jscript section:
Quote
txt = txt + " +" + obj.options[pos].text;
to
Quote
txt = txt + "&nbsp;" + obj.options[pos].text;
   
-try &nbsp; if that shows up, just replace with a space OR  Alt+Ctrl + 0160.

as for the words Options:
Those come from this section:
Quote
<!--Each paired set below represents 1 drop down list form, add more if you need more options.-->
                           <input type="hidden" name="on0" value="Base Price ">
                        <input type="hidden" name="os0" value="">
                        <input type="hidden" name="on1" value="Options">
                        <input type="hidden" name="os1" value="">
                        <input type="hidden" name="on2" value="Options">
                        <input type="hidden" name="os2" value="">
Just remove the word: "Options"

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: massive on October 18, 2005, 02:43:02 am
with a couple of hours of tweaking, I got the checkboxes to work just how I want 'em... Thanks for all the help... stop by the site sometime if you're curious how it turned out... http://www.massiveimageworks.com/ultimate

~massive
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 18, 2005, 04:18:42 am
Massive,

Looks great! I really like the custom button you created for the mod as well. Inobtrusive but just enough to catch your eye.  I see you also added a bit more information to the order info.

One note, however, I'm not sure that one has to be a registered member of paypal to send money over paypal.  I believe, you only need to register if you want the convenience of using paypal regularly.

You might also want to  add a note about shipping and handling, if any, and have paypal tack it on.  If paypal takes 35 cents, and your stamp and envelope costs another 50 cents, it won't leave you much on your smaller offerings.

Cheers,

Dennis




Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: kkevin on October 21, 2005, 12:58:36 am
What would be the best way to handle S&H charges.  Having paypal tack it on was mentioned.  Can that only be done with one price or a price based upon quantity?

Thanks, Kevin
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on October 21, 2005, 01:07:24 am
I believe paypal has a number of options based on dollar, quantity or weight. I think they also provide options for USPS, UPS, FedEx, etc.  You will have to check with paypal on that.

I just use a percentage myself, as many of my items exceed the height and width restrictions of most carriers and these items have to be shipped starting at the 15lb minimum even though they only weigh 4 - 5 lbs.


Dennis

Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: zac on November 07, 2005, 09:14:04 am
Thanks for  this.. I am eager to get it working.   However I am having difficulties...

I get a 404 The requested URL /cards/{ECART_TGT} was not found on this server


If I put in the URL

http://...  /coppermine/ecart.php

It says The selected album/file does not exist !

Where did I go wrong?  IS there more editing I need to do in the ecart.php?  I just did the edits in the theme and displayimage as you described.  Thanks for any help with this.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on November 07, 2005, 09:47:54 am
Zac,

Looks like you missed the last step in displayimage.php install notes.  What version of the cart did you download? And what version of Coppermine are you running?

Does it display when you run the test? (changing the url of a ecard page)

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: zac on November 07, 2005, 10:26:22 am

 I downloaded the version at the very beginning of this post - the one for coppermine 1.3.5 which I am running.

Nope.. it doesnt display when I run the test... thats when I get the "The selected album/file does not exist ! "
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on November 07, 2005, 10:44:18 am
When you run the test, you first need to open an ecard page.

Your url should look similar to :

http://mydomain.com/cpg135/ecard.php?album=14&pid=215&pos=2

You would change that to:

http://mydomain.com/cpg135/ecart.php?album=14&pid=215&pos=2

And it should display the paypal mod with your pic at the top.  The

" ?album=14&pid=215&pos=2 "  portion of the url must remain the same.

Dennis
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: zac on November 07, 2005, 08:51:46 pm
ahh thanks... i got it running and read the rest of the directions.... it is a little more complicated than i had hoped.

 i need to add a price list for a large batch of images.  i am going to try and dig up Casper's old hack that did that.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on November 12, 2005, 10:17:44 am
NEW!  UPDATED! 11-11-2005.
1-of-3 Mods[/color]


- Now with a simpler if..else routine to handle different pricing structures for different items in your gallery. 
 
- Removed the baseprice in favor or using the dropdown list for base price options.
- JavaScript now supports the use of Radio buttons and checked boxes for added services.
- A 2nd, 3rd, 4th, and 5th dropdown list has been included in the form for additional options.
- New mod is based on displayimage.php rather than ecard.php and therefore provides a
  much improved theme consistency when using custom themes or less well-behaving themes.
- Three ways to install.  Easier than ever.  Choose 1, 2, or all three ways.



 Please be sure to download the version that is appropriate to your cpg version.



To test this cart, simply download the attached zip file. Expand it, and save options.php to your Coppermine root directory. Save the ecart1.gif file to your coppermine/images and your theme's images folder.

Open your browser to an intermediate image page and replace the "displayimage.php"  in the URL of your browser with orders.php (leaving the rest of the URL intact). Click 'enter' or 'go'.   That's it.

This is a theme consistent, single order, server-side, paypal cart form that opens from a button in the nav bar above the intermediate view, or below the intermediate view image caption, or from links in the info fields below the intermediate view. It offers the admin a very professional looking paypal interface that displays the image (anysize) and all purchase options. It can be customized like any other php/html page with any additional information about the image or product you deem important.
 
Additional drop down lists can be easily added to increase your options and offerings.

In essense you have 6 to the nth power of options = unlimited.   You can also customize the page to include as much information about your services as you want - Guarantees, disclaimers, etc.

If you have a number of uniquely different items that call for different price options, you can use the simple if ... else... routine to change the pricing options automatically and create as many different pricing structures as your site requires.  You will need to reserve one "Custom fields for image description" field for this option.   

Permanent installation requires that you follow the steps outlined in the Simple_Server-Side_Paypal_Instructions.htm  file that is included in this package. 

Quote
ADDENDUM:  IF you wish to send the purchase to a paypal page in a language OTHER than ENGLISH you must add the following:

Search for:    <!--//Start <Form> Block for purchase options -->   
Scroll to:       <input type="hidden" name="currency_code" value="$currency_code" />   
Add below:   <input type="hidden" name="lc" value="US">


Where "US" should be replaced with your country's ID.

I believe that you will find this to be the least invasive, easiest to install, yet most versatile paypal mod for coppermine, yet.

Dennis

(Updated with new installation and modifications instructions, the code has changed considerably and much more detail has been put into the installation and modifications instructions. ) 

In each of the two posts that follow this one, you will find an even easier to install paypal mod for admins who have very simple needs insofar as price options are concerned.  The choice is yours.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: artistsinhawaii on November 13, 2005, 08:58:58 am
NEW! EXTREMELY SIMPLE TO INSTALL PAYPAL MOD
2-of-3 Mods
[/size][/color][/b]

-This mod is different from the previous post and is ideal for those who have very, very simple paypal needs and do not mind turning off the display of the picture information block below the intermediate picture by default. Users will still be able to view the information by clicking on the INFO button in the navbar. It just won't display by default so that your users can see your purchase options readily.

Installation requires that you replace your displayimage.php with the one attached. That's it!

Modifying and changing values has been simplified. Full instructions are also attached.

This Mod features:

- a simpler if..else routine to handle different pricing structures for different items in your gallery. 
- javascript now supports the use of Radio buttons and checked boxes for added services.
- A 2nd dropdown list has been included in the form for additional options.
- Additional dropdown lists can be added and a set of checked boxes, as well.
- New mod replaces displayimage.php and therefore provides a a theme consistent paypal mod. (Be sure to backup your existing displayimage.php before replacing it with this mod.)
 
Please be sure to download the version that is appropriate to your cpg version.. 

Without a doubt, this is the easiest to install paypal mod for coppermine, ever.

Dennis

Quote
ADDENDUM:  IF you wish to send the purchase to a paypal page in a language OTHER than ENGLISH you must add the following:

Search for:    <!--//Start <Form> Block for purchase options -->   
Scroll to:       <input type="hidden" name="currency_code" value="$currency_code" />   
Add below:   <input type="hidden" name="lc" value="US">


Where "US" should be replaced with your country's ID.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 14, 2005, 10:44:26 pm
Very Simple Paypal Mod for sellers of posters, pictures, or other items where each item has only ONE (1) price. Each item, however, can be a different price.
3-of-3 mods

This is for the marketing of  individual items where each item displayed has a single, unique price. (i.e. posters, cd's, lps, collectible prints, auto parts, etc.) This mod will read the item's title, file name and custom image description fields to set product description, price, etc. Price will need to be put into one of the description fields for this mod to work.  There are  no drop-down lists, just a  "place order" and a view cart buttons.  (Dropdown lists, radio buttons, and checkboxes are supported, however.  You will have to add these yourself, if you need them.  See the two previous post's mods to learn how, if necessary.)

By default, and you should set it up this way to start. You can always modify it later.

For your Custom Image Description fields:
Set these in CONFIG to:


Next select a picture and edit the file information as follows:

Also add a title and caption to the picture.

                       
Download the appropriate zip file for your CPG version. Backup your displayimage.php file.
Unzip, and copy the displayimage.php file into your Coppermine root directory.

That's it.  (Detailed instructions on making changes are included in the zip file)

Dennis


Quote
ADDENDUM:  IF you wish to send the purchase to a paypal page in a language OTHER than ENGLISH you must add the following:

Search for:    <!--//Start <Form> Block for purchase options -->   
Scroll to:       <input type="hidden" name="currency_code" value="$currency_code" />   
Add below:   <input type="hidden" name="lc" value="US">


Where "US" should be replaced with your country's ID.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on November 16, 2005, 01:15:09 pm
Thanx for that mod it's just Great!

Just a small question, would it be possible to add a Radio button I accept the terms and condition before "place the order?

Thanx
Philip
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 16, 2005, 07:23:32 pm
Just a small question, would it be possible to add a Radio button I accept the terms and condition before "place the order?

What you probably want is a checkbox.  You should be able to simply add one in. Copy the following block just below the end of the last dropdown list.

Quote
<!--//START Agree to terms-->
           <FONT size="2"><b>4. Terms and Conditions</b></font>
            <blockquote>                                                          <!--//paypal values        //what user sees -->
             <INPUT onclick="ReadForm (this.form, false);" type=CHECKBOX Checked  value=   "I agree to all terms and conditions"   name=r1> I agree to all terms and conditions
              </blockquote>
<!--//END Agree to terms-->

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: artistsinhawaii on November 17, 2005, 09:54:44 am
Added security feature for the paypal mods on this thread.

Search for:
Quote
// Set paypal ID and currency type

Replace the  $paypal_ID = youremail@whatever.com line with the following code.
Quote
    if ($paypal_id  == "") {
        $at1 = "@";    // the sum of these parts make up your paypal email address
        $dot = ".";
        $typ = "com";
        $id1 = "made";    // real id1  (change here)
        $id2 = "inhawaii";    // real id2  (change here)
        $url = "compuserve";       // real URL (change here)
        $paypal_id = $id1 + $id2 + $at1 + $url + $dot + $typ; //<-formula to put it together
    }

The above gets concatenated to made+inhawaii+@+compuserve+.+com or madeinhawaii@compuserve.com .   

Replace the "made", "inhawaii", and "compuserve" with bits from your own email address.

What this does:   It prevents those nasty spambots, email gathering robots, from getting your paypal address. 

Also see my other post for a javascript that does the same for your "contact us" email addresses at:

http://forum.coppermine-gallery.net/index.php?topic=23766.msg109193#msg109193   

Dennis 

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on November 19, 2005, 04:55:41 pm
Is there a way to set different paypal accounts?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 19, 2005, 05:46:52 pm
Is there a way to set different paypal accounts?

netfalls,

I'm not quite sure what you mean by that.  Could you elaborate a bit?

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on November 19, 2005, 06:49:33 pm
I'm working on a website with 6 other photographers. It would be usefull if each photographer could set he's own Paypal account.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 19, 2005, 07:43:46 pm
I'm working on a website with 6 other photographers. It would be usefull if each photographer could set he's own Paypal account.

Hmmm...interesting.  I see no reason why it can't be done.

You would simply have to add $owner =  $row['owner_id'];   to the list of variables defined in the paypal mod section of your displayimage.php or orders.php file (depending one which version of the mod you are using).   

Then, in the // Set paypal ID and currency type section replace     $paypal_ID = "yourpaypalIDi@whatever.com"; with

if ($owner == uploader1)
{$paypal_ID = uploader1's_ID@whatever.com;}
else
if ($owner == uploader2)
{$paypal_ID = uploader2's_ID@whereeverelse.com;}
else
if ($owner == uploader3)
{$paypal_ID = uploader3's_ID@someotherjoint.com;}
etc...
else
{$paypal_ID = modcreator's_ID@my_email.com;}  //default ID use mine if you can't think of one


where uploader1,2,3  are the actual owner_id names in your database and uploader's1,2,3_ID are the actual paypal ID's of these owners.

OR do this in the else  {  } blocks to mask your paypal IDs from spambots.
Quote
{
        $at1 = "@";    // the sum of these parts make up your paypal email address
        $dot = ".";
        $typ = "com";
        $id1 = "made";    // real id1  (change here)
        $id2 = "inhawaii";    // real id2  (change here)
        $url = "compuserve";       // real URL (change here)
        $paypal_id = $id1 + $id2 + $at1 + $url + $dot + $typ; //<-formula to put it together
    }

If the user is one of those listed in the if/else routine, it would swap out the $paypal_ID.  You won't be able to mask these ID's with the security feature, however, unless you build your own routines for each instance as shown above.

Also note, these owners must never change their login name. Just their passwords.


Dennis
PS... when are you going to translate the mod into French and upload it in the French support forum? hmmm?  ;)

HMMM... as an afterthought, you could put my ID there in the default line. That way, if you make a boo-boo, I could reap the rewards. Fair enough punishment, huh?

Hmmm HMMM... as an after-afterthought.  You could apply the same routine to the dropdown list values section so that each user could have their own set of prices.

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on November 19, 2005, 08:53:53 pm
First thanx for the code I'll try it.

A French version..... That's not a bad idea, even if I have no use for it. I'll work on it next week.

For you email in the default... I'll think about it :-)
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 19, 2005, 09:00:06 pm
First thanx for the code I'll try it.

A French version..... That's not a bad idea, even if I have no use for it. I'll work on it next week.

For you email in the default... I'll think about it :-)

Think about it??  What's there to think about.  Just for that I won't point out the error I made in the code above.   ;D

Dennis
(Of course you could just scroll back up and see where I made changes.)
...boom boom boom boom.. ya gotta work for your money..  work for your money...
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: wjsparky on November 22, 2005, 01:04:58 am
Hi,

I've managed to download the 1.3x attachments for mods 2 and 3 however when I try to download mod 1 of 3, despite already being logged in it just refers me to a log in page.

Thanks

Axon

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 22, 2005, 03:12:14 am
Hi,I've managed to download the 1.3x attachments for mods 2 and 3 however when I try to download mod 1 of 3, despite already being logged in it just refers me to a log in page.
Axon

Axon,

Try again.  The server here was having some difficulties earlier. It seems to be working now.  Hope your realize that all three are different renditions of the same mod?

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: wjsparky on November 23, 2005, 08:41:01 am
Hi Dennis,

Yeah I noticed the server difficulties but I don't think it is related to that as it is still giving the same problem. Basically despite being logged in when I click on that particular link (mod 1 of 3 - 1.3x) it keeps refering me to a login screen. All of the other attachement links work fine.

No problem though I will download one of the other ones and use that.

Cheers

Axon
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: strat76 on November 28, 2005, 10:10:12 pm
Hi Dennis,

Yeah I noticed the server difficulties but I don't think it is related to that as it is still giving the same problem. Basically despite being logged in when I click on that particular link (mod 1 of 3 - 1.3x) it keeps refering me to a login screen. All of the other attachement links work fine.

No problem though I will download one of the other ones and use that.

Cheers

Axon

I too am having this problem .. i need mod one.. and keeps asking to login
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on November 28, 2005, 10:41:39 pm
use another browser
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: JudyW on November 29, 2005, 03:45:53 am
I'm always logged in to the forums.  When I click the "Simple ecart for cpg 1.3x.zip" I get a new screen saying I'm not allowed to download, please login.  So I login, same thing.

How can I download the file?

JudyW
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Tranz on November 29, 2005, 04:34:57 am
Try using another browser.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: JudyW on November 29, 2005, 04:56:55 am
Try using another browser.

I don't understand why that would make a difference.  I was able to download other files from the Coppermine forums with no problems.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Tranz on November 29, 2005, 05:07:44 am
That's been the advice given to people who can't download and it has appeared to work. If not, then let us know.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 29, 2005, 05:16:48 am
I don't understand why that would make a difference.  I was able to download other files from the Coppermine forums with no problems.

I'm really confused, too.  I have no problem with either of the downloads.  With IE, Firefox, or  Opera.   Try these below:

 Link for Simple ecart for cpg 1.3x (http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=22357.0;id=1929)

Link for Simple ecart for cpg 1.4x (http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=22357.0;id=1930)


Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: JudyW on November 29, 2005, 05:35:45 am
I'm using Firefox.  I can download the Simple ecart for cpg 1.4x.  When I click on the 1.3x version I get a new window where I become a Guest and it asks for login information.  After filling out the login info, I venture back to the download and the same thing happens.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 29, 2005, 05:50:54 am
Judy,

I re-attached the 1.3 file to the bottom of the post above.  Will you give that one a try?

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: JudyW on November 29, 2005, 06:33:46 am
YEAH!!!!

Thanks Dennis, I was able to download the bottom link.  Too late to do anything more.  Will get an early start tomorrow.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on November 29, 2005, 09:12:05 am
the issue with people using IE being randomly thrown back to the login screen when they try to download an attachment is a known issue with the bbs app we use, it's related to the way IE handles headers. I haven't heard of a fix. As this only seems to happen in IE,our only possible recomendation is to use another browser but IE. After all, IE sucks anyway. Use Firefox.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: JudyW on November 30, 2005, 03:21:45 am
Dennis,

Thank you for this Paypal Mod.  I'm a photographer, but I do more way more computer stuff than I would like.  You'll never know how much I appreciate the ease of installation and the clarity of your directions.  It was the easiest part of re-designing my web site so far.

Thank you, thank you, thank you!

JudyW
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on November 30, 2005, 03:27:20 am
Judy,

Awww, thanks, I really appreciated that.  Hope to see you list your site here when it's done.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 09, 2005, 04:34:29 pm
Hi,

How can I setup several languages for the Purchase with confidence part?

I know I have to edit the language file and but I do not know how to extract the text in the orders.php

Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 10, 2005, 08:04:10 pm
@netfalls

Actually there is an easier way.  Since the entire paypal file is in php, you can use a simple if/else routine to decide what language certain text will appear in.  Just under your last if/else statement in orders.php.

Use the form:  (You can add all the <tr>s and <td>s as necessary to complete the block or create separate if/else statements for each block of text and just replace each text section using a different defined variable.  The defined variable in the example below is $quote.)

Quote
if ($USER['lang'] == 'german') {$quote = "
   Willkommen <br /><br />
   Add what text you want in German.
   "}
elseif ($USER['lang'] == 'spanish') {$quote =  "
   Bienvenido<br /><br />
   Add what text you want in Spanish.
  "}
else {$quote = "
   Welcome<br /><br />
   add what text you want in English.
"}

Then replace the "Buy with Confidence" section with your newly defined variable '$quote'.    Just becareful not to use (") in the text section if you use (") to embrace the entire block.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 11, 2005, 12:26:02 pm
Thanx, I tried but couldn't find where to place the code you gave me :-(
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 11, 2005, 07:01:22 pm
Netfalls,

Try placing the if/else routine right above: 
Quote
Print <<<EOT 


Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 12, 2005, 09:30:52 am
Hello,

I tried it but where ever I place it I get some error.
Can you tell me between witch lines I have to place it (based on the original ordes.php file)
Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Tranz on December 12, 2005, 09:36:40 am
What is the error? Are you using a WYSIWYG editor or a regular text editor?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 12, 2005, 09:50:02 am
I'm using Dreamweaver 8
I always get something like this
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on December 12, 2005, 09:58:47 am
as Thu suggested: don't use a WYSIWYG editor like Dreamweaver unless you really, relayy know your way around. Use a plain text editor instead (notepad.exe is fine).
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 12, 2005, 06:31:58 pm
The multi lang still doesn't work...

Another question

How do I insert that code? It doesn't allow the user to order before the terms and conditions acceptation


Code: [Select]
      <SCRIPT language=JavaScript type=text/javascript><!--
function agreesubmit(el)
{
document.creator.regSubmit.disabled = !el.checked;
}
function defaultagree()
{
if (!document.creator.regagree.checked)
{
alert("Please read/accept terms to submit form.");
return false;
}
return true;
}
// --></SCRIPT>

      <FORM name=creator onSubmit="return defaultagree();"
      action=https://www.paypal.com/cgi-bin/webscr
      method=post>
        <TABLE class=tborder style="BORDER-TOP-WIDTH: 0px" cellSpacing=0
      cellPadding=5 width="100%" align=center border=0>
        <TBODY>
        <TR>
          <TD class=windowbg2
            style="PADDING-BOTTOM: 8px; PADDING-TOP: 8px">&nbsp;</TD>
        </TR>
        <TR>
          <TD class=windowbg2 align=middle><LABEL for=regagree><INPUT
            class=check id=regagree onclick=agreesubmit(this); type=checkbox
            name=regagree> <B>I Agree</B></LABEL> </TD></TR></TBODY></TABLE><BR>
      <DIV align=center><INPUT type=submit value=Register name=regSubmit>
      </DIV></FORM>
      <SCRIPT language=JavaScript type=text/javascript>
document.creator.regagree.checked = false;
document.creator.regSubmit.disabled = true;
</SCRIPT>
Title: Trouble adding more than ten different prices to PayPal Mod
Post by: tgontz on December 14, 2005, 01:10:43 am
I am having trouble customizing the pricing options with this PayPal mod. The problem is that I would like to have 16 different prices, but only ten of them show up.

This is what my modified section from the orders.php file looks like:


// third option or "Standards and empty fields"
if ($pricing_setup=="Standards"||$pricing_setup=="standards"||$user1=="")
   {
   $Option1    = " 4\" x 6\" Print Only @5.00 USD ";
   $Desc1      = " 4\" x 6\" Print Only - $5.00 USD ";
   $Option2    = " 4\" x 6\" Print with 5\" x 7\" Matte @10.00 USD ";
   $Desc2      = " 4\" x 6\" Print with 5\" x 7\" Matte - $10.00 USD ";
   $Option3    = " 5\" x 7\" Print Only @12.50 USD ";
   $Desc3      = " 5\" x 7\" Print Only - $12.50 USD ";
   $Option4    = " 5\" x 7\" Print with 8\" x 10\" Matte @18.50 USD ";
   $Desc4      = " 5\" x 7\" Print with 8\" x 10\" Matte - $18.50 USD ";
   $Option5    = " 8\" x 10\" Print Only @16.00 USD ";
   $Desc5      = " 8\" x 10\" Print Only - $16.00 USD ";
   $Option6    = " 8\" x 10\" Print with 11\" x 14\" Matte @24.00 USD ";
   $Desc6      = " 8\" x 10\" Print with 11\" x 14\" Matte - $24.00 USD ";
   $Option7    = " 8\" x 12\" Print Only @16.00 USD ";
   $Desc7      = " 8\" x 12\" Print Only - $16.00 USD ";
   $Option8    = " 8\" x 12\" Print with 11\" x 14\" Matte @24.00 USD ";
   $Desc8      = " 8\" x 12\" Print with 11\" x 14\" Matte - $24.00 USD ";
   $Option9    = " 11\" x 14\" Print Only @23.00 USD ";
   $Desc9      = " 11\" x 14\" Print Only - $23.00 USD ";
   $Option10   = " 11\" x 14\" Print with 16\" x 20\" Matte @32.00 USD ";
   $Desc10     = " 11\" x 14\" Print with 16\" x 20\" Matte - $32.00 USD ";
   $Option11   = " 12\" x 18\" Print Only @32.00 USD ";
   $Desc11     = " 12\" x 18\" Print Only - $32.00 USD ";
   $Option12   = " 12\" x 18\" Print with 18\" x 24\" Matte @40.00 USD ";
   $Desc12     = " 12\" x 18\" Print with 18\" x 24\" Matte - $40.00 USD ";
   $Option13   = " 16\" x 20\" Print Only @39.00 USD ";
   $Desc13     = " 16\" x 20\" Print Only - $39.00 USD ";
   $Option14   = " 16\" x 20\" Print with 20\" x 24\" Matte @46.00 USD ";
   $Desc14     = " 16\" x 20\" Print with 16\" x 224\" Matte - $46.00 USD ";
   $Option15   = " 20\" x 30\" Print Only @45.00 USD ";
   $Desc15     = " 20\" x 30\" Print Only - $45.00 USD ";
   $Option16   = " 8 Wallets @8.00 USD ";
   $Desc16     = " 8 Wallets - $8.00 USD ";
 }
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 14, 2005, 05:18:18 am
@tqonz.

The basic setup is for 10 entries to be displayed.  To display more, you have to add more.

Look in the < FORM > section for the dropdown list that is supposed to display the 16 choices.  It should have lines that look like:

Quote
              <SELECT onchange="ReadForm (this.form, false);">
                    <OPTION value='$Option1'>        $Desc1</OPTION>


Add 11 - 16 using the same pattern. 


Dennis


@netfalls,

I'm still searching for an answer for your question.  So far, I can do it on a client-side setup, but not on a server-side setup.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 14, 2005, 10:43:46 am
@netfalls,

Boy, did I wrestle with this one.  Like you, I explored all the more common ways to try to get this to work.  Then it dawned on me that the approach was all wrong.  Here's a simpler method.


To add an agreement checkbox that must be ticked before an order can be processed carry out the following changes:

In the JavaScript area for the paypal mod add this function:

Quote
function Validate()
{
    if (document.paypalform.chkbx.checked)
        return true;
    alert('You must agree to all terms and conditions before submitting this form');
    return false;
}

Then just below the end of the script,  at the start of the paypal <FORM> , change the <form ... > heading to:


Quote
<form name="paypalform" action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="return Validate()" > 

Next, replace your checkbox entry with this:
Quote
   
<div align="center">
        <input type="checkbox" name="chkbx" value= "I agree to all terms and conditions"> I agree with all terms and conditions.
            <br /><br />
</div>

Only the ( name="chkbx" ) must be preserved, the value="string" and displayed text that follows can be altered.

Finally, replace the purchase button with:

Quote
               
<td >
          <input type="submit" value="Place Order" border="0" name="Place Order"
                           onclick =  "return ReadForm(paypalform, true);
                                            this.target = 'paypal'; " >
            <input type="hidden" name="add" value="1">
              &nbsp;
</td>

The ( value="Place Order" ) and ( name="Place Order" ) can be changed to suit your needs.



That should do it.

Dennis

(PS.. regarding the language if/else block.  Didn't you create an if/else block for different users?  You should be able to put the if/else for the language just below that block.  )
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 14, 2005, 04:16:01 pm
Thanx a lot it works great.

For the languages IMO it would be better to place them in the language file.
This would allow to adapt the options in several languages as well.

Anyway I'll try again with what you gave me.

Thanx
Title: Re: Trouble adding more than ten different prices to PayPal Mod
Post by: tgontz on December 14, 2005, 06:51:10 pm
I am having trouble customizing the pricing options with this PayPal mod. The problem is that I would like to have 16 different prices, but only ten of them show up.

This is what my modified section from the orders.php file looks like:


// third option or "Standards and empty fields"
if ($pricing_setup=="Standards"||$pricing_setup=="standards"||$user1=="")
   {
   $Option1    = " 4\" x 6\" Print Only @5.00 USD ";
   $Desc1      = " 4\" x 6\" Print Only - $5.00 USD ";
   $Option2    = " 4\" x 6\" Print with 5\" x 7\" Matte @10.00 USD ";
   $Desc2      = " 4\" x 6\" Print with 5\" x 7\" Matte - $10.00 USD ";
   $Option3    = " 5\" x 7\" Print Only @12.50 USD ";
   $Desc3      = " 5\" x 7\" Print Only - $12.50 USD ";
   $Option4    = " 5\" x 7\" Print with 8\" x 10\" Matte @18.50 USD ";
   $Desc4      = " 5\" x 7\" Print with 8\" x 10\" Matte - $18.50 USD ";
   $Option5    = " 8\" x 10\" Print Only @16.00 USD ";
   $Desc5      = " 8\" x 10\" Print Only - $16.00 USD ";
   $Option6    = " 8\" x 10\" Print with 11\" x 14\" Matte @24.00 USD ";
   $Desc6      = " 8\" x 10\" Print with 11\" x 14\" Matte - $24.00 USD ";
   $Option7    = " 8\" x 12\" Print Only @16.00 USD ";
   $Desc7      = " 8\" x 12\" Print Only - $16.00 USD ";
   $Option8    = " 8\" x 12\" Print with 11\" x 14\" Matte @24.00 USD ";
   $Desc8      = " 8\" x 12\" Print with 11\" x 14\" Matte - $24.00 USD ";
   $Option9    = " 11\" x 14\" Print Only @23.00 USD ";
   $Desc9      = " 11\" x 14\" Print Only - $23.00 USD ";
   $Option10   = " 11\" x 14\" Print with 16\" x 20\" Matte @32.00 USD ";
   $Desc10     = " 11\" x 14\" Print with 16\" x 20\" Matte - $32.00 USD ";
   $Option11   = " 12\" x 18\" Print Only @32.00 USD ";
   $Desc11     = " 12\" x 18\" Print Only - $32.00 USD ";
   $Option12   = " 12\" x 18\" Print with 18\" x 24\" Matte @40.00 USD ";
   $Desc12     = " 12\" x 18\" Print with 18\" x 24\" Matte - $40.00 USD ";
   $Option13   = " 16\" x 20\" Print Only @39.00 USD ";
   $Desc13     = " 16\" x 20\" Print Only - $39.00 USD ";
   $Option14   = " 16\" x 20\" Print with 20\" x 24\" Matte @46.00 USD ";
   $Desc14     = " 16\" x 20\" Print with 16\" x 224\" Matte - $46.00 USD ";
   $Option15   = " 20\" x 30\" Print Only @45.00 USD ";
   $Desc15     = " 20\" x 30\" Print Only - $45.00 USD ";
   $Option16   = " 8 Wallets @8.00 USD ";
   $Desc16     = " 8 Wallets - $8.00 USD ";
 }


Thanks for the help with more than 10 price options!  - I should have been able to do that myself but could see the forest for the trees!

Now I have another question:
On the PayPal Shopping Cart Page a # sign followed by a number appears after the item description in the item box. What is that number? See the following screen shot. In this example the number is 27. However, this number changes for different items. So again, what is this number?

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.gontzphotography.com%2Fscreenshot.gif&hash=8bcf59f91de163b2ea3685838b38e6eda61cf900)

Thanks!
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 14, 2005, 07:13:26 pm
@Tgonz,

That little #number is your images "PID".  If you go to that image on your website, look at the URL and check that number against the PID number in your URL.   This is there as a kind of fail-safe system.  If the image ordered and the PID doesn't match, you may need to confirm the ordered image with the customer.  Very infrequently, images do not display properly in coppermine.  So what the customer thinks they are ordering may not actually be what's being listed.

Dennis

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: tgontz on December 14, 2005, 08:47:28 pm
Thank you, that is good to know.

Also, your PayPal mod and support is awesome!

Thanks again.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: BTPlus on December 14, 2005, 09:05:18 pm
@madeinhawaii,

If I were to be asked to vote, I would vote this mod the most important Coppermine mod to date. I just finished installing it. I will use it for one of my photography clients. I had some trouble with the instructions, but was able to figure everything out with the posts from yourself, Casper, and Massive.

Thanks,
Kris
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 18, 2005, 02:26:01 pm
Hi,

I tried to setup different paypal accounts for each member of my site as you told me with
Code: [Select]
if ($owner == uploader1)
{$paypal_ID = uploader1's_ID@whatever.com;}
else
if ($owner == uploader2)
{$paypal_ID = uploader2's_ID@whereeverelse.com;}
else
if ($owner == uploader3)
{$paypal_ID = uploader3's_ID@someotherjoint.com;}
etc...
else
{$paypal_ID = modcreator's_ID@my_email.com;}  //default ID use mine if you can't think of one

But it doesn't work

I always get this error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/42/d104570201/htdocs/panwild2/orders.php on line 177


Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Nibbler on December 18, 2005, 03:55:13 pm
Post the exact code you used.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 18, 2005, 04:16:23 pm
Another question,

Some of the photographers I'm working with does not have any paypal accoung (Whatever the reason)
Would it be possible to send the "place order" result  by email to the photographer???

Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 18, 2005, 09:24:04 pm
Another question,

Some of the photographers I'm working with does not have any paypal accoung (Whatever the reason)
Would it be possible to send the "place order" result  by email to the photographer???

Thanx

Short of using IE and clicking File/Send/Page by email...    I don't see how it can be done.
How would your photographer process credit cards ? 

What you are asking for is not very secure and not something that would promote consumer confidence.

Your best bet is to collect the money for them, and to charge them a small percentage for your services.

Dennis
PS... don't forget my email address in the default paypal line.


Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 19, 2005, 11:32:22 am
Here is the code I've used to setup different paypal accounts

Code: [Select]
Print <<<EOT
if ($owner == 3)
{$paypal_ID = test1@netfalls.com;}
$currency_code = "EUR";
else
if ($owner == 2)
{$paypal_ID = test2@netfalls.com;}
$currency_code = "USD";


I still get the following error:
Parse error: parse error, unexpected T_SL in /homepages/42/d104570201/htdocs/panwild2/orders.php on line 173

Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 20, 2005, 02:46:36 am
Here is the code I've used to setup different paypal accounts

Code: [Select]
Print <<<EOT
if ($owner == 3)
{$paypal_ID = test1@netfalls.com;}
$currency_code = "EUR";
else
if ($owner == 2)
{$paypal_ID = test2@netfalls.com;}
$currency_code = "USD";

I still get the following error:
Parse error: parse error, unexpected T_SL in /homepages/42/d104570201/htdocs/panwild2/orders.php on line 173

Thanx

Netfalls,

As mentioned earlier,  the if/else has to come before or at least outside of any "print <<<EOT" or "echo <<<EOT" block.

Secondly, you need to embrace the entire if..do section with { } .
so... what you have should be something like:

Quote
if ($owner == 3)
{$paypal_ID = test1@netfalls.com;
$currency_code = "EUR";}
 
else

if ($owner == 2)
{$paypal_ID = test2@netfalls.com;
$currency_code = "USD";}

else

{$paypal_ID = madeinhawaii@hawaii.r.com;
$currency_code = "USD";}

Print <<<EOT



Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 20, 2005, 09:40:18 am
Thanx but I tried it and still get some error msg
Parse error: parse error, unexpected '@' in /homepages/42/d104570201/htdocs/panwild2/orders.php on line 174
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Nibbler on December 20, 2005, 02:18:06 pm
You need quotes around the email addresses.

Code: [Select]
"madeinhawaii@hawaii.r.com";
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 20, 2005, 03:33:46 pm
The error is gone but if I place an order it's always going on the default account madeinhawaii@hawaii.r.com
I'm sure that it does not disturb you much but.....  :-)

Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 20, 2005, 04:06:24 pm
The error is gone but if I place an order it's always going on the default account madeinhawaii@hawaii.r.com
I'm sure that it does not disturb you much but.....  :-)

Thanx

 ;) sounds like it's working perfectly to me.   btw, did you define the $owner variable in the variable section?

Also try placing the id numbers 2,3,4, in quotes as well.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 20, 2005, 04:27:44 pm
I have it in the diasplayimage.php

Code: [Select]
$pos2 = isset($_GET['pos']) ? (int)$_GET['pos'] : 0;
$cat2 = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
$album2 = isset($_GET['album']) ? $_GET['album'] : '';
$owner =  $row['owner_id'];

Is that right?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 20, 2005, 04:31:22 pm
should be in the orders.php file.

somewhere in the section above the "set paypal ID and currency type"

Quote
  $user2 = $row['user2'] ;
   $user3 = $row['user3'];
   $user4 = $row['user4'];
   $keywords = $row['keywords'];

// Set paypal ID and currency type
   $paypal_ID = "madeinhawaii@hawaii.rr.com";
   $currency_code = "USD";

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 20, 2005, 05:41:20 pm
It's working perfectly now.

Thank you very much
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 20, 2005, 07:01:18 pm
netfalls,

right under that if/else block, try that language thing.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 21, 2005, 09:21:56 am
I will try it but it's not for the same website.

If you wanna see how it works now >> www.panwild.com (http://www.panwild.com) I still have a few things to adapt

Thanx a lot
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 21, 2005, 10:11:47 am
netfalls,

everytime you show me something it looks more and more complex.  ;)

Looks good.

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 21, 2005, 01:38:05 pm
How can I change the "Purchase items from panwild.com" to  "Purchase items from Photographer's name" ?

Thanx
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 21, 2005, 05:22:18 pm
Netfalls,

What $user # is the 'copyright' in?  That's the defined variable you want to plug into that line.


Quote
available: 3072x2048 (large) - 1500x1000 (medium) - 640x426 (small)
Copyright: Philip Erche
File Size: 24 KB

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 21, 2005, 05:35:54 pm
Just the picture's owner name (username)  not the copyright.

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 21, 2005, 05:49:49 pm
whatever the field number or ( $user#  ) that the "copyright"  is is the field that you are using to show the owner'
s name.  The word "copyright" will not display, just the entry, which apparently is the owner's name.

Dennis 
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 21, 2005, 05:54:22 pm
I'm really stupid ..... It was so easy
Sorry
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on December 21, 2005, 06:06:34 pm
Another question

I have about 10 photographers on the site would it be possible to set different conditions in the "About our prints" section

Thanx
Philip
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on December 21, 2005, 06:11:45 pm
I'm really stupid ..... It was so easy
Sorry


Not stupid, just got too much on your mind.  Stupid will never be able to design a site like the one you are doing.

And to answer your subsequent question. "yes".

In that if/else block you created for different users, add $aboutprints = "yada yada yada this and yada yada yada that";   <- don't forget the semi-colon. Then plug in $aboutprints where you want the text to go.

Dennis 
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: TheKog on January 02, 2006, 02:07:22 am
I love what you've done with this mod but have a couple questions I'd appreciate guidance on. I am trying to add a small store to a client's web site but the client has minimal programming skills although the site does have a CPG gallery. I was thinking perhaps we could have an Album of products with appropriate "Buy Now" Paypal buttons then I saw your mod.

Is there any handlong of sales tax and shipping? Is that picked up on the PayPal side somehow?

Since my customer has no programming skills I am thinking perhaps I need to give them a full local shopping cart so they will have an easy way to add inventory and manage it -- your solution looks easy for someone who is somewhat web savvy but I have doubts they can handle it -- your thoughts?

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on January 02, 2006, 08:43:40 am
Quote
Is there any handlong of sales tax and shipping? Is that picked up on the PayPal side somehow?

Paypal does a great job in handling taxes and dealing with various shipping options.   That would be the first place I would look to setting up these charges.   


Quote
your solution looks easy for someone who is somewhat web savvy but I have doubts they can handle it -- your thoughts
Currently, the if/else routine is as simple as it gets for those who need one or several different "sets" of pricing.  Once established, your customer should not have to deal with any changes unless they start offering something completely new (i.e., they purchase a large format printer and can now offer oversized prints. And if they can afford a new oversized printer, they can afford to call you back to add the new options.). 

Many of the users of this mod are new to coppermine and web design as well. 

Another dev is working on making this mod into a true plug-in, which you should be able to upgrade to with ease and should make price changes even simpler.  I'm looking forward to it myself.

Dennis

   




Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: TheKog on January 02, 2006, 02:41:41 pm
Thanks Dennis -- we'll prototype it and see how it goes.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: mrand on January 08, 2006, 04:37:09 pm
I'm really loving this mod and I was actually able to incorporate it into my site and it looks like it's working great. The only thing I cannot figure out is how to get the different pricing structures to show up.  I've entered all the different sizes and prices into the appropriate categoreis (squares, normal, panoramics), but I cannot see how the mod knows which ones to load for certain images. Obviousy I have a panoramic gallery and would like to have those prices show up. I'm sure this is very easy to do, I'm just overlooking something.

I appreciate any help. Thanks.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: netfalls on January 08, 2006, 05:46:52 pm
Hi mrand,

The prices setting depends on what's written in the custom field (you have to set it up in the admin part)

For exemple if the custom field contains "Panoramics" :
Code: [Select]
if ($pricing_setup=="Panoramics"||$pricing_setup=="panoramics")  //custom field entry is "Panoramics"
the script will get the Panoramics prices setting


For exemple if the custom field contains "Squares" :
Code: [Select]
if ($pricing_setup=="Squares"||$pricing_setup=="squares")    //custom field entry is "Squares"
the script will get the  prices setting

It seems to me that you custom field is actualy ":"  write  "Panoramics" or "Squares"  in that field in the picture description


Cheers
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: mrand on January 08, 2006, 08:20:19 pm
Ok, I still don't understand. Yup, I'm an idiot I guess. I lgged in and went to the admin page and scrolled down to custom fields for image descriptions. I saw that there was 4 empty places. I filled in Panoramics for each of them. Then I went to my gallery and when I clicked on order this print, I still got the default pricing. I assume I need to change something so that the pricing is applied to each image and not each gallery?

Still confused.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: mrand on January 09, 2006, 12:22:02 am
Alright, I got it  ;D

Now for another question. Can I list more than 10 item prices? I assume I can just make the list longer and change the numbers going from 10 to, say, 15 or 20?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artistsinhawaii on January 10, 2006, 09:51:39 am
mrand,

glad you worked out the previous issue you had.  My modem conked out on me so I wasn't able to respond immediately.  Insofar as adding more to the list, the answer is yes.  see this previous message in this same thread.

http://forum.coppermine-gallery.net/index.php?topic=22357.msg115282#msg115282 (http://forum.coppermine-gallery.net/index.php?topic=22357.msg115282#msg115282)

Dennis
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: sharpo on January 20, 2006, 01:54:24 pm
I had a couple of queries, but a modified version of this Mod has been posted by Casper, and for me it is much easier to use & modify:-

http://forum.coppermine-gallery.net/index.php?topic=26454.0

(hope I have posted the above topic correctly)
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: MikeNL on April 03, 2006, 12:12:01 am
Dear madeinhawaii,

Thank you so much for your Mod! It is just what I was looking for. I had some trouble installing it, but that was my problem, cause I am not very familiar with php. But finally I succeeded. Im am very satisfied about the result!!
Maybe you are interested to take a look by yourself. The address is: http://www.leylant.com/cpg134/index.php (http://www.leylant.com/cpg134/index.php)

Thank you again for your efforts to make this possible!
Mike from Holland
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: felixf on April 06, 2006, 05:55:55 pm
Hi,

it's a nice and handy mod, I really appreciate it.
But I wonder if there is a possibility to include a button or textlink somewhere in the top menu that shows your current cart if the user ha closed the paypal window.
something like VIEW CART and then pops up again that paypal cart window ?

This would be really nice.

Felix
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: felixf on April 07, 2006, 10:01:49 pm
Well, I made it myself :)

But I got another question :

is it possible to setup default shipping fees? I mean is it possible that somebody adds the first item to the cart that an item called SHIPPING with a specifi amount is automatically added to the cart ? This should only happen when the first pic is added to the cart of course.

Regards,
Felix
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on May 19, 2006, 11:51:49 pm
Added security feature for the paypal mods on this thread.

Search for:
Replace the  $paypal_ID = youremail@whatever.com line with the following code.
The above gets concatenated to made+inhawaii+@+compuserve+.+com or madeinhawaii@compuserve.com .   

Replace the "made", "inhawaii", and "compuserve" with bits from your own email address.

What this does:   It prevents those nasty spambots, email gathering robots, from getting your paypal address. 

Also see my other post for a javascript that does the same for your "contact us" email addresses at:

http://forum.coppermine-gallery.net/index.php?topic=23766.msg109193#msg109193 (http://forum.coppermine-gallery.net/index.php?topic=23766.msg109193#msg109193)   

Dennis 

Another option for this that works for me (without CPG to date - about to try it) is using your paypal referal code text - go to your paypal account and find the place where they give you a link code for refering business members - use that code instead of your e-mail address and you should be spambot free.

I use it on my static royalty free stock photography (http://www.aeronauticpictures.com/rfphotos/airport1.htm) page and will try it as mentioned above with Dennis' very cool paypal mod in my new royalty free stock footage (http://www.aeronauticpictures.com/royalty-free-stock-footage/index.php) store.

And Dennis, THANKS for this mod!
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: jackbremer on August 11, 2006, 03:25:40 pm
I think something must have happened at paypal's end because this has stopped working - I have checked my code and nothing's changed at my end...

I also believe it's not me as the example another poster gave above of theirs is also malfunctioning. Examples:

http://www.leylant.com/cpg134/orders.php?album=9&cat=&pos=1
or mine:
http://www.oldbrightonians.com/gallery/displayimage.php?album=20&pos=0

FYI I have set it to correctly submit in GBP...

Quote from: Paypal
You may only add items denominated in U.S. Dollars to this Cart for this merchant. If you would like to purchase items using a different currency, remove all items from this cart and then add an item in your desired currency.
   


We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.

Message 3005

Des difficultés temporaires nous empêchent d'effectuer cette opération. Nous vous prions de nous excuser pour la gêne occasionnée. Veuillez réessayer ultérieurement. Si cette erreur est survenue lors d'un paiement, évitez tout paiement en double en vérifiant l'Aperçu du compte avant de renouveler l'opération.

Message 3005

Siamo spiacenti: il servizio è temporaneamente sospeso a causa di problemi tecnici. Ti preghiamo di riprovare più tardi. Se questo errore si è verificato durante l'esecuzione di un pagamento, ti suggeriamo di accedere al tuo conto e controllarne le Attività recenti nella pagina di Informazioni generali prima di ripetere l'operazione, onde evitare l'invio di un doppio pagamento.

Messaggio 3005

Leider haben wir zurzeit ein technisches Problem. Bitte versuchen Sie es später noch einmal. Sollte diese Meldung während einer Zahlung erscheinen, überprüfen Sie bitte zunächst Ihre Kontoübersicht, um doppelte Zahlungen zu vermeiden.

Meldung 3005

Lo sentimos, en este momento tenemos problemas. Inténtelo de nuevo más tarde. Si este error ha ocurrido mientras realizaba un pago, evite pagos duplicados comprobando la descripción general de su cuenta antes de volver a realizar dicho pago.

Mensaje 3005

对不起,我们的系统暂时无法提供服务,请稍后再试。如果本问题是在进行付款时出现,请在重新付款之前核对您的账户信息,以避免重复付款。

消息 3005

Helaas ondervinden wij op dit moment problemen. Probeer het later opnieuw. Als deze fout is opgetreden tijdens het uitvoeren van een betaling, dient u te voorkomen dat u tweemaal betaalt door uw Rekeningoverzicht te controleren voordat u de betaling opnieuw verzendt.

Bericht 3005
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: jackbremer on August 11, 2006, 03:48:11 pm
I've cleared out cookies, and changed it to USD...

Now it says on PayPal for my domain's recipient:
Quote from: PayPal
The recipient of this shopping cart link is not an approved shopping cart user. Please review your selection and try again.

I've changed back to GBP and it says the same thing. I cannot find where to change these settings in PayPal...
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: daviddubree on October 03, 2006, 06:27:44 pm
Thanks for this mod.  My question is could the description be read and the 'Price: $$$$.$$' be parsed out, then inserted into the base price?  That is all this mod is lacking to make it perfect for my clients coppermine site: www.marthakaplan.com (http://www.marthakaplan.com).  I haven't done the permanent install yet, just testing it.  She doesn't need any Options, just the Price in the description inserted as the base price on the Orders screen.

I think this change would be great for many a folk.  A simple way to allow each pic (or artwork) to have unique pricing.

Let me know if this can be done.

Thank you!
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on October 05, 2006, 04:48:13 am
I've finally gotten around to trying this cool mod.

I first tried the (bad) advice I gave about using the business referal id instead of the business e-mail address. Paypal did not like that at all.

Said I was not an authorized cart user.

So I tried the javascript mung script Dennis kindly included.

Code: [Select]
// Set paypal ID and currency type
   if ($paypal_id  == "") {
        $at1 = "@";    // the sum of these parts make up your paypal email address
        $dot = ".";
        $typ = "com";
        $id1 = "MUNGED";    // real id1  (change here)
        $url = "aeronauticpictures";       // real URL (change here)
        $paypal_id = $id1 + $at1 + $url + $dot + $typ; //<-formula to put it together
    }
   $currency_code = "USD";

Works fine in IE but got the original error with Netscape.

MUNGED is not my user id - the right one is in the file. Also - only needed 1 $id value - but tried it with two and the second empty. Is that the issue?

Quote
The recipient of this shopping cart link is not an approved shopping cart user. Please review your selection and try again.


Don't really want the old e-mail address out in the wild. I've re-read all 7 pages of this thread.

Hardwired, CPG 1.4.9
Simple for posters.

Also - been testing without replacing the file yet - could this be an issue? I've uploaded a displayimage1.php (as per the test w/orders.php) to tweak before going live.

Seems to work fine with IE as stated.

Test url (will be removed after fix and post edited)

http://www.aeronauticpictures.com/royalty-free-stock-footage/displayimage1.php?album=42&pos=29

NOTE: Rest of body text will be edited after I get it working.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on October 05, 2006, 04:59:25 am
If I understand the rules, not more than one question per post or is that if you start a new thread?

Next question:

The displayimage.php file states it is: Coppermine version: 1.4.2

Any issue with my edition of 1.4.9 or the security and bug fixes up through 1.4.9?

Thanks!
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on October 05, 2006, 05:42:07 am
I tested Netscape 7.2 with the standard, e-mail address in the open, and that works fine.

So it is something about the address munging javascript that is causing Netscape problems.

As an aside, do we get our "edit our posts privileges" taken away by the mods?

I was going to add this to an existing post but could not.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on October 05, 2006, 06:28:06 pm
Okay, I think I fixed this and it seems to work with both IE and Netscape (no idea about Safari or Firefox or...)

Changed this:
Code: [Select]
$paypal_id = $id1 + $at1 + $url + $dot + $typ; //<-formula to put it together
To this (removed the spaces between the "+" signs):

Code: [Select]
$paypal_id = $id1+$at1+$url+$dot+$typ; //<-formula to put it together
Go figure!
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on October 05, 2006, 08:11:29 pm
Boy it feels lonely in here. Is it my breath?  ;)

Okay, I think I've got it working as desired with a tweak I'm happy to share if it is of any use to anyone else.

Again, this relates to the "Simple for posters" version only.

Since my CPG gallery is selling stock footage on discs, I wanted to call the price from custom field #4 which is exactly what this version of the mod did, but, I wanted to add a simple drop down list of shipping choices based on delivery via UPS to locations in the USA. These are simple numbers that apply to all discs, with the international clients asked to simply contact me so we can deal with customs, etc. One other thing - I wanted to ship any additional discs (2-5) for free in the same order.

So, in this section of the mod version of displayimage.php:

Look for this code: <!--//Start <Form> Block for purchase options -->

Scroll down until you find:
Code: [Select]
<input type="hidden" name="baseon1" value="" />
Insert these lines just underneath (not overwriting anything):
Code: [Select]
<select name="shipping" size="1">
          <option selected>Select Your Shipping Options Here</option>
  <option name="shipping" value="12.34">UPS Ground $12.34</option>
  <option name="shipping" value="45.67">UPS 2nd Day Air $45.67</option>
          <option name="shipping" value="89.10">UPS Next Day Air $89.10</option>
  <option name="shipping" value="0">Additional Discs 2-5 In Same Order $0.00</option>
          </select>
    <input type="hidden" name="shipping2" value="3.00">

Note: The price without the dollar sign in quotes on the left (value=) is posted with the form and the text the client sees with the dollar sign is on the right.

Those figures above are made up - customize as you wish.

The additional disc option applies pricing but the cost is zero.

On my live site this is displaying the drop down list above the purchase button but flush left which looks not so good. I've added some arrows and need additional text to explain it is domestic shipping anyway but since this is source code of a form I'm not sure how to format it to center, which is what I'd prefer. Any help would be appreciated.

This seems to work just fine with Netscape 7.2 and IE.

One thing that does not work is the continue shopping button from the Paypal page back to the site with Netscape. It just does nothing. It does work fine with IE.

I also tweaked the about the product section to display the keywords by adding this line:

Code: [Select]
<li>Keywords: $keywords</li>
Just below this line:

Code: [Select]
<li>Price: \$$user4 USD</li>
And since this is a disc and all items in the album are sold together on it, not as individual clips, I use the album name as the title and product description for the paypal order.

So in the same section as just above, I use this code:

Code: [Select]
<li>Title: <b><i>$album_name</i></b></li>
This set-up would work pretty well for any album-wide sales.

Set the price for the album (with just one master sales file and cover art image or all files contained within) and sell collections of images or footage, software, music, etc.

Thanks to CPG, Dennis and everyone else who has contributed.
Title: Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
Post by: RobTriskele on October 06, 2006, 10:02:02 pm
Thanks for  this.. I am eager to get it working.   However I am having difficulties...

I get a 404 The requested URL /cards/{ECART_TGT} was not found on this server


If I put in the URL

http://...  /coppermine/ecart.php

It says The selected album/file does not exist !

Where did I go wrong?  IS there more editing I need to do in the ecart.php?  I just did the edits in the theme and displayimage as you described.  Thanks for any help with this.


I too am having this issue, I have followed the edits to the letter and cannot for the life of me figure it out.

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: QBO on April 23, 2007, 09:50:34 pm
Were can I find the attach file to download it. I read that is in the first post in the first page but some how can't find the link. Please help.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: Nibbler on April 23, 2007, 09:52:22 pm
It's attached to http://forum.coppermine-gallery.net/index.php?topic=22357.msg108825#msg108825 as stated. Attachments are not visible unless you are logged in.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: jackbremer on June 11, 2007, 03:28:15 pm
Got this working great, many thanks!

I'm trying to add VAT tax at 17.5%, so it shows up as a proper Tax element in PayPal (rather than just an extra % on the individual item like Gloss/Matt/B&W might do)...

I've tried putting this in the form:
Code: [Select]
<input type="hidden" name="tax" value="17.5%"> which doesn't work, and putting 17.50 in there adds a flat rate of £17.50 to the order, regardless of order size.

I obviously need this variable to change with the order size, but am unsure of the code - any ideas?

My site: http://www.mindheadpublishing.co.uk/imagearchive/orders.php?album=1&cat=&pos=1 (http://www.mindheadpublishing.co.uk/imagearchive/orders.php?album=1&cat=&pos=1)

Keep up the great work you lot!

Jack
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: nontekkyguy on July 23, 2007, 05:30:45 pm
How can I make the Order and Checkout Buttons stand out if I am using a darker theme? For example I'd like the text for "Place order" to be yellow or white. Is there a way to incorporate Font code without disrupting the onclick script?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: nailholes on October 13, 2007, 05:19:27 pm
Hi,

I'm using the Simple ecart files for cpg1.4x PayPal Mod with Coppermine 1.4.12 but I am having a problem with displaying the intermediate images using Internet Explorer 7.  The problem does not exhibit itself using Mozilla Firefox.

The problem is that when you click the 'Buy a print' button.  The orders.php file is called and the order options appear but it doesn't re-display the intermediate image above the options.  Instead a box for the intermediate image is drawn but no image appears within it.  Also a vertical scroll bar appears on the right hand side of the box.

The Coppermine installation has also been modded with CPG1.4 Modpack by Stramm, which appears to work perfectly.
I am also using the Tentacle theme that was modded for Stramm's ModPack.

A link directly to picture within my gallery can be found here:

http://www.redeyephotography.co.uk/displayimage.php?album=35&pos=0

It appears that the picture information is being passed to the orders.php file when the button is clicked as the description can still be seen.  But as fas as I can tell only a blank space is being put where the picture should be.

I get the impression that this problem is something to do with the way the intermediate picture are being displayed as it does work in Firefox.   Any help or pointers would be appreciated as I've worked on this problem for a while now and I just can't seem to get my head around it.

Thanks
Graham
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: MikeNL on December 14, 2007, 10:38:54 pm
Hi,
On my site I get this, when I click an image to buy: Fout
Geselecteerde album/bestand bestaat niet! (which means: Error, selected album doesn't exist). What's wrong??
Until a few days ago everything worked perfect. But now my server changed his serversoftware from Cobalt to Plesk (and due to that, some paths have changed, too). I don't know what to do now. Where do I have to change something, to make this work again? I will give you the address of my gallery to take a closer look by yourself: http://www.leylant.com/cpg148/index.php. Try to buy a picture and you will see what I mean. Which file(s) do I have to change, to fix this? And what do I have to change? Please, help me!!

Mike

 
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: MikeNL on December 17, 2007, 08:27:41 pm
hmmm, no reaction at all. Did I ask a stupid question? I searched the forum all over, for hours, but cannot find a hint.
Little desperate now...

Mike
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on December 18, 2007, 08:28:13 am
The author of this mod has left, so there is nearly no support for it.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: cprphotography on January 05, 2008, 12:30:30 am
Hello all, i'm not very good at programming i'm doing the best i can can you tell me how to change the drop down boxes to text area boxes?
thank you
cpr-photography.com/myphotos (http://cpr-photography.com/myphotos)
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on January 05, 2008, 12:09:37 pm
Did you read my reply just above your posting?
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: cprphotography on January 07, 2008, 08:26:19 pm
Did you read my reply just above your posting?

ok i see but can anyone else answer my question, i want to replace the drop manu with a text area where customer can write information.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on January 28, 2008, 08:00:17 pm
ok i see but can anyone else answer my question, i want to replace the drop manu with a text area where customer can write information.

I don't believe PayPal's cart will allow a text field to pass a message. I ship via FedEx and I wanted to capture phone numbers (which FedEx requires for the airbill) but could not manage to get that to work. It appears that the cart variable which PayPal dictates does not allow it.

If someone else with more PayPal expertise can correct me or confirm this it would be great. In the meantime cprphotography I'm afraid you'll need to add text asking your customers to send you a note via e-mail after their order.

HTH
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: cprphotography on February 07, 2008, 09:19:15 pm
i think paypall allow it because you can go to their site and you can create a buy botton with text are, the thing is i dont know how to add it. I need to allow customer to send me additional information about their orders.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Aeronautic on February 23, 2008, 12:37:03 am
i think paypall allow it because you can go to their site and you can create a buy botton with text are, the thing is i dont know how to add it. I need to allow customer to send me additional information about their orders.

Well I do have this code in my cart form but to the best of my knowledge it has never been used nor does it appear to do what the PP docs say it should do.

If you figure it out please do share it here.

This is supposed to add a "customer note" field:

Code: [Select]
<input type="hidden" name="cn" value="Phone # (Required - FedEx) !!">
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: cprphotography on March 07, 2008, 07:09:44 pm
does not work
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on March 09, 2008, 03:34:04 pm
"does not work" doesn't qualify as a valid reply ::).
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: innstreet on April 04, 2008, 11:17:22 pm
I have searched the forum and have not found what I need.

I would like a shopping card that would allow the guest to buy the entire album. I realize that the guest can add individual photos to a CD. It appears, and I may be wrong that this Mod only shows product sell options once the guest clicks on the individual  photo. I  would like to have an 'add to cart' button appear next to the album.  The photos in the album displayed by Coppermine would only be for a lo-res preview of the contents of the album for sale.

Now for the really tricky part. The albums to be sold will be stored on my server in a single .rar file or .zip file for each album. After checkout with PayPal the user will be emailed a unique download links to the files purchased which helps prevent theft and abuse. There are a lot of scripts out there that  do this like www.DigitalProductManagement.com and will probably have to be incorporated  separately.

After reading though this forum this seems to be something many many people want and need.

Wylie
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: cprphotography on April 08, 2008, 06:36:42 pm
"does not work" doesn't qualify as a valid reply ::).
well i figure it out now is woking for me 100%.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Shonna on August 15, 2008, 09:27:42 pm
i installed this mod.. but the order button always goes to this...

http://picturesimagegallery.com/orders.php?album=&cat=&pos=0

which ofcourse says..

"The selected album/file does not exist !"
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: sharon1 on October 29, 2008, 03:25:50 am
I have installed this mod in the most recent CPG located here - http://www.vanlieuphotography.com/store

I have the basic drop down menus the way I want but I would like to be able to offer different choices for different pictures. I read reply#8 in this thread where the custom image field is set up as available editions and I followed along until I got to this section.

Quote
NEXT,
find this line:   
Quote
<b>Your cost: $110.00</b></p>

change  to:
Quote
<b>Your cost: $bcharge </b></p>



I don't have this line anywhere in my orders.php page. What am I missing?

Thanks for your help,

Sharon 
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: sharon1 on October 29, 2008, 11:03:50 pm
I have figured out my error.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: Joachim Müller on October 30, 2008, 12:04:19 am
You've been told in your other thread (http://forum.coppermine-gallery.net/index.php/topic,56010.0.html) that you're suppossed to actually resolve your questions for the benefit of others.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: sharon1 on October 30, 2008, 07:24:04 am
Okay, I didn't understand the language of custom image description being described as user1, user2 etc. I could not figure out that these were fields. Also there were several errors in the fields that had to be corrected. I'm not sure how this helps anyone as it was merely confusion on my part. I will copy paste this answer to my other thread.
Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-1
Post by: artefatta on February 27, 2009, 02:02:15 pm
I used this mod before upgrade to 1.4, and it worked fine. It hadn't the drop down menu, and it was sweet for me as site is selling only original arts.
After upgrade all information and "buy" buttons have disappeared. But all desciptions that was used by this mod are still there in image description fields of every art.
How can I make it work now?
If I install a new mod it will be the drop menu that I do not need.
Any help?

Title: Re: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05
Post by: JohannM on February 17, 2010, 12:22:04 am
I need to put an exchange rate into the config of the shop, which I have done.

But now I am not sure how to code the exchange rate to be converted from ZAR to USD to work with paypal. Paypal does not support ZAR (South African Rand), so I need to change the "total price" of paypal checkout to be calculated by deviding it with e.g. 8.75 (exchange rate) ...

Any suggestions