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 ... 5 6 7 8 [9] 10 11 12 13 ... 20   Go Down

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

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #160 on: January 02, 2005, 03:51:35 pm »

I almost have it working, one problem is that when I go to the shopping cart in Paypal {FILENAME} appears in the checkout

Did you replace the displayimage.php with the one in the download.  If you are sure you did, what theme are you using?

How do I find the albums ID number?

Go to the album, look in the address bar.  The address will be thumbnails.php?album=-**  the ** will be the album number.


It is nearly working, but when I go to the shopping cart. I would like to see the "Album Name and "File Name". File name is allready there, is it possible to add the name of the Album instead of the Photo Name?

This will reuire changes to the displayimage.php, to get the album name, as well as changing the paypal button code.  Try looking at how displayimage gets the filename info, for hints on how to do it.
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

jpconijn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: add a Paypal shopping basket to your gallery.
« Reply #161 on: January 02, 2005, 08:34:39 pm »

Hi Casper,


I am a Newby, hope you can give some specific hints what I have to change to get the Albumname in the Shopping cart.

Thanks



Jan
Logged

Zfolk

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • The Attic
Re: add a Paypal shopping basket to your gallery.
« Reply #162 on: January 03, 2005, 08:03:51 am »

Great!  Thanks Casper... that worked .. I guess that file did not make the transfer originally but that was the problem.  I am running the Project vii skin and it seems like everything is working great!  You can see it in action here:

http://www.folkphotography.com/coppermine/index.php

Thanks again! 
Logged

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Re: add a Paypal shopping basket to your gallery.
« Reply #163 on: January 10, 2005, 04:50:00 am »

<<-- How to get rid of the "view cart paypal button" -->>
This mod will get rid of the gross looking paypal default button :P, and utilize the View Basket button that come with igames. I am pretty sure this will work on other templates, but I have not tested them.

Be aware of two things before you read on:
1. This was only tested in the igames theme
2. This has not been fully tested

in theme.php find
Code: [Select]
<!--  view basket button  -->

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_cart">

<input type="hidden" name="business" value='{$CONFIG['paypal_email']}'>

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

<input type="hidden" name="display" value="1">

</form>
and delete it

next find
Code: [Select]
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a> and change it to
Code: [Select]
<a href="https://www.paypal.com/cart/business={$CONFIG['paypal_email']}&display=1">View Basket</a>
~fareforce
http://www.AlaskaStudio.com
I am modifying the heck out of igames.. I will post on a seperate thread when all mods are complete. It will incorperate several mods people are doing..  ;D
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

mgraf

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
    • http://www.grafphoto.com
Re: add a Paypal shopping basket to your gallery.
« Reply #164 on: January 12, 2005, 07:29:29 pm »

What would be the best way to add this mod to an already existing gallery with a customized theme?

I have already tweaked my gallery quite a bit, and wouldn't want to erase anything by simply overwriting files.

Mark

My gallery:  http://www.grafphoto.com/gallery/index.php

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: add a Paypal shopping basket to your gallery.
« Reply #165 on: January 13, 2005, 09:02:59 am »

you will have to use a diff vieweer to find out the differences between an unmodified theme (from the standard coppermine package) and the same theme that comes with the hack. Then apply all changes to your cutomized theme as well. A good diff viewer on Windoze is WinMerge, Lunix usually comes with a built-in diff viewer.

Joachim
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #166 on: January 13, 2005, 10:54:23 am »

No need for a diff viewer.  The download contains all the instructions for adding the code needed to an already modified install.

Open docs/Code-changes.html for these instructions.
« Last Edit: January 13, 2005, 10:59:25 am by Casper »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #167 on: January 17, 2005, 11:49:37 am »

Received from lu-x via pm;

Quote
Hi - I hope this is the right place for this request...

I am trying to set up your shop hack. Now there are these paypal buttons in the theme.
Is there an easy way to use the FILENAME rather than the TITLE in this button [I need a unique identifier]:

<input type="hidden" name="item_name" value="{TITLE}, size '{$CONFIG['size1']}'">

Is there a variable which I could use [I am not into php]
Thanx.

First, no, the correct place to ask questions on this hack is here.  Read my signature.

And a quick look at this thread, even the recent posts from zfolk and my reply would have shown this is already included.  Both the title and filename are sent via the paypal form.

Why don't you test, and then come back if you have any further questions.
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

equi

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
possible fault with shop hack mod
« Reply #168 on: January 19, 2005, 04:17:37 pm »

ive been away for a while so apologies if this has been notified and/or discussed...The shop hack is spot on for use where only one theme is to be utilised, however ....with regard to shop hack using different albums, on caspers test site the option exists to buy posters framed or unframed upto A3 and buy wedding photos as posters.  This is possible when linking to the images via Last Uploads....Most Viewed etc...The system remembers the last theme used and only changes the theme if the album is navigated to directly.

This seems to nulify the use of different prices, sizes etc as I was able to purchase an eagle poster in  A3 GOLD for £69.99.  It might be me doing something wrong but just thought id raise the point, not that I could correct it, but is worth noting, if people plan to use the hack in this manner.

Cheers
Logged

gab696

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: add a Paypal shopping basket to your gallery.
« Reply #169 on: January 20, 2005, 08:56:49 pm »

I use the Hardwired theme for my gallery and i want to change the "originals" Paypal buttons.
I have tried with the method from Fareforce in a previous post but i can't find this code in the harwired theme.php:
Code: [Select]
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a>
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #170 on: January 21, 2005, 01:06:44 am »

Find this;

Code: [Select]
<span class="topmenu"><table><tr><td><!--  view basket button  -->
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value='{$CONFIG['paypal_email']}'>
<input type="image" src="https://www.paypal.com/en_GB/i/btn/view_cart_02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="display" value="1">
</form> </td><td>
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN my_gallery -->

And change it to this;

Code: [Select]
<span class="topmenu">
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>

<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/hardwired/images/buttonleftmy.gif" width="17" height="25" border="0" id="buttonleftmy" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter.gif">
                                                <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>

<!-- BEGIN my_gallery -->

Then find this;

Code: [Select]
<!-- END logout -->
                                </tr>
                        </table></td></tr></table>
<?span>

And change it to this;

Code: [Select]
<!-- END logout -->
                                </tr>
                       </table>
                </span>
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: possible fault with shop hack mod
« Reply #171 on: January 21, 2005, 01:21:01 am »

 Posted by: gab696
Quote
I use the Hardwired theme for my gallery and i want to change the "originals" Paypal buttons.
I have tried with the method from Fareforce in a previous post but i can't find this code in the harwired theme.php:
Code:
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a>



Yes, you are correct, and I totally forgot about that.

If using the complex shop hack, where you have different prices on different albums, you cannot include these albums in any meta albums.  The easiest way around this is to remove all links to the meta albums.

Moving this to the shop hack thread.
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

gab696

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: add a Paypal shopping basket to your gallery.
« Reply #172 on: January 21, 2005, 09:20:15 am »

Casper, i'am not sure that you have correctly understand my question ( Maybe of my poor english. excuse me :-\\ )

I have carrefully made the changes with your instructions but now a second "My Gallery" button as replaced the "View Basket" button...

I don't want to remove anything but only replace the provided paypal buttons with others gif pictures.





Logged

lu-x

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
Re: add a Paypal shopping basket to your gallery.
« Reply #173 on: January 21, 2005, 10:58:11 am »

Hi!
I hope this is the right place to ask this:

How can I change the paypal buttons in a way that not the TITLE is put into the field but the current FILENAME.
I tried without success.

Thank you for answering!
Ludwig
Logged

Casper

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

Please be more specific about where you want the filename to show.  It is already included in the information gathered by the paypal button.
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

equi

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: possible fault
« Reply #175 on: January 21, 2005, 12:42:40 pm »

>Yes, you are correct, and I totally forgot about that.
>
>If using the complex shop hack, where you have different prices on different albums, you cannot include these albums in any meta albums.  The easiest way around this is to >remove all links to the meta albums.
>
>Moving this to the shop hack thread.
 
Can you briefy decribe what are the meta albums and their use, also how you remove the links to them

cheers
 
Logged

equi

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: GAB696; change paypal buttons (shop hack)
« Reply #176 on: January 21, 2005, 12:51:25 pm »

GAB696

with regard to replacing OEM gifs provided by paypal

find... src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif"

         src="https://www.paypal.com/en_GB/i/btn/view_cart_02.gif"

 in your newly modified theme.php  and replace with the paths to your own gif images
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #177 on: January 21, 2005, 01:00:27 pm »

The 'meta' albums are the random, lastup etc albums.  You can remove them by removing lastup,2 and random,2 from your contents of main page in config.

You will also need to edit your theme.php to edit out the links in the menus, such as 'Last uploads :: Last comments :: Most viewed :: Top rated :: My Favourites :: Search.

How you do this depends on the theme in use, but in classic, just find this code;

Code: [Select]
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::
                        <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::
                        <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::
                        <a href="{FAV_TGT}">{FAV_LNK}</a> ::
                        <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

And change it to this;

Code: [Select]
<!--<a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::
                        <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::
                        <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::
                        <a href="{FAV_TGT}">{FAV_LNK}</a> ::
                        <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>-->
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

equi

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: add a Paypal shopping basket to your gallery.
« Reply #178 on: January 21, 2005, 01:13:32 pm »

Thanx :)
Logged

gab696

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: add a Paypal shopping basket to your gallery.
« Reply #179 on: January 23, 2005, 11:47:17 pm »

Thank you equi for your answer !

Now i have a another problem to place exactly my buttons where i want.
In Firefox it's all ok but in IE6 i can't succeed to place the "view basket" button in the right place. (view attached picture)
It seems to be caused by this lines in the theme.php

Code: [Select]
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value='{$CONFIG['paypal_email']}'>
<input type="hidden" name="display" value="1">

demo gallery www.gfphoto.net/coppermine/displayimage.php?album=10&pos=0
this is the code used to place the button ;
Code: [Select]
$template_main_menu2 = <<<EOT
                <span class="topmenu">
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN album_list -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
<!-- END album_list -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{LASTUP_TGT}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{TOPN_TGT}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{FAV_TGT}">{FAV_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
                                                <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                        <!--  view basket button  -->
      <td>
      <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                        <input type="image" src="themes/hardwired/images/viewbag.gif" width="48" height="21" border="0"border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    <input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value='{$CONFIG['paypal_email']}'>
<input type="hidden" name="display" value="1">
</form></td>
                                </tr>
                        </table>
                </span>
EOT;



Logged
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 20   Go Up
 

Page created in 0.058 seconds with 13 queries.