aboutsummaryrefslogtreecommitdiffstats
path: root/public/catalog/model/extension/shipping/pilibaba.php
blob: 466cc02e2dba0135f9b7c3ceed03922431676732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
class ModelExtensionShippingPilibaba extends Model {
	function getQuote($address) {
		$this->load->language('extension/shipping/pilibaba');

		$status = true;

		$method_data = array();

		if ($status) {
			$quote_data = array();

			$quote_data['pilibaba'] = array(
				'code'         => 'pilibaba.pilibaba',
				'title'        => $this->language->get('text_description'),
				'cost'         => $this->config->get('payment_pilibaba_shipping_fee'),
				'tax_class_id' => 0,
				'text'         => $this->currency->format($this->tax->calculate($this->config->get('payment_pilibaba_shipping_fee'), 0, $this->config->get('config_tax')), $this->session->data['currency'])
			);

			$method_data = array(
				'code'       => 'pilibaba',
				'title'      => $this->language->get('text_title'),
				'quote'      => $quote_data,
				'sort_order' => 1,
				'error'      => false
			);
		}

		return $method_data;
	}
}