Enabling 'Advanced Checkout Page' in Advanced EU Compliance hides some payment methods



  • In 1.0.2, some payment methods are not shown when I activate ‘Advanced Checkout Page’ in the Advanced EU Compliance module.

    The payment method, a third party module, is in the hook area ‘displayPaymentEU’.

    Is there anything else I need to pay attention to so that the payment method shows?



  • Nobody?



  • Not familiar with your EU payments module but my offline credit card module requires three hooks or else it won’t work.

    displayadminorder
    displaypayment
    displaypaymentreturn



  • @mdekker Ah, then the module probably doesn’t have that hook. Is it an easy fix, just insert a piece of code somewhere in the module?



  • The displayPaymentEU hook first came along with EU legal, the (German) previous version to the (French) Advancedeucompliance. For people with German language skills it may be helpful to read Chris Gurk’s excellent documentation.
    Here you’ll find a description how it works and what all the hooks of AEUC are good for.
    displayPaymentEU will be hooked by AEUC during installation. So in some cases it is sufficient to reinstall or refresh the formerly installed payment modules so that they can be integrated. In other cases it is necessary to rework the payment modules’ hooks, too.



  • The module has the displayPaymentEU hook, so it looks like it is something else. Any ideas on how to figure out what it might be? It’s only the Advanced AEUC checkout where the payment method isn’t shown. It’s shown on the standard AEUC checkout.



  • Afaik every payment module has to be initiated by AEUC. Is it listed in function registerModulesBackwardCompatHook of advancedeucompliance.php?



  • When setting up the AEUC and the native Stripe module, I do not see all Stripe options in the order completion.

    1_1501604804487_FireShot Capture 30 - Bestellung - Heimtierb_ - https___heimtierbedarf-service.de_schnell-bestellung.png 0_1501604804486_FireShot Capture 29 - Modules • Heimti_ - https___heimtierbedarf-service.de_admin9475fmmae_index.php.png



  • @mdekker
    That would be great, because the module is with a small reason, why I would switch to TB.



  • @mdekker many thanks michael - it looks good, but i have 2 divs with stripe now - test in 2 shops

    0_1501694765408_FireShot Screen Capture #224 - 'Bestellung - Heimtierbedarf Service' - heimtierbedarf-service_de_schnell-bestellung.png



  • @mdekker 🥁 👍
    thanks - must clean my glasses 🤐



  • @Occam Thanks, a good tip!

    So, it looks like the Bitcoin HD module was based on the “Pay by Check” module. I found this in it’s file:

    public function hookDisplayPaymentEU($params)
        {
            if (!$this->active || !$this->checkCurrency($params['cart']) || !$this->checkConfiguration()) {
                return;
            }
    
            $payment_options = array(
                'cta_text' => $this->l('Pay by Check'),
                'logo' => Media::getMediaPath(_PS_MODULE_DIR_ . $this->name . '/cheque.jpg'),
                'action' => $this->context->link->getModuleLink($this->name, 'validation', array(), true)
            );
    
            return $payment_options;
        }
    

    And then I also noticed that the payment method “Pay by Check” is shown, even though I don’t have it activated. It turns out the AEUC translation label for the module is “Pay by Check”. I changed that now to “Pay by Bitcoin” and the payment method is shown now in AEUC as “Pay by Bitcoin”.

    Do let me know if there is anything else I should do to clean the module up a bit.



  • Also, why do the payment methods look (different logos) and why are they named differently depending on whether ‘Advanced Checkout Page’ in the Advanced EU Compliance module is activated? Shouldn’t their names and logos be consistent throughout?



  • That’s strange, because AEUC just uses the modules’ file displayPaymentInfo.tpl in this place. Therefor you need to check if all files provide the same informations.



  • @Occam I clicked through the different modules, but I didn’t find in the file displayPaymentInfo.tpl. Where should I look?



  • /modules/<moduledir>/views/templates/hook
    Oops, sorry, that was PS 1.5!
    In 1.6 (and thirty bees?) The file is called just payment.tpl



  • @Occam Is it maybe payment.tpl and not displayPaymentInfo.tpl? I don’t have the latter, for example in bankwire and Stripe, but I do have the former in those modules. Though eg not in the PayPal module.



  • Ok, my test invironment doesn’t support SSL, that’s why I cannot check if the following modifications work:

    1. Open /modules/stripe/views/templates/hook/payment.tpl

    2. Apply these changes from line 23 on:

      <div class="col-xs-12 col-md-12">
      	<p class="payment_module" id="stripe_payment_button">
      		<a id="stripe_payment_link" href="#" title="{l s='Pay by Credit Card' mod='stripe'}">
      			<!--<img src="{$module_dir|escape:'htmlall':'UTF-8'}/views/img/stripebtnlogo.png" alt="{l s='Pay by Credit Card' mod='stripe'}" width="64" height="64" />-->
      			<img src="{$this_path_stripe}stripebtnlogo.png" alt="{l s='Pay by Credit Card' mod='stripe'}"  width="86" height="49" />
      			{l s='Pay by Credit Card' mod='stripe'}
      			{if $showPaymentLogos}
      				<!--<img src="{$module_dir|escape:'htmlall':'UTF-8'}/views/img/creditcards.png" alt="{l s='Credit cards' mod='stripe'}" />
      				{if $stripe_alipay}<img src="{$module_dir|escape:'htmlall':'UTF-8'}/views/img/alipay.png" alt="{l s='Alipay' mod='stripe'}" />{/if}
      				{if $stripe_bitcoin}<img src="{$module_dir|escape:'htmlall':'UTF-8'}/views/img/bitcoin.png" alt="{l s='Bitcoin' mod='stripe'}" />{/if}-->
      				<img src="{$this_path_stripe}creditcards.png" alt="{l s='Credit cards' mod='stripe'}" />
      				{if $stripe_alipay}<img src="{$this_path_stripe}alipay.png" alt="{l s='Alipay' mod='stripe'}" />{/if}
      				{if $stripe_bitcoin}<img src="{$this_path_stripe}bitcoin.png" alt="{l s='Bitcoin' mod='stripe'}" />{/if}
      			{/if}
      		</a>
      	</p>
      </div>
      

    Paypal seems to choose depending on the country its logo from /modules/paypal/logo.xml. I guess this is started by the file /modules/paypal/views/templates/hook/column.tpl. But I’m not sure.



  • Checked it, seems so! I wasn’t aware of it. Which means, the hook always expects the module’s logo in the modules’ main directories. And moreover, the file extension .jpg is mandatory, even if it is a png format.



  • No, the logo to be displayed must have the module’s name and the file extension .jpg (e.g. bankwire.jpg), no matter if the real file format is png. We had this error already with the shop logo in PrestaShop 1.5.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.