Forum

Thread tagged as: Question, Gallery, PayPal

Turn gallery items (paintings/drawings) into PayPal shop products

Is it possible to take the items of an existing gallery app and use them to create PayPal shop items - perhaps using custom dynamic field types?

Each gallery item has custom fields such as price, size, description etc. I would like a PayPal shop button on each gallery item to allow the ability to purchase each item individually - quantity is not a factor since each item is always totally unique.

Any direction on how to approach this would be greatly appreciated.

I understand that using PayPal checkout buttons manually might be the solution but if it's possible to integrate with the Shop app I think that would be preferable for ease of use.

Many thanks chris

Chris Henry

Chris Henry 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't see a way of integrating it into the Shop app without re-adding each of the items as shop products.

Thanks Drew - I'll find another solution.

Hi Drew

So I've found a Paypal mini-cart solution (minicart.js) that should do the trick (also looking at Stripe API). Question - what approach would you take to updating the database record on successful payment (success page) that simply marks the gallery item as sold (checkbox field and resulting front end behaviour already implemented)?

My initial thinking was to pass the imageID as a url string to the success page which is fine but I'm not sure how to directly talk to the database using the Perch API - I was looking at PerchDB for instance but need a little nudge/example code here on how to get started - prefer to talk to perch database using the API as the docs suggest. Do I have to use the 'App' thinking to achieve this?

Many thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you'd need an app to do that. The Gallery app doesn't have its own API as such.

Cheers!