Jump to content

hand coded paypal buttons - setting quantity

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...