Adding Weights Parameter to Button Code

galaxymednet
Contributor
Contributor

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

Login to Me Too
5 REPLIES 5

galaxymednet
Contributor
Contributor

Anyone can poste some sample code please?

Login to Me Too

fcoffeehouse
Contributor
Contributor

 

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.

 

Login to Me Too

galaxymednet
Contributor
Contributor

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.

Login to Me Too

fcoffeehouse
Contributor
Contributor

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.

Login to Me Too

fcoffeehouse
Contributor
Contributor

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?

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.