Esempio n. 1
0
 public function afterClone()
 {
     //get gateway limits
     $sql = 'SELECT `method_id`,
                 `limit_type`,
                 `orders_max`,
                 `orders_count`,
                 `amount_max`,
                 `amount_count`
         FROM `gateway_limits`
         WHERE `gateway_id`=?i';
     $result = self::$_msql->getAll($sql, (int) $this->cloneId);
     if ($result) {
         foreach ($result as $array) {
             $gatewayLimitModel = new GatewayLimit();
             $gatewayLimitModel->fillFromArray($array);
             $gatewayLimitModel->gateway_id = $this->gateway_id;
             $gatewayLimitModel->save();
             unset($gatewayLimitModel);
         }
     }
     return true;
 }