Jump to content

hand coded paypal buttons - setting quantity


paulonline2501

Recommended Posts

I'm trying to set the quantity of an item in an HTML Paypal button.

I'm creating the buttons dynamically using a HTML template and values from my products table in my database [php/mysql].

I know you can set the quantity of an an item in the paypal buttons you can make on the the paypal website, but I want to make the buttons dynamically and avoid this step.

I have generated the rest of the button without problem - they currently have name, price, postage etc.

The one thing I can't do is set the quantity of the item.

So the problem at the moment is, I have a lot of one off items. I want to be able to set the quantity to 1. this way I can control whats being sold. once the item is sold I will use the Paypal IPN to update my databases stock level.

At the moment the user can add more than one of the item in the paypal basket. This is a problem where there is only one item. If any one knows ho w to set the quantity of an item in an dynamically made HTML Paypal buy now button please let me know.

Link to comment
Share on other sites

what's the code you have so far? Sounds like for one-off items, you need to track (client side) if they've been added to the cart or not, and if so, disable the user's ability to add more, by hiding the button, or showing a message, etc.

 

Seeing your actual implementation would be helpful, by providing the relevant parts of the code. (like the add button function/method, whatever).

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...