krishroman Posted October 30, 2017 Share Posted October 30, 2017 (edited) I am worried about how can i pass smarty variable in paymentoptions hook in prestashop 1.7 version and get that variables in payment page. In prestashop 1.7 paymentoptions hooks looks like this, public function hookPaymentOptions($params) { $payment_options = new PaymentOption(); $action_text = $this->l('Pay by Credit Card with Stripe Payment'); /*$payment_options->setLogo(Media::getMediaPath(_PS_MODULE_DIR_.$this->name.'/views/img/card.png'));*/ $payment_options->setCallToActionText($action_text); $payment_options->setAction($this->context->link->getModuleLink($this->name, 'confirmation', array(), true)); $payment_options->setModuleName($this->name); $payment_options->setAdditionalInformation($this->context->smarty->fetch('module:stripepay/views/templates/hook/checkout.tpl')); $payments_options[] = $payment_options; return $payments_options; } with in this hook how can i pass this secure_key ="FGDWFGF$#%#%!$" values in checkout.tpl files for making successful payments. Now i have keep this as static. Please anybody knows this please assist with this. I hope you understand my question. Edited October 30, 2017 by krishroman (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted November 2, 2017 Share Posted November 2, 2017 you need to add those variables to the smarty engine, and then you can access them in your template $this->context->smarty->assign(array( 'secure_key' => "FGDWFGF$#%#%!$", )); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now