nitaish Posted December 18, 2020 Share Posted December 18, 2020 Hello Everyone, Can you help us with below query How to access .tpl file data to hook file. We are trying to select one currency payment method INR onclick i want to show only two radio buttons banktransfer and ccavenuev2. How can i control it through hook. If customer currency is INR it should show Bank transfer and ccAvenue gateway option else banktransfer and stripe. We were able to achive this via .tpl modification but we need this to be execute through a hook and not editing any tpl files. i can do this.... function MySmartyModifierHook(array $vars) { global $smarty; if ($vars['templatefile'] != 'paymentmethod'){ return 'this is paymentmethod area'; // ... your code here ... } class Geolocation{ public function sm_loc($params, Smarty_Internal_Template $template) { return "100.70"; } } // Register the Smarty plugin $smarty->registerPlugin('modifier', 'myModifier', array('Geolocation', 'sm_loc')); } // Assign the hook add_hook('ShoppingCartCheckoutOutput', 1, 'MySmartyModifierHook'); 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted December 19, 2020 Share Posted December 19, 2020 Using the hooks mentioned in and modifying them to check for the client's currency instead might work for you. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.