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 ... 8   Go Down

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

0 Members and 1 Guest are viewing this topic.

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography

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.
« Last Edit: November 17, 2005, 08:59: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.

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: New Paypal Mod using a customizable page.
« Reply #1 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
« Last Edit: November 16, 2005, 02:30:02 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.

RazorsEdge

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

excellent, I will try this out today when I get home from work.

Thanks.

-Razors Edge-

Logged

joker

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

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

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography

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
« Last Edit: October 05, 2005, 11:49:39 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.

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography

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

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.

joker

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography

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

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography

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
« Last Edit: October 06, 2005, 09:21:47 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.

joker

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

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

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #10 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

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 #11 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
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.

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 #12 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

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.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #13 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

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 #14 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

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.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #15 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 ;) 

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 #16 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
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.

joker

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

jrv

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: New Paypal Mod using a customizable page. Versions for: cpg1 .3x and 1.4x
« Reply #19 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.
Logged
Pages: [1] 2 3 4 5 ... 8   Go Up
 

Page created in 0.338 seconds with 20 queries.