Jump to content

get user zone in payment page


Jason hokan

Recommended Posts

I add this code under hookPayment function in cashondelivery module plugin ( in  cashondelivery.php file)
 

public function hookPayment($params)
{
     // add this code under your hookpayment function:
    global $smarty;

    $address = new Address(intval($params['cart']->id_address_delivery));

    $smarty->assign(array(
        'address' => $address,
    ));


}

and after that

add this code on /cashondelivery/views/templates/hook/payment.tpl

{if $address->id_state == 111 }

   ....

{/if}

and it is resolved.

Edited by Jason hokan (see edit history)
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...