Jump to content
thirty bees forum

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


Recommended Posts

Posted

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?

Posted

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

Posted

@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?

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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?

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

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.

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