Inheritance: extends OrderModifier
 public function TableTitle()
 {
     if ($country = $this->Country()) {
         $countryList = SiteConfig::current_site_config()->getCountriesList();
         return _t('SimpleShippingModifier.ShipToCountry', 'Ship to {Country}', '', array('Country' => $countryList[$country]));
     } else {
         return parent::TableTitle();
     }
 }
 public function TableTitle()
 {
     if ($country = $this->Country()) {
         $countryList = SiteConfig::current_site_config()->getCountriesList();
         return sprintf(_t("SimpleShippingModifier.SHIPTO", "Ship to %s"), $countryList[$country]);
     } else {
         return parent::TableTitle();
     }
 }
 /**
  * Convert shipping and tax columns into modifiers
  *
  * Applies to pre 0.6 sites
  */
 public function migrateShippingValues($order)
 {
     //TODO: see if this actually works..it probably needs to be writeen to a SQL query
     if ($order->hasShippingCost && abs($order->Shipping)) {
         $modifier1 = ShippingModifier::create();
         $modifier1->Amount = $order->Shipping < 0 ? abs($order->Shipping) : $order->Shipping;
         $modifier1->Type = 'Chargable';
         $modifier1->OrderID = $order->ID;
         $modifier1->ShippingChargeType = 'Default';
         $modifier1->write();
         $order->hasShippingCost = null;
         $order->Shipping = null;
     }
     if ($order->AddedTax) {
         $modifier2 = TaxModifier::create();
         $modifier2->Amount = $order->AddedTax < 0 ? abs($order->AddedTax) : $order->AddedTax;
         $modifier2->Type = 'Chargable';
         $modifier2->OrderID = $order->ID;
         //$modifier2->Name = 'Undefined After Ecommerce Upgrade';
         $modifier2->TaxType = 'Exclusive';
         $modifier2->write();
         $order->AddedTax = null;
     }
 }