PrestaShopCorp / ogone

0 stars 7 forks source link

eu-legal additions #2

Closed jBangiev closed 9 years ago

Quetzacoalt91 commented 9 years ago

For this module, I can simply call the hook Payment in yours, because we need the assignments made inside, but we don't care about the return.

    public function hookDisplayPaymentEU($params) 
    {
        $this->hookPayment($params);

        $logo = $this->_path ."ogone.gif";
        return array(
                'cta_text' => $this->l('Ogone'),
                'logo' => $logo,
                'form' => $this->context->smarty->fetch(dirname(__FILE__).'/ogone_eu.tpl')
            );
    }
studiokiwik commented 9 years ago

whait is @hiddenSubmit in ogone_eu.tpl ?

jBangiev commented 9 years ago

Yes, we can call the hook Payment, but it contains extra callings of methods(like $this->display(FILE, 'ogone.tpl');). So i think we don't need make any changes in hookDisplayPaymentEU.

jBangiev commented 9 years ago

Eu_legal module use this token ( @hiddenSubmit ) for replacing with standart (for eu_legal) input on form. It adds hidden input.

$option['form'] = strreplace('@hiddenSubmit', "< input style='display:none' type='submit' id='submit$option_name'>", $option['form']);

Quetzacoalt91 commented 9 years ago

Hi @jBangiev,

I know there is this this extra call like $this->display(FILE, 'ogone.tpl');, but I guess that if take care to not return or show it, we won't have collision with eu-legal.

jBangiev commented 9 years ago

I've changed it

Quetzacoalt91 commented 9 years ago

Hi @jBangiev and @alexsimple,

This PR has just been merged, thanks for your contribution.

Best regards