how do i use PHP script to calculate the shipping prices on my website?
by bhollar
Question by Teartin: how do i use PHP script to calculate the shipping prices on my website?
I’m super new to this. I sell light weight stuff like earrings and bracelets, but i also sell heavy things like wooden Swings and hammocks. I need to have the shipping change to a higher price if someone buys something heavier. the earrings are $ 15 bucks and the swings are upwards of $ 75. maybe i could have the system recognize the difference in price or something, i’m not sure. i hope someone can help. thanks so much! oh yeah, by the way heres the website, if you want to check it out. www.musecolorado.com thanks again!
Best answer:
Answer by Rex M
You need to add an attribute in your product database that has the approximate weight and dimensions of each item. Then it’s just a matter of using your preferred shipping vendor’s calculation API to determine the cost based on your location, the destination, and the dimensions.
It also may be a good idea to include an attribute for how many of a particular item can be shipped together, as shipping one large unit containing several products can be much less expensive. However, I’d start simple and once you get that working, focus on more complex algorithms like package combination.
Also, I would be doing you a disservice not to tell you that your site looks terrible. As it currently stands, I would not buy anything from there. It’s ugly, hard to read, hard to use. Hire a designer, or at least buy a template. There’s a number of options at your disposal for having a good-looking site. I could go on for pages about the usability issues and design problems, but it’s been a long day and my fingers are a bit tired. If you want to discuss some things that can be improved, e-mail me (just click my profile).
What do you think? Answer below!