What i would like to do is set prices for individual albums and photo's with paypal plugin. I have put this code into image.php
'$prices = getImageCustomData();
if (!empty($prices)) {
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}'
This then loads the data from the Custom Data and puts it in the drop down menu but it does not show a new Price list only the default one i set in admin toolbox.
Also i cant get it to add the checkout to an entire folder only individual photo's. What am i doing wrong?
My website for testing is
http://www.2photo.co.uk/zenphoto
Comments
I visited your site, but did not see any Paypal ordering items.
http://www.2photo.co.uk/zenphoto/index.php?album=Gallery/Football/Gresley+Rovers+vs+Lincoln+United&image=0010.jpg
but when i get the custom data working in the price it does not print the new pricelist with the data from the custom data only the default i put in when i was setting up zenpaypal in the admin plugin options.
If i put zenpaypal() instead of
$prices = getImageCustomData();
if (!empty($prices)) {
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}
the custom data is not used but the zenpaypal() works on every image but at the same prices.
The reason I ask is that from my limited knowledge of php you are still asking for the standard paypal price list(zenPaypal($pricelist);) and hence that is what you are getting.
I abandoned the use of this plugin myself and went with a third party cart system built into ZP, however I am interested to watch and read about how this paypal (and other payment systems) get integrated better into ZP.
cheanged the zenpaypal.php to this from
<?php
if ($pricelistlink) {
zenPaypalPrintPricelist($pricelist, $text, $textTag, $idtag);
}
?>
Can i add custom data for an album so it applies the prices to all pics in that album instead of doing each picture at a time?
Thanks
Ian
Sorry, there is no mass-edit for images. You could do that with an SQL query, though. There is probably an SQL management tool on your site such as phpMyAdmin.
$prices = getImageCustomData();
if (!empty($prices)) {
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}
do i need to put something else to make it check for album cutom data?
sorry for sounding thick but i hae never dealt with php before.
Ian
Note I never used the paypal plugin nor am I familiar with it at all.
Thought I would share my lines of code that I put in image.php to get "getImageCustomData" and "getAlbumCustomData" to work together:
`
<?php $prices = getImageCustomData();
if (!empty($prices))
{
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}else {$prices = getAlbumCustomData();
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}
?>
`
Took me a while to realize that I had to remove ";" after if empty to get it working...
regards, pischla
`
<?php $prices = getImageCustomData();
$aprices = getAlbumCustomData();
if (!empty($prices))
{
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}elseif (!empty($aprices))
{
$pricelist = zenPaypalPricelistFromString($aprices);
zenPaypal($pricelist);
}
?>
`
/pischla
Paypal plugin installed fine. Super in fact. I also got the Nopaypal option working no problem. Insrtructions were very clear.
However when i try the last two blocks of code above in image.php. It doesn't work.
Can someone help confirm I have the following correct.
1.Add to image.php
<?php $prices = getImageCustomData();
if (!empty($prices))
{
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}else {$prices = getAlbumCustomData();
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}
?>
or add
<?php
$prices = getImageCustomData();
if (!empty($prices)) {
$pricelist = zenPaypalPricelistFromString($prices);
zenPaypal($pricelist);
}
?>
2. Add to options>plugins> zenpaypal > the pricelist field eg
4x6:Paper Matte Thin=5.75|8x10:Xtrem Glossy=20.00|11x14:Paper=15.35
3.Add to album> choose gallery > choose images tab > paste in Special data field - the different pricelist eg
20x30:Paper Matte Thin=5.75|8x10:Xtrem Glossy=50.00
is that correct formatting for the Special data field??
Fatal error: Call to undefined function zenpaypalpricelistfromstring() in /home/public_html/gal2/themes/mytheme/image.php on line 77
Can anyone see what i missed or i am doing wrong.
Many thanks for any guidance.
Has anyone got multiple price lists working on the paypal plugin?
Or have I misinterpreted the features built in?
I followed instructions as far as I could,I have been through plugin help plus checked instructions on all relevant forum posts. I am still getting the following error.
Fatal error: Call to undefined function zenpaypalpricelistfromstring() in /home/public_html/gal2/themes/mytheme/image.php on line 77
I inserted data in the image special/custom data field.
Any guidance really appreciated.
Thank you for the reply. I tried this and it has removed the error which is a step in the right direction... but still no joy getting it all working. No change in status. The default payment list still displays.
Any other guidance much appreciated
cheers
e