Pages (2):    1 2
Member
Member
sbillard   30-05-2008, 01:44
#21

You should not have the in your theme where you want the button. See also the documentation linked by theusage information` link on the plugin page.

Member
Member
Vaisak   30-05-2008, 02:34
#22

Nevermind my problem, now it seems to work. Thanks anyway!

Member
Member
mikecp   03-06-2008, 14:14
#23

Managed to integrate this plug-in fairly easily as a thickbox but I wondered if anyone would be kind enough to help with my struggles.

What I am ideally looking for, is a set of radio buttons that take their values from the customdata field. The customer then just selects the size and finish from the options and presses the Buy Now button.

Options would be, for example:
6x4 Glossy 5.00
8x10 Glossy 10.00
22x18 Canvas 85.00

My knowledge of php is very limited and the documentation on the site seems to be geared towards developers rather than photographers, so I would appreciate examples that I can play with to get the desired result.

Thanks in advance

Member
Member
sbillard   03-06-2008, 17:15
#24

The Paypal plugin uses a selection drop-down to select the item/price. You would really have to learn PHP if you want to change that to radio buttons. However, if all you want is to have different pricing options based on the image there is a much simpler solution. (You will still have to write some PHP, though.)

The documentation for the plugin is here: http://www.zenphoto.org/documentation/zenphoto/_plugins---zenPaypal.php.html

You can put your 'price list' into the custom data field of the image and pass it on to the paypal button using the zenPaypalPricelistFromString() function to convert it from a string of prices to the array of prices that zenPaypal() requires. See the function definition for the format of the pricelist string.

Member
Member
mikecp   03-06-2008, 18:12
#25

Thanks for the reply.
One of the biggest draw backs I can see with the drop-downs is that it doesn't display the price until after the visitor has clicked to go to PayPal. If that could be accomplished that would go some way to mitigating the lack of radio buttons.

I have read the documentation but I am struggling to understand it due to my lack of php knowledge. My best guess is that I need a statement such as:

zenPaypalPricelistFromString(getCustomData())

Am I close?

Thanks

Member
Member
sbillard   03-06-2008, 20:38
#26

I think we can modify the plugin to show the price. I will look into that.

Member
Member
mikecp   03-06-2008, 20:49
#27

That would be excellent if you can, and well worthy of a donation. Thank you.

Member
Member
DrSlony   03-06-2008, 22:16
#28

I think it would be ideal if zenphoto implemented by default an extra field in the edit album page in the admin panel where we can set prices (using a string) for individual images/albums, and turn off paypal support for individual images/albums.

Member
Member
sbillard   03-06-2008, 23:55
#29

Tonight's build will have a new function--zenPaypalPrintPricelist() this will create a link on your image page. Clicking on the link will expose a price list table.

DrSlony: We have such a field, it is called custom_data. The zenPaypal documentation will tell you the format for the string and how to pass it to the zenPaypal() function. (And now the zenPaypalPrintPricelist() function as well.)

The only theme which has zenPaypal included is the example theme [because it is an example....] I suggest you use the following code for accomplishing what you describe:

`$prices = getCustomData();

if (!empty($prices)) {

$pricelist = zenPaypalPricelistFromString($prices);

zenPaypal($pricelist);

}`

Member
Member
DrSlony   04-06-2008, 00:29
#30

Thanks a lot sbillard! I will try that!

Junior Member
Junior Member
landslide   15-07-2008, 02:47
#31

Just to provide an update for this. I wanted to use PayPal's shopping cart feature rather than it's single-item buy function, so I edited the code in zenPaypal.php. I followed these instructions from the paypal site;

https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_to_cart_outside

Perhaps there could be an option in the administrator panel to switch between these modes?

Member
Member
sbillard   15-07-2008, 15:56
#32

Perhaps you could create a ticket and attach your modified code. If you do I will look at making the mode an options. (Or perhaps the default as we did on Google Checkout.) Depends on if anyone really wants to stick with the current mode if checkout mode is available.

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