<input type="hidden" name="item_name" value="{TITLE},size 130 x 178">
Angelfish, (pic ID 123)
Hi Joel,
First, I dont think your method looks unprofessional.
I don't know exactly how you achieved your way of getting your buttons to get the info, so I'm not sure how easy/hard it is for you.
$pic_html .= "</a><a href=pay.php?id=$pid&pic=$foto&path=$path_to_pic><font size= 3> Like to buy? - Kaufen?</font></a>\n";
$foto = $CURRENT_PIC_DATA['filename'];
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'];
<input type="hidden" name="item_number" value="130 x 178 mm of PictureID=<?php echo htmlspecialchars($_REQUEST['id']); ?>" />
I looked at your pics, and had a look at how you could use my method to have more than one button per pic.Thanks again for you help. I will try out this.
...
I was wondering if there is a way to make sure that orders had a postage portion to them before people would pay, thus ensuring postage costs were catered for.
Is there also a way of putting a Bio on the front page of coppermine
INSERT INTO yourprefix_config
VALUES (
INSERT INTO CPG_config
VALUES (
</form>
</ul>
<!-- 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['gallery_admin_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">
'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
AFTER '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
name="item_name" value="{TITLE}, size '{$CONFIG['size
WITHname="item_name" value="{TITLE}, Filename: {FILENAME}, Size: '{$CONFIG['size
<input type="hidden" name="item_name" value="Photograph Name: {TITLE}">
<input type="hidden" name="item_number" value="{FILENAME}">
<input type="hidden" name="on1" value="Print Size">
<input type="hidden" name="os1" value="{$CONFIG['size1']}">
@ Gaugau, will email files to you.Got the email, sorry for the delay.
Why do we have to lose voting and comments is it possible to keep these functions?
I want to add a number of size options for my photos with different prices for each option how could I do this so it works in the same way as the link below
http://about.reuters.com/pictures/prints/galleries/preview.aspx?gallery=This%20Week&story=631934490331836250&picture=X002550020040822e08m0002t.jpg
[paypal]Open Water Date 2004.07.04[/paypal]CD includes all pictures in this album in full resolution, and any additional photos taken that are not displayed.
and the bb_decode function does the string replaces.An option in the config menu would determine whether the cart feature is enabled or disabled, and a drop-down selection in the config menu would define which payment system's implementation is called. By working in a similar manner to themes, it would be easy for people to add support for many payment systems, all of which would be pulled into future releases of coppermine. It makes it an extensible cart system.
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";
if ($_GET["album"] == '4' || $_GET["album"] == '9') {
$theme='hardwired';
require "themes/hardwired/theme.php";
$THEME_DIR = "themes/hardwired/";
} else {
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";
}
Now find the 'Custom fields for image description' section, and in field 1, insert 'Description'.
<!-- BEGIN caption -->
<tr>
<td>
{CAPTION}
</td>
</tr>
<!-- END caption -->
Picture; {TITLE}
This will only happen if there is no title or description.
There is a tool in the admin tools to use the file name for the title. Just use that each time after adding pics.
Yes, everything ordered will go into the admins paypal account.
<!-- END img_desc -->
<table> <tr><td valign="top"><form action="https://www.paypal.com/cgi-bin/webscr" method="post"
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.hsocuk.com/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
Now, you need to create the albums for the various types of product.
You can have as many albums for each type as you want.
You will need to make a note of each albums ID number.
I almost have it working, one problem is that when I go to the shopping cart in Paypal {FILENAME} appears in the checkout
How do I find the albums ID 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?
<!-- 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<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>
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.
<a href="index.php" onMouseOver="MM_showHideLayers('Menu1','','show')">View Basket</a>
<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 -->
<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 -->
<!-- END logout -->
</tr>
</table></td></tr></table>
<?span>
<!-- END logout -->
</tr>
</table>
</span>
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>
<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>
<!--<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>-->
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value='{$CONFIG['paypal_email']}'>
<input type="hidden" name="display" value="1">
$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;
$template_main_menu2 = <<<EOT
<span class="topmenu">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<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>
</tr></table>
</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;
Am I close? On the right track? Do I need to modify anything else besides theme.php?
Is this even possible?
<input type="hidden" name="basedes" value="Photo Name, '{TITLE}', Filename, '{FILENAME}'" />
<input type="hidden" name="basedes" value="Album Name, '{ALBUM_TITLE}', Photo Name, '{TITLE}', Filename, '{FILENAME}'" />
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $pic_html,
'{ADMIN_MENU}' => $picture_menu,
'{TITLE}' => $CURRENT_PIC_DATA['title'],
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $pic_html,
'{ADMIN_MENU}' => $picture_menu,
'{TITLE}' => $CURRENT_PIC_DATA['title'],
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
'{ALBUM_TITLE}' => $CURRENT_ALBUM_DATA['title'],
);
I changed my user name within my Coppermine settings and I think it lead to my Titles to read "Picture; Title name here" -- it added the "Picture;" for some reason...any quick way to remove this?
Well, I successfully installed the Paypal shopping basket on my http://www.my-digitalphotos.co.uk/photos/index.php site and it works just great - but only on some of the albums! For example, none of the photos that I have tried in http://www.my-digitalphotos.co.uk/photos/thumbnails.php?album=4 album give you the option to buy photos, but others such as http://www.my-digitalphotos.co.uk/photos/thumbnails.php?album=14 are fine!
Picture; {TITLE}
<input type="hidden" name="cn" value="Additional Info">
<input type="hidden" name="currency_code"...
Paper
<input type="hidden" name="on0" value="Paper"><select name="os0"><option value="Glossy">Glossy<option value="Matt">Matt<option value="Satin">Satin</select>
the file path to the original image (fullsize) instead of the file name
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$path_to_pic = $CONFIG['ecards_more_pic_target'] .$CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
'{ALBUM_TITLE}' => $CURRENT_ALBUM_DATA['title'],
'{PATH}' => $path_to_pic,
<input type="hidden" name="basedes" value="Album Name, '{ALBUM_TITLE}', Photo Name, '{TITLE}', Filename, '{FILENAME}'" />
<input type="hidden" name="basedes" value="{TITLE}, {PATH} " />
<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="xxxx">
<input type="hidden" name="item_name" value="10x15 Print Only">
<input type="hidden" name="item_number" value="10x15P">
<input type="hidden" name="amount" value="xx.xx">
<input type="hidden" name="handling_cart" value="xx.xx">
<input type="hidden" name="shipping" value="x.00">
<input type="hidden" name="shipping2" value="x.00">
<input type="hidden" name="return" value="http://xxxxxxxx">
<input type="hidden" name="currency_code" value="USD">
td valign="top"><form action="https://www.paypal.com/cgi-bin/webscr" method="post"
onsubmit="this.target = 'paypal';
ReadForm (this);">
<p>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="{$CONFIG['paypal_email']}" />
<input type="hidden" name="item_name" value="Photo Name : {TITLE}" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
<input type="hidden" name="baseamt" value="{$CONFIG['size1_price']}" />
<input type="hidden" name="basedes" value="Photo Name, '{TITLE}', Filename, '{FILENAME}'" />
td valign="top"><form action="https://www.paypal.com/cgi-bin/webscr" method="post"
onsubmit="this.target = 'paypal';
ReadForm (this);">
<p>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="{$CONFIG['paypal_email']}" />
<input type="hidden" name="item_name" value="Photo Name : {TITLE}" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="handling_cart" value="xx.xx">
<input type="hidden" name="shipping" value="x.00">
<input type="hidden" name="shipping2" value="x.00">
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
<input type="hidden" name="baseamt" value="{$CONFIG['size1_price']}" />
<input type="hidden" name="basedes" value="Photo Name, '{TITLE}', Filename, '{FILENAME}'" />
Please enter an amount greater than zero.
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="{$CONFIG['paypal_email']}" />
<input type="hidden" name="item_name" value="Photo Name : {TITLE}" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
Casper,
Seem to be having a problem... I think I got everything uploaded and modified correctly. I used your instructions in modifying an existing theme. When adding one of the print options to your cart, it takes me to the Paypal page - but has an error:QuotePlease enter an amount greater than zero.
There is a small section of code for the theme.php mods that shows:Code: [Select]<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="{$CONFIG['paypal_email']}" />
<input type="hidden" name="item_name" value="Photo Name : {TITLE}" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
The "amount" value="" seems strange, is this correct?
Not quite sure what is going on. Any suggestions?
Here is the gallery: http://www.grafphoto.com/gallery/index.php
ALSO - instead of the Picture {TITLE} being used as the description in the Paypal cart, can this be changed to the data for Custom Field 1? Is theme.php the only place you would have to change this reference in the paypal code above?
Mark
'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
'{ALBUM_TITLE}' => $CURRENT_ALBUM_DATA['title'],
'{USER1}' => $CURRENT_PIC_DATA['user1'],
Not sure why your price is not being picked up. Try loading the classic theme version of the hack and see if that works.
hi all
Great hack.
I have one problem. I don't use any of the "normal" theme. I have many pictures with no title. I se that it is possible to download a "theme" where this is fixed. Can you explain where i have to make changes to my theme.
Thank you.
www.fotosalg.net
Lars E.
Not sure why your price is not being picked up. Try loading the classic theme version of the hack and see if that works.
Casper, I am not sure what this would do for me. My theme is already extensively modified, and I wouldn't want the classic version. If there are any files you would need to examine, I would be happy to send them. I would really like to get this to work.
Still puzzled,
Mark
Hi all,
I was wondering if it's possible to set 3 or 4 different paypal adreess?
I would like each user to get his money directly.
Thanx
Philip
www.netfalls.com/portal2/ (http://www.netfalls.com/portal2/)
It would see if the problem lies with your theme, or other parts of the code.
Yes it can.
Dreamweaver, and any other wysiwyg editor can add bits of it's own code, which upsets the php code..
Zip up your theme.php and template.html, and attach them to your reply to this post, using the additional options. If you cannot zip them, save them as txt files.
Hi guys,
I would like to know if it's possible to set a paypal address for each member and an option to select when uploading photo witch size are available.
My site http://stock.netfalls.com
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="cmd" value="_xclick">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" name="submit" alt="cart add" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
I have the shop mod installed and I thought everything looked good until I got the "Please enter an amount greater than zero" error message that's been mentioned before. I'm using the Hardwired theme and have no other modifications.
Hey everyone, im VERY new to coppermine and im trying to set up paypal to my website, im currently using the hardwood theme it and i was curious if it is even possible to incoporate the paypal feature to my site. When i downloaded the all_themes file it didnt have the hardwood theme in there so i wasent quite sure if i could do it or not
Any help would be greatly appreciated
Thanks
Tim
From what I can see, this looks like it will be a great mod. The only issue I have is that it doesn't work for me yet. I believe Lars had the same issue earlier in this thread, but I don't see the fix for this.
<script type="text/javascript">
<!-- Hide JS source from HTML validators
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;
}
function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val;
amt = obj1.baseamt.value*1.0; // base amount
des = obj1.basedes.value; // base description
for (i=0; i<obj1.length; i++) { // run entire form
obj = obj1.elements[i]; // a form element
if (obj.type == "select-one" && // just get selects
obj.name == "") { // must be un-named
pos = obj.selectedIndex; // which option selected
val = obj.options[pos].value; // selected value
pos = val.indexOf ("@"); // price set?
if (pos >= 0) amt = val.substring (pos + 1)*1.0;
pos = val.indexOf ("+"); // price increment?
if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
pos = val.indexOf ("%"); // percent change?
if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
if (des.length == 0) des = val;
else des = des + ", " + val; // accumulate value
}
}
obj1.item_name.value = des;
obj1.amount.value = Dollar (amt);
if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>
<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;
}
function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
amt = obj1.baseamt.value*1.0; // base amount
des = obj1.basedes.value; // base description
for (i=0; i<obj1.length; i++) { // run entire form
obj = obj1.elements[i]; // a form element
if (obj.type == "select-one" && // just get selects
obj.name == "") { // must be un-named
pos = obj.selectedIndex; // which option selected
val = obj.options[pos].value; // selected value
pos = val.indexOf ("@"); // price set?
if (pos >= 0) amt = val.substring (pos + 1)*1.0;
pos = val.indexOf ("+"); // price increment?
if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
pos = val.indexOf ("%"); // percent change?
if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
pos = val.indexOf ("#"); // item number?
if (pos > 0) { // yes
num = val.substring (pos + 1);// get number, and rest of line
val = val.substring (0, pos); // lop off some stuff
pos = num.indexOf (" "); // end it with space
if (pos > 0) num = num.substring (0, pos);
}
if (des.length == 0) des = val;
else des = des + ", " + val; // accumulate value
}
}
if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
obj1.item_name.value = des;
obj1.amount.value = Dollar (amt);
if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>
I'm using ver 1.3.2 and the Igames theme. Without debug mode, with the paypal mod installed, I get an error on the page that says on Line 26, char 17, a semicolon is expected. In debug mode, it tells me that there is a Use of Undefined Constant Currency_Symbol Assumed 'Currency_Symbol' in theme.php on lines 590 and 599 through 603.
Upon looking at the code, I thought I figured it out. On the line that shows:Code: [Select]<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
looks like it's missing the single quotes around currency. Putting single quotes eliminates the error on this line. Likewise where the code for all of your pricing is (20 or however many each person chooses to have), the single quotes are missing around currency_symbol. Inserting the single quotes fixes these lines from having errors.
Now comes the fun part, once all that is done, I start receiving the following errors:
Undefined variable: header in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1475
Undefined variable: template_tab_display in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1480
Undefined variable: lang_thumb_view in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1483
Undefined index: inactive_tab in /insert path to theme here/mygallery/themes/igames-paypal1/theme.php on line 1484
Hi Lisa,
the failure to get the amount is because your template.html does not have the javascript needed. You have added some for stats, which may be the cause of your logout problem.
EDIT;, on visiting your site, I see your add to basket button is also missing. I found this was because you had deleted the '</select>' tag when you removed the unwanted selections. I have added it in the attached zip.
<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="image" src="https://www.paypal.com/en_US/i/btn/view_cart.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" name="submit" alt="cart add" />
<input type="image" src="https://www.paypal.com//en_GB/i/btn/sc-but-03.gif" name="submit" alt="cart add" />
<!-- 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>
EOT;
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT
<!-- view basket button -->
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="https://www.paypal.com/cart/business={$CONFIG['paypal_email']}&display=1">View Basket</a>
</td>
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Completely updated, 12/9/04
These is a mod that allow coppermine to use paypals shopping basket.
You can see a demo of this mod, and download the files HERE (http://www.picture-parade.co.uk/shop/index.php)
The updated mod uses just 1 line with dropdown boxes for all choices (up to 20 price options), and does this using javascript. The original mod, which used a new line for each price option, is still available for download from the demo. It has a neater basket, but has a maximum of 6 price options.
You can also download the files from the downloads section here.
There are easy to follow instructions included in the docs folder of the downloads. All that is required to convert a standard gallery is to use the enclosed files to overwrite the standard files, then run update.
The mod included sets all albums in the gallery to display exactly the same options with every image, but if you want to have different options available in different albums, the instructions are attached to this post, as complex_shop.txt. This does require some code changes, but all is explained.
Please note, most of this thread is about earlier versions of the shop hack. This post, and any after and including this one (http://forum.coppermine-gallery.net/index.php?topic=8703.msg47216#msg47216), are about this current, easy to apply hack.
You may find some helpful info and tips on the other posts though.
[attachment deleted by admin]
Now delete all the lines refering to options you are not using, i.e., if you are allowing 6 choices of size, remove, or edit out, the lines for options 7 - 20.
<!-- 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>
<!-- BEGIN my_gallery -->
<!-- view basket button -->
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="buttonleft" src="themes/hardwired/images/buttonleftmemb.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
<td background="themes/hardwired/images/buttoncenter.gif">
<a href="https://www.paypal.com/cart/business={$CONFIG['paypal_email']}&display=1">View Basket</a></td>
<td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
This is not a hotline, nor do you have a right that all your questions will be answered. Read http://coppermine.sourceforge.net/faq.php#lamesupport
I've downloaded the PayPal mod yesterday and changed te code as discribed in the "code-changes.html" document. Everything works fine but I also get the Please enter an amount greater than zero. error.
I have read the options to solve this problem, but it doesn't work. I'm using Coppermine 1.3.3 and the Project_ii theme (modified). I have attached the theme.php and template.html in a zip file.
The url to the gallery on my website is http://www.terburg.net/gallery/index.php?lang=english
Can anyone help me?
Thanks in advance.
Regards, Ron
:-[ oops - found out what the problem was - I didn't update the english language file. All is good now.
I've added the PayPal hack and all seems good except that there's no settings available to change in config.php. According to the shopupdate docs, there should be two new sections in config.php between "Language, Themes & Charset settings" and "Album list view" entitled "Paypal account email" and Shop sizes and prices", but they are not there. I've double checked the shophack folder and there is no new config.php file. I've hit "update" and I see that all the info that should be in the new config.php file is listed there (paypal email address, paper sizes etc) but they don't show up in the config.php file - can anyone help please?
:-\\
Nope i do all the printing. The customers are not able to download the image. The only way forward i could see on this as the code stands is to create a different gallery e.g Mountains 1 and mountains 2. Mountains 2 would contain the bigger sizes and vice versa. But that would look a bit messy.
Whats your idea ?
Casper
The MALS MOD, was it created just for MALS or can it be applied to any current CPG platform? I know this might be asking for a whole alot, but can the original print size and price fields be kept with it, and can time and labor be added, ie 15.00 per hour at 6 hours = 90.00.?
I guess I am asking if it can be more flexable. From what I see you do great work.
Regards
Don
Hi... Thanks so much for this fantastic hack! Your support goes above and beyond!!
I tried to read through all the posts but I can not find an answer to my problem. In my galleries I have a mix of color and black and white images which also are printed either inkjet or hand printed fiber based and are priced accordingly. These are mixed together in the same album. Is there a way to make some pricing options unavailable for certain images (for example i can not print color images on fiber based papers).
If there is a way it is probably way over my head but I thought I would ask just in case. ???
Thanks again for the hack and any help with this.
Maybe someone can help with this. Ive installed the pay pal mod with no problems and upgrade and running the current stable version.
Currently i have about 6 items in my drop down list for purchasing. e.g. A1 prints, A2, Prints A3 Prints and A4 prints
The only problem is that some of my photos on the site are not high enough quality to print above A4. So what i need to do is stop people from being able to select those print sizes on the photos i select.
I know you are able to do this on a catagory scale (each catagory gets its own theme) but i need a more specifc to the photo. ???
Any sugestions ? the site is www.coolshots.co.uk/Coppermine (http://www.coolshots.co.uk/Coppermine) if anyone needs to see what im talking about.
Any ideas welcome. ;D ;D ;D
Thanks
Sion
hi
first of all I would like to thank you so much for the add, but I have 2 questions
why do i get the message that the amount should be more than zero??? I have made evrything step by step as shown in the doc..
2: all my pictures are just exampels of what I can paint(I paint them manually by hand) so I need that the clients are able to choose the sizes and the colors and which motive they want then I will amke and ship it for them...How can I do that?? does it sound crazy??
here is the site and you can have a look!
thanks in advance
I've added this hack (thanks!!) but when I select an option in the menu (eg 8x10 print $10), I'm taken to a paypal page and it says "please enter an amoutn greater than zero" even though the amounts are listed in the config file.
I noticed however, when I update the database, it says values are zero, and currency is GBP when IO specified in the config that it should use Can$. DO I need to duplicate my additions to the config file elsewhere, or change permissions to a file to allow the config page to write to it?
http://66.78.27.233/~basement/flrouiedscv3/
thanks!
thanks and sorry.
I swapped out the javascript code, but still get the same error. I updated the database too in case that was causing it.
When I go to Admin Tools and click on Update Database, I still see £ and currency says GBP.
<!--
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;
}
function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
amt = obj1.baseamt.value*1.0; // base amount
des = obj1.basedes.value; // base description
for (i=0; i<obj1.length; i++) { // run entire form
obj = obj1.elements[i]; // a form element
if (obj.type == "select-one" && // just get selects
obj.name == "") { // must be un-named
pos = obj.selectedIndex; // which option selected
val = obj.options[pos].value; // selected value
pos = val.indexOf ("@"); // price set?
if (pos >= 0) amt = val.substring (pos + 1)*1.0;
pos = val.indexOf ("+"); // price increment?
if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
pos = val.indexOf ("%"); // percent change?
if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
pos = val.indexOf ("#"); // item number?
if (pos > 0) { // yes
num = val.substring (pos + 1);// get number, and rest of line
val = val.substring (0, pos); // lop off some stuff
pos = num.indexOf (" "); // end it with space
if (pos > 0) num = num.substring (0, pos);
}
if (des.length == 0) des = val;
else des = des + ", " + val; // accumulate value
}
}
if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
obj1.item_name.value = des;
obj1.amount.value = Dollar (amt);
if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>
<!--
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;
}
function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
Ý amt = obj1.baseamt.value*1.0;Ý Ý Ý Ý// base amount
Ý des = obj1.basedes.value;Ý Ý Ý Ý Ý Ý// base description
Ý for (i=0; i<obj1.length; i++) {Ý Ý Ý// run entire form
Ý Ý obj = obj1.elements[i];Ý Ý Ý Ý Ý Ý// a form element
Ý Ý if (obj.type == "select-one" &&Ý Ý// just get selects
Ý Ý Ý Ý obj.name == "") {Ý Ý Ý Ý Ý Ý Ý// must be un-named
Ý Ý Ý pos = obj.selectedIndex;Ý Ý Ý Ý // which option selected
Ý Ý Ý val = obj.options[pos].value;Ý Ý// selected value
Ý Ý Ý posÝ = val.indexOf ("@");Ý Ý Ý Ý// price set?
Ý Ý Ý if (pos >= 0) amt = val.substring (pos + 1)*1.0;
Ý Ý Ý posÝ = val.indexOf ("+");Ý Ý Ý Ý// price increment?
Ý Ý Ý if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
Ý Ý Ý posÝ = val.indexOf ("%");Ý Ý Ý Ý// percent change?
Ý Ý Ý if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
Ý Ý Ý posÝ = val.indexOf ("#");Ý Ý Ý Ý// item number?
Ý Ý Ý if (pos > 0) {Ý Ý Ý Ý Ý Ý Ý Ý Ý //Ý yes
Ý Ý Ý Ý num = val.substring (pos + 1);// get number, and rest of line
Ý Ý Ý Ý val = val.substring (0, pos); // lop off some stuff
Ý Ý Ý Ý pos = num.indexOf (" ");Ý Ý Ý // end it with space
Ý Ý Ý Ý if (pos > 0) num = num.substring (0, pos);
Ý Ý Ý }
Ý Ý Ý if (des.length == 0) des = val;
Ý Ý Ý else des = des + ", " + val;Ý Ý // accumulate value
Ý Ý }
Ý }
Ý if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
Ý obj1.item_name.value = des;
Ý obj1.amount.value = Dollar (amt);
Ý if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->
</script>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_number" value="Size"><input type="hidden" name="item_name" value="Print"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="add" value="1"><input type="hidden" name="business" value="me@anytown.com">
<!-- create drop down for the price -->
<!-- add as many selections as you need here
in the following format
<select name="amount">
<option value="dollaramount">nameshownindropdownlist</option>
.
.
.
<option value="x">x</option>
</select> -->
<select name="amount">
<option value="">Print Size and Price</option>
<option value="0.19">4x6 $0.19</option>
<option value="0.79">5x7 $0.79</option>
<option value="3.99">8x10 $3.99</option>
<option value="8.99">11x14 $8.99</option>
<option value="18.99">16x20 $18.99</option>
<option value="24.99">20x30 $24.99</option>
<option value="1.79">Wallet(4) $1.79</option>
<option value="1.69">Wallet(8) $1.69</option>
<option value="1.59">Wallet(12) $1.59</option>
<option value="1.49">Wallet(16) $1.49</option>
</select>
<input type="submit">
<option value="0.19">4x6 $0.19</option>
<option value="4x6 @0.19">4x6 $0.19</option>
I was fully intending to ignore the pm, as per my signature.
But as you asked here, try this. Change each option line from this;Code: [Select]<option value="0.19">4x6 $0.19</option>
to this;Code: [Select]<option value="4x6 @0.19">4x6 $0.19</option>
edit the query to reflect your coppermine prefix.
INSERT INTO CPG_config VALUES ('size1', '10x15');
INSERT INTO CPG_config VALUES ('size2', '13x17');
INSERT INTO CPG_config VALUES ('size3', '20x30');
INSERT INTO CPG_config VALUES ('size4', '30x40');
INSERT INTO CPG_config VALUES ('size5', '50x75');
INSERT INTO CPG_config VALUES ('size1_price', '5');
INSERT INTO CPG_config VALUES ('size2_price', '8');
INSERT INTO CPG_config VALUES ('size3_price', '20');
INSERT INTO CPG_config VALUES ('size4_price', '35');
INSERT INTO CPG_config VALUES ('size5_price', '75');
INSERT INTO CPG_config VALUES ('currency_symbol', '€');
INSERT INTO CPG_config VALUES ('currency', 'EUR');
INSERT INTO CPG_config VALUES ('paypal_email', '');
INSERT INTO CPG_config VALUES ('size1', '10x15');
Hi,
just go into config, and clear the '0' from the unused entries, that should do it.
Select size and frame here
<select onchange = "ReadForm (this.form);">
<option value="{$CONFIG['size1']} @{$CONFIG['size1_price']} ">{$CONFIG['size1']}; {$CONFIG['currency_symbol']}{$CONFIG['size1_price']} </option>
<option value="{$CONFIG['size2']} @{$CONFIG['size2_price']}">{$CONFIG['size2']} ; {$CONFIG['currency_symbol']}{$CONFIG['size2_price']} </option>
<option value="{$CONFIG['size3']} @{$CONFIG['size3_price']}">{$CONFIG['size3']} ; {$CONFIG['currency_symbol']}{$CONFIG['size3_price']}</option>
<option value="{$CONFIG['size4']} @{$CONFIG['size4_price']}">{$CONFIG['size4']} ; {$CONFIG['currency_symbol']}{$CONFIG['size4_price']}</option>
<option value="{$CONFIG['size5']} @{$CONFIG['size5_price']}">{$CONFIG['size5']} ; {$CONFIG['currency_symbol']}{$CONFIG['size5_price']}</option>
<option value="{$CONFIG['size6']} @{$CONFIG['size6_price']}">{$CONFIG['size6']} ; {$CONFIG['currency_symbol']}{$CONFIG['size6_price']}</option>
<option value="{$CONFIG['size7']} @{$CONFIG['size7_price']}">{$CONFIG['size7']} ; {$CONFIG['currency_symbol']}{$CONFIG['size7_price']}</option>
<option value="{$CONFIG['size8']} @{$CONFIG['size8_price']}">{$CONFIG['size8']} ; {$CONFIG['currency_symbol']}{$CONFIG['size8_price']}</option>
<option value="{$CONFIG['size9']} @{$CONFIG['size9_price']}">{$CONFIG['size9']} ; {$CONFIG['currency_symbol']}{$CONFIG['size9_price']}</option>
<option value="{$CONFIG['size10']} @{$CONFIG['size10_price']}">{$CONFIG['size10']} ; {$CONFIG['currency_symbol']}{$CONFIG['size10_price']}</option>
<option value="{$CONFIG['size11']} @{$CONFIG['size11_price']} ">{$CONFIG['size11']}; {$CONFIG['currency_symbol']}{$CONFIG['size11_price']}</option>
<option value="{$CONFIG['size12']} @{$CONFIG['size12_price']}">{$CONFIG['size12']} ; {$CONFIG['currency_symbol']}{$CONFIG['size12_price']}</option>
<option value="{$CONFIG['size13']} @{$CONFIG['size13_price']}">{$CONFIG['size13']} ; {$CONFIG['currency_symbol']}{$CONFIG['size13_price']}</option>
<option value="{$CONFIG['size14']} @{$CONFIG['size14_price']}">{$CONFIG['size14']} ; {$CONFIG['currency_symbol']}{$CONFIG['size14_price']}</option>
<option value="{$CONFIG['size15']} @{$CONFIG['size15_price']}">{$CONFIG['size15']} ; {$CONFIG['currency_symbol']}{$CONFIG['size15_price']}</option>
<option value="{$CONFIG['size16']} @{$CONFIG['size16_price']}">{$CONFIG['size16']} ; {$CONFIG['currency_symbol']}{$CONFIG['size16_price']}</option>
<option value="{$CONFIG['size17']} @{$CONFIG['size17_price']}">{$CONFIG['size17']} ; {$CONFIG['currency_symbol']}{$CONFIG['size17_price']}</option>
<option value="{$CONFIG['size18']} @{$CONFIG['size18_price']}">{$CONFIG['size18']} ; {$CONFIG['currency_symbol']}{$CONFIG['size18_price']}</option>
<option value="{$CONFIG['size19']} @{$CONFIG['size19_price']}">{$CONFIG['size19']} ; {$CONFIG['currency_symbol']}{$CONFIG['size19_price']}</option>
<option value="{$CONFIG['size20']} @{$CONFIG['size20_price']}">{$CONFIG['size20']} ; {$CONFIG['currency_symbol']}{$CONFIG['size20_price']}</option>
</select>
Open your theme/theme.php, and find this code;Code: [Select]Select size and frame here
<select onchange = "ReadForm (this.form);">
<option value="{$CONFIG['size1']} @{$CONFIG['size1_price']} ">{$CONFIG['size1']}; {$CONFIG['currency_symbol']}{$CONFIG['size1_price']} </option>
<option value="{$CONFIG['size2']} @{$CONFIG['size2_price']}">{$CONFIG['size2']} ; {$CONFIG['currency_symbol']}{$CONFIG['size2_price']} </option>
<option value="{$CONFIG['size3']} @{$CONFIG['size3_price']}">{$CONFIG['size3']} ; {$CONFIG['currency_symbol']}{$CONFIG['size3_price']}</option>
<option value="{$CONFIG['size4']} @{$CONFIG['size4_price']}">{$CONFIG['size4']} ; {$CONFIG['currency_symbol']}{$CONFIG['size4_price']}</option>
<option value="{$CONFIG['size5']} @{$CONFIG['size5_price']}">{$CONFIG['size5']} ; {$CONFIG['currency_symbol']}{$CONFIG['size5_price']}</option>
<option value="{$CONFIG['size6']} @{$CONFIG['size6_price']}">{$CONFIG['size6']} ; {$CONFIG['currency_symbol']}{$CONFIG['size6_price']}</option>
<option value="{$CONFIG['size7']} @{$CONFIG['size7_price']}">{$CONFIG['size7']} ; {$CONFIG['currency_symbol']}{$CONFIG['size7_price']}</option>
<option value="{$CONFIG['size8']} @{$CONFIG['size8_price']}">{$CONFIG['size8']} ; {$CONFIG['currency_symbol']}{$CONFIG['size8_price']}</option>
<option value="{$CONFIG['size9']} @{$CONFIG['size9_price']}">{$CONFIG['size9']} ; {$CONFIG['currency_symbol']}{$CONFIG['size9_price']}</option>
<option value="{$CONFIG['size10']} @{$CONFIG['size10_price']}">{$CONFIG['size10']} ; {$CONFIG['currency_symbol']}{$CONFIG['size10_price']}</option>
<option value="{$CONFIG['size11']} @{$CONFIG['size11_price']} ">{$CONFIG['size11']}; {$CONFIG['currency_symbol']}{$CONFIG['size11_price']}</option>
<option value="{$CONFIG['size12']} @{$CONFIG['size12_price']}">{$CONFIG['size12']} ; {$CONFIG['currency_symbol']}{$CONFIG['size12_price']}</option>
<option value="{$CONFIG['size13']} @{$CONFIG['size13_price']}">{$CONFIG['size13']} ; {$CONFIG['currency_symbol']}{$CONFIG['size13_price']}</option>
<option value="{$CONFIG['size14']} @{$CONFIG['size14_price']}">{$CONFIG['size14']} ; {$CONFIG['currency_symbol']}{$CONFIG['size14_price']}</option>
<option value="{$CONFIG['size15']} @{$CONFIG['size15_price']}">{$CONFIG['size15']} ; {$CONFIG['currency_symbol']}{$CONFIG['size15_price']}</option>
<option value="{$CONFIG['size16']} @{$CONFIG['size16_price']}">{$CONFIG['size16']} ; {$CONFIG['currency_symbol']}{$CONFIG['size16_price']}</option>
<option value="{$CONFIG['size17']} @{$CONFIG['size17_price']}">{$CONFIG['size17']} ; {$CONFIG['currency_symbol']}{$CONFIG['size17_price']}</option>
<option value="{$CONFIG['size18']} @{$CONFIG['size18_price']}">{$CONFIG['size18']} ; {$CONFIG['currency_symbol']}{$CONFIG['size18_price']}</option>
<option value="{$CONFIG['size19']} @{$CONFIG['size19_price']}">{$CONFIG['size19']} ; {$CONFIG['currency_symbol']}{$CONFIG['size19_price']}</option>
<option value="{$CONFIG['size20']} @{$CONFIG['size20_price']}">{$CONFIG['size20']} ; {$CONFIG['currency_symbol']}{$CONFIG['size20_price']}</option>
</select>
Just remove the lines for the extra options.
Thanks,
But howcome it only shows for some albums and not others? ???
Thanks Dennis. I think I will just try a clean install then when I get back home. THis may be due to the fact that I first tried your paypal hack and then didnt necessarily clean everything up before installing this one. Probably not a good idea.Actually mine shouldn't interfere with this one at all. Try the admin tools/update database again. That might just clear it up for you.
Thanks again Dennis... but.. no luck ???
Not sure .. sorry I dont really know what i am doing (you have probably gathered that by now ???) I looked int the admin utilities -> Display PhP info... is that what you mean? If so... I dont see it there.
Hi, I'd like to know if there is a way to have a default value for the prices
Most of my photographs have the same price and I'll just need another value for a few shots.
Thanx
http://www.netfalls.com
Is this mod suitable for 1.4.3
https://www.paypal.com/cart/business=your-paypal-email&display=1
Hello All
I have been reading the paypal hack . I have it working on my site, though i notice that it does not work if you do a batch add. I am doing the add from publish to the web from with in XP. how are poele getting this to work as if your uploading many photos you dont want to do it one at a time?
Thanks to all the emails espically casper the friendly ghost !!
Pete