Pages (2): 1 2   
Member
Member
Oakey22   2009-02-09, 22:23
#1

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

Member
Member
sbillard   2009-02-09, 23:16
#2

I am not sure I am following you. To have any pricelist show you need to set the second parameter to zenPaypal() to true. Since it is not so set there would be no pricelist link displayed.

I visited your site, but did not see any Paypal ordering items.

Member
Member
Oakey22   2009-02-10, 06:12
#3

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.

Member
Member
gwmbox   2009-02-10, 13:08
#4

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.

Member
Member
Oakey22   2009-02-10, 15:20
#5

the custom data is 10x15:glossy=5.00 which works on the price list that is a drop down menu but does not print this info on my page so you can see it all the time.

Member
Member
Oakey22   2009-02-10, 16:18
#6

Got the individual price list now working,
cheanged the zenpaypal.php to this from

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

Member
Member
sbillard   2009-02-10, 19:20
#7

I'll get your fix into the nightly build tonight. Thanks.

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.

Administrator
Administrator
acrylian   2009-02-10, 19:45
#8

If you really want all images in one album to have the same pricelist you could use the album custom data the same way as the image one.

Member
Member
Oakey22   2009-02-10, 21:31
#9

acrylian, i did do that but it does not display anything when i do that. no paypal buttons or anything.

Member
Member
sbillard   2009-02-11, 02:46
#10

If nothing is displaying, usually there is some kind of error occurring. What was your code to use the album custom data?

Member
Member
Oakey22   2009-02-11, 06:07
#11

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

Administrator
Administrator
acrylian   2009-02-11, 10:41
#12

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.

Member
Member
Oakey22   2009-02-11, 15:25
#13

What code would i put in if i wanted it to check to see if the image custom data is empty, then if it is empty use the album data?

Administrator
Administrator
acrylian   2009-02-11, 18:04
#14

Maybe http://www.php.net/manual/en/function.empty.php

Member
Member
pischla   2009-05-29, 07:02
#15

Hi!
Thought I would share my lines of code that I put in image.php to get "getImageCustomData" and "getAlbumCustomData" to work together:

`

`
Took me a while to realize that I had to remove ";" after if empty to get it working...

regards, pischla

Member
Member
pischla   2009-05-29, 16:49
#16

Here's a refined code that hides the paypal function if there are no prices for an album or image:

`

`
/pischla

Member
Member
lainyrache   2010-05-13, 12:52
#17

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

  1. Add to options>plugins> zenpaypal > the pricelist field eg
    4x6aper Matte Thin=5.75|8x10:Xtrem Glossy=20.00|11x14aper=15.35

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.

Member
Member
lainyrache   2010-05-28, 09:19
#18

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.

Member
Member
kagutsuchi   2010-05-28, 14:27
#19

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.

Member
Member
lainyrache   2010-06-07, 10:28
#20

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

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.