Sorry for my money questions. This is my very first time using the couch art system.
My problem: at the cart.php page I want customers to be able to choose between bank transfer or mobile money transfer. If mobile money transfer I want the total cost to include the shipping fee or 1% of the total cost which I have set inside the cart config. If via bank transfer then there should be no shipping fee. I tried following this tutorial but I'm not a php person so found it difficult understanding the process.
Any help will be greatly appreciated.
My problem: at the cart.php page I want customers to be able to choose between bank transfer or mobile money transfer. If mobile money transfer I want the total cost to include the shipping fee or 1% of the total cost which I have set inside the cart config. If via bank transfer then there should be no shipping fee. I tried following this tutorial but I'm not a php person so found it difficult understanding the process.
- Code: Select all
function get_shipping(){
global $KSESSION;
$cost = 0;
$items = $this->count_shippable_items;
if( !$items ) return 0; // No item in the cart that needs shipping
// First check if a discount coupon provides free shipping
if( $KSESSION->get_var('coupon_found') &&
$this->sub_total > $KSESSION->get_var('coupon_min_amount') &&
$KSESSION->get_var('coupon_free_shipping') ){
$KSESSION->set_var( 'free_shipping_applied', 1 );
return 0;
}
else{
$KSESSION->set_var( 'free_shipping_applied', 0 );
}
..
..
}
Any help will be greatly appreciated.