Jump to content

Recommended Posts

What is the proper way to create 'button' of choice of payment method in the payment module for PrestaShop 1.6? I have created template "/views/templates/hook/payment.tpl":

<div class="row">
    <div class="col-xs-12">
        <p class="payment_module">
            <a class="billon" href="{$link->getModuleLink('billon', 'payment')|escape:'html'}" title="{l s='Pay by Billon' mod='billon'}">
                {l s='Pay by Billon' mod='billon'} <span>{l s='(one-click blockchain payment)' mod='billon'}</span>
            </a>
        </p>
</div>
</div>

I hooked it rewriting method "hookPayment":

public function hookPayment()
{
   $this->smarty->assign(array('module_dir' => $this->_path));
   if ($this->active && Configuration::get('BILLON_CONFIGURATION_OK'))
      return $this->display(__FILE__, 'payment.tpl');
}

The problem is that a class 'col-md-6' is conferred (given, set) on elements 'div' with a class "col-xs-12" in 'buttons' of other payments methods in some shops. Such a class is not conferred (not set) on the element in 'button' of my payment method. After removing the elements 'div' from the template „payment.tpl”, they are not created on a page of choice of the payment method, even if I create another template "/views/templates/hook/payment16.tpl" with these elements and I return $this->display(__FILE__, '/views/templates/hook/payment16.tpl') or $this->display(__FILE__, 'payment16.tpl') in the method "hookPayment". Is it possible that PrestaShop does not set (not confer, not give) class 'col-md-6' in "button" of last payment method? What is recommended and checked way to hook "button" of the payment method in the module for PrestaShop 1.6? Could you help me?

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...