Member
Member
timfl   2008-10-30, 05:42
#1

I am trying to implement individual pricing in Google Checkout. Here is what I put in the [b]image.php[/b] page:

Quote:

I entered default values for [b]$pricelist[/b] in the [b]GoogleCheckout.php
[/b] file, and entered a pricelist string in the [i]customdata[/i] field for one of my images that needs special pricing. But it shows the default pricing. Has anyone done this and can they give me a little help?

Thanks very much,
Tim

Member
Member
sbillard   2008-10-30, 16:52
#2

You should pass the pricelist to the googleCheckout() function. Changing the option defaults will do nothing after the first execution of the script.

Review the documentation of the plugin for details.

Member
Member
timfl   2008-10-30, 17:10
#3

Thanks, sbillard, this is an amazing piece of software, you should be very proud. Can you explain a bit more how to pass the pricelist to the function? I read the docs, but I'm still learning when it comes to scripting.

Which file should I be working in?

Member
Member
sbillard   2008-10-30, 23:20
#4

Pricelists are arrays of pricing elements. The index of the element is the 'name' of the price item--say "8x10 glossy" and the value of the element is the price. So a custom price list might be array('8x10 glossy'=>25.00, '16x20 matte'=>45.00). You pass this as the parameter to googleCheckout().

Since you say you are storing the custom price information in the customdata field, you will have to convert it to an array before passing. To do this use the GoogleCheckoutPricelistFromString() function. Your custom data should be in the form size:media=price repeated for as many price items as you have.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.