Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5 6 ... 8   Go Down

Author Topic: New Paypal Mod on a customizable page. For: cpg1 .3x and 1.4x - updated 11-12-05  (Read 164538 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #20 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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #21 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.
Logged

Ifmracin

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • IFMRacing
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #22 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #23 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

« Last Edit: October 13, 2005, 10:31:04 am by madeinhawaii »
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #24 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&pid=$pid&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
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #25 on: October 14, 2005, 09:41:55 pm »

Casper,

Oh boy, I overlooked that too, huh?

Thanks,
Dennis

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

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #26 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


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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #27 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
« Last Edit: October 17, 2005, 10:37:39 am by madeinhawaii »
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #28 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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #29 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
« Last Edit: October 17, 2005, 09:34:24 pm by madeinhawaii »
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #30 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #31 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




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

kkevin

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #32 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #33 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

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

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #34 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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #35 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
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #36 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 ! "
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #37 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
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #38 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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #39 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.
« Last Edit: November 21, 2005, 09:42:13 am by madeinhawaii »
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.
Pages: 1 [2] 3 4 5 6 ... 8   Go Up
 

Page created in 0.041 seconds with 19 queries.