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
here is the one that is with custom data
http://www.2photo.co.uk/zenphoto/index.php?album=Gallery%2FFootball%2FGresley+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.
Can you post an example of the Custom data you are using?
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.
The only code i put into image.php is
$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
It should work if you add the price list to the album custom field and then use `http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetAlbumCustomData instead of the image one.
Note I never used the paypal plugin nor am I familiar with it at all.
I would also like to set individual pricing for images in albums. But I am having trouble implimenting it.
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
or add
3.Add to album> choose gallery > choose images tab > paste in Special data field - the different pricelist eg
20x30aper 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.
Hi
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.
The plugin's function names have changed since these older posts (a year old!). I haven't used this plugin, but I believe you should be able to change zenPaypalPricelistFromString() with getZenPayPalPriceList() to get it to work.
Hi kagutsuchi
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