/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $package = parent::getTestRatesData($schema, $errors); $package['srcAddress']['country'] = 'CA'; $data = array('packages' => array($package)); return $data; }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $data = parent::getTestRatesData($schema, $errors); $config = \XLite\Core\Config::getInstance()->CDev->USPS; $package = array('weight' => $data['weight'], 'subtotal' => $data['subtotal'], 'length' => $config->length, 'width' => $config->width, 'height' => $config->height); $data['packages'] = array($package); unset($data['weight']); unset($data['subtotal']); return $data; }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $data = parent::getTestRatesData($schema, $errors); $package = array('weight' => $data['weight'], 'subtotal' => $data['subtotal']); $data['packages'] = array($package); unset($data['weight'], $data['subtotal']); return $data; }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $data = parent::getTestRatesData($schema, $errors); list($data['length'], $data['width'], $data['height']) = $data['dimensions']; unset($data['dimensions']); return array('package' => $data); }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $package = parent::getTestRatesData($schema, $errors); $package['from_postcode'] = $package['srcAddress']['zipcode']; $package['to_postcode'] = $package['dstAddress']['zipcode']; $package['country_code'] = $package['dstAddress']['country']; unset($package['srcAddress']); unset($package['dstAddress']); return array('packages' => array($package)); }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { return array('package' => parent::getTestRatesData($schema, $errors)); }
/** * Get input data to calculate test rates * * @param array $schema Input data schema * @param array &$errors Array of fields which are not set * * @return array */ protected function getTestRatesData(array $schema, &$errors) { $package = parent::getTestRatesData($schema, $errors); $data = array('packages' => array($package)); return $data; }