Adding Weights Parameter to Button Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, our website has been using the PayPal Add to Cart buttons for quite some time with much success. Please note these are not hosted buttons but created manually.
We have decided recently to do weight based shipping so now I have to add the weight= parameters to each button. This will not take me that long to do so I am not worried about that.
What I would like to know is if someone can provide a quick sample of the code needed for the buttons. I guess both parameters would be nice to see but I dont know if both are needed or not?
We are in the USA so Lbs. is the default.
The only other thing to ask is in the shipping calculator we have to change a setting there also correct?
Thank You,
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I must use weight based shipping prices. I know how to assign one weight per button created. You must first set up shipping based on weight in Merchant Services: Shipping Calculator. Once you have completed that, you can access your saved buttons and assign a weight to your button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I already have the shipping calculator set to weight. I just need to see some sample code of how to ad to the button code itself.
Once I see that then I know how to do it for the rest of the buttons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think item weight is a function of the hosted button id... In other words, PayPal knows, not your button code. If you find out differently, I want to know, because that would be very useful to me, because one of my buttons has items with four different weights associated with it and PayPal only lets me set up one weight per button... So I've changed my shipping preferences to "By Amount". It feels jerry-rigged, but I think it will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey! I was trying to figure out my problem and I think I stumbled across an answer for yours. On page 428 of Website Payment Standard Integration Guide, it lists an HTML variable called 'weight_cart'. If you figure out how to use this code, give me an example, cause I really don't know HTML code like I should.
Did this help?

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Invalid sdk meta in Merchant services (Archive)
- Express Checkout - Confirmation inside paypal in Merchant services (Archive)
- PayPal add to cart button - lower shipping on multiple items (in drop down list) in Merchant services (Archive)
- Tag for adding shipping weight to a button in Shipping (Archive)
- SHIPPING QUESTION - Add to Car Buttons in Shipping (Archive)