News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

add a Paypal shopping basket to your gallery.

Started by Casper, July 04, 2004, 07:02:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Casper

Quote from: Zfolk on January 01, 2005, 09:30:53 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?

Quote from: Zfolk on January 01, 2005, 10:27:30 PM
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.


Quote from: jpconijn on January 02, 2005, 08:21:56 AM
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.
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

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

Zfolk

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! 

fareforce

<<-- 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
<!--  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
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a> and change it to <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
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

mgraf

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


Joachim Müller

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

Casper

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

Received from lu-x via pm;

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

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

gab696

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:
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a>


Casper

Find this;

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

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

<!-- END logout -->
                                </tr>
                        </table></td></tr></table>
<?span>


And change it to this;

<!-- END logout -->
                                </tr>
                       </table>
                </span>
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

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

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.






lu-x

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

Casper

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

>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


equi

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

Casper

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;

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

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

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

<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 ;
$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;