Jump to content
thirty bees forum

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


30knees

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

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