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
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.