Ejemplo n.º 1
0
 function calculate($shippingMethod)
 {
     try {
         $this->Price = parent::calculate($shippingMethod);
     } catch (Exception $e) {
         ShopOrder::displayExtensionNoticeFor("ShopShipping::calculate");
     }
 }
Ejemplo n.º 2
0
 function isComplete()
 {
     //define your own isComplete rules with MyShopAddress.php
     try {
         return parent::isComplete();
     } catch (Exception $e) {
         //no extension found
         ShopOrder::displayExtensionNoticeFor("ShopAddress::isComplete");
         foreach (self::$required_fields as $field) {
             if (!(strlen($this->{$field}) > 0)) {
                 return false;
             }
         }
         return true;
     }
 }
Ejemplo n.º 3
0
 function isIncompleteCause()
 {
     //define your own isIncompleteCause rules with MyShopOrder.php
     $this->isIncompleteReasons = null;
     try {
         $this->isIncompleteReasons = parent::isIncompleteCause();
         return $this->isIncompleteReasons;
     } catch (Exception $e) {
         ShopOrder::displayExtensionNoticeFor("ShopOrder::isIncompleteCause");
         return null;
     }
 }