https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/rabbithabit.com/public_html/application/views/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/rabbithabit.com/public_html/application/views/ajax/ajax_change_shipping_fee.php
<?php 

$free_shipping_type = 
$this->db->select('free_shipping_type')
->from('configuration')
->where('id_configuration',1)->get()->row()
->free_shipping_type;

$get_grand_total = 0;
foreach ($this->session->userdata('shipping_cart') as $item){
	$get_grand_total += $item['subtotal'];
}

$q_config_cond = $this->db->select('type_cond_prov_free_shipping, cond_more_prov_free_shipping, cond_less_prov_free_shipping')->from('configuration')->where('id_configuration',1)->get()->row();

$condition_freeshipping = false;

if($free_shipping_type == 'region') {
	$selected_region_province = 
	$this->db->select('*')
	->from('free_shipping_region')
	->where('configuration_id',1)
	->where('province_id',$id_province)
	->get();

	if($selected_region_province->num_rows() > 0){   
		switch ($q_config_cond->type_cond_prov_free_shipping) {
			case 'more_than':
				if ($get_grand_total >= $q_config_cond->cond_more_prov_free_shipping) {
					$condition_freeshipping = true;
				}else{
					$condition_freeshipping = false;
				}
				break;
			case 'less_than':
				if ($get_grand_total <= $q_config_cond->cond_less_prov_free_shipping) {
					$condition_freeshipping = true;
				}else{
					$condition_freeshipping = false;
				}
				break;
			
			default: 
				$condition_freeshipping = true;
				break;
		}
	} 
}
  
?>

<?php $count_shipping = 0; ?>

<?php
	//convert $shipping_method_ids to array
	$shipping_method_ids_array = explode(',', $shipping_method_ids);
?>

<?php foreach ($shipping_method_ids_array as $shipping_id) : ?>

	<?php $count_shipping++ ; ?>

	<?php if($shipping_id == 2): ?>
		<?php
			//get self delivery fee from configuration table
			$this->db->select('shopdelivery_fee')->from('configuration')->where('id_configuration', 1);
			$shopdelivery_fee = $this->db->get()->row()->shopdelivery_fee;
			$shipping_name = 'Express Courier';
			$total_shipping_fee = $shopdelivery_fee;
		?>
	
	<?php else : ?>
		<?php 
			$shipping_info = calculate_shipping_fee($shipping_id, $warehouse_id, $product_id, $id, $qty, $shipping_id_subdistrict); 
			$shipping_name = $shipping_info['shipping_name'];
			$total_shipping_fee = $shipping_info['total_shipping_fee'];

			if($shipping_id == 3){
				$shipping_name = 'Regular'; 

			}
		?>
	<?php endif; ?>	

	<?php if($total_shipping_fee > 0 || isset($shipping_info['free_shipping_applied'])) : ?>
			
		<li>
			<?php 
			// echo $selected_shipping_method_id."<br>";
			// echo $shipping_id."<br>";
			 ?>
			<input type="radio" class="shipping_method<?= $rowid; ?>" name="shipping_method<?= $rowid; ?>" value="<?= $shipping_id; ?>" 
			<?php if($selected_shipping_method_id == $shipping_id) : ?> 
				checked 
			<?php endif; ?>	
			> <?= ucwords($shipping_name); ?> 
			<?php if($condition_freeshipping == true) : ?>
				(<?= ucwords(lang('free')); ?>)
			<?php else : ?>
				<?php if($shipping_id == 5) : ?>
					(TBC)
				<?php else : ?>
					(IDR <span id="shippingFee<?= $count_shipping; ?>"><?= number_format($total_shipping_fee); ?></span>)
				<?php endif; ?>	
			<?php endif; ?>	
		</li>	

	<?php endif; ?>
<?php endforeach; ?>







https://t.me/RX1948 - 2025