Пример #1
0
 /**
  * The function updates shipping in Cart.
  * 
  * @access public
  * @return string The JSON response.
  */
 public function shipping()
 {
     $Cart = Cart::getCart();
     $Shipping = new Shipping();
     $Shipping = $Shipping->findItem(array('Id = ' . Request::get('id')));
     $Cart->setShipping($Shipping);
     $Cart->save();
     $response['grand'] = Price::show($Cart->getGrandTotal());
     $response['result'] = 1;
     return $this->outputJSON($response);
 }
Пример #2
0
    if ($i == 'a') {
        break;
    }
    Console::left(count(${$i}), 4);
    Console::left(File::getFilesize($stats['size'][$i], 'b,K,M,G'), 5);
    Console::left($stats['lines'][$i] . 'L', 8);
    Console::write('|  ');
}
Console::left(count($m) + count($c) + count($v), 4);
Console::left(File::getFilesize($stats['size']['a'], 'b,K,M,G'), 5);
Console::left($stats['lines']['a'] . 'L', 8);
Console::writeln('|');
Console::write('\\');
Console::write(str_repeat('=', 98));
Console::writeln('/');
Console::writeln();
if ($argv[1]) {
    $sign = '$';
    $time = $price = 0;
    $arr = explode('/', $argv[1]);
    if (count($arr) == 2) {
        $price = $stats['lines']['a'] / $arr[1];
        $sign = $arr[0] ? $arr[0] : $sign;
    } else {
        $price = $stats['lines']['a'] * $arr[1];
    }
    $time = round($stats['lines']['a'] / 1500);
    Console::writeln('Price: ' . Price::show($price) . $sign . ', Time: ' . $time . ' days.');
    Console::writeln();
}
//Console::writeln('DONE');