Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Charging a premium to ship to non US customers


Recommended Posts

I set up the table method for shipping and bsaed shipping charges on total purchase price. It works correctly. I want to charge a 10% premium on shipping to foreign countries.


I tried modifying the checkout_shipping.php file as follows:


First I modified the switch bkock:

case 'international':

if ($order->delivery['country_id'] != STORE_COUNTRY) {

$pass = true;




Then I added this:

if ($foreign==1){

$shipping *= *1.1;



I thought perhaps it didn't like this syntax, so I tried:

$shipping = shipping * 1.1;


Both fail with a the browser saying there is an unexpected $. How do I modify the code to charge this 10% premium on foreign orders? Thanks in advance for any assistance.



Link to comment
Share on other sites

Thank you for the reply, but I just drafted the post too quick and didn't type too well, I noticed it after posting, but didn't see how to modify the post. The actual code I am using is:


//if non us charge 10% more to ship

if ($foreign==1){

$shipping *= 1.1;



I set $foreign to 1 in the case international block, so I think it's set. Where in the php file should I insert the $foreign*=1.1 line? I placed the multiplication code just above the start <html tag, is there a better place?


Thanks for the assistance.



Link to comment
Share on other sites


  $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>

make sure that it is before the ?> line. Note: I don't think that $shipping is the right variable. It looks like $shipping is set to a string value. Perhaps you might find it easier to modify includes/modules/shipping/table.php? Or to use zone shipping with two zones?




Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.

  • Create New...