ImJustBrndn Posted September 3, 2006 Share Posted September 3, 2006 I have a shopping cart system set up and I want to have a button that adds $4.00 to the total if the shipment is going international. I would like to know if there is a "add" command or something like that, that I can have this button point to, to add $4.00 to the total value of the shipment. This is the cart code as far as the money values go. $totalvalue = $totalvalue + ($item["price"]*$ses_quan); $subtotal = ($item["price"]*$ses_quan); $shipping = 3.50 + ($totalvalue / 18.00 * 1.00); $finalvalue = $totalvalue + $shipping I would like to add $4.00 only on international shipments. Can someone tell me how to go about it and if there is a way to add that as a variable like.. $finalvalue = $totalvalue + $shipping + $international .... But how would I get it to figure the variable international bc I only want it to be $4.00 on certain shipments. Thanks in advance.Brandon Quote Link to comment Share on other sites More sharing options...
radar Posted September 3, 2006 Share Posted September 3, 2006 The way I would do it -- depending on the cart system -- is look where it defines the tax rate.. then after the tax rate is figured out throw something like this..if ($location == "international") {$shipping = ($shipping) + ('4.00');}Something similar should work... Quote Link to comment Share on other sites More sharing options...
ImJustBrndn Posted September 4, 2006 Author Share Posted September 4, 2006 Ok thanks alot man. Quote Link to comment Share on other sites More sharing options...
Jenk Posted September 4, 2006 Share Posted September 4, 2006 can also do[code]<?php$var += 4;?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.