30knees Posted July 23, 2017 Posted July 23, 2017 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?
vzex Posted July 25, 2017 Posted July 25, 2017 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
30knees Posted July 25, 2017 Author Posted July 25, 2017 @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?
Occam Posted July 26, 2017 Posted July 26, 2017 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.
30knees Posted July 30, 2017 Author Posted July 30, 2017 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.
Occam Posted July 30, 2017 Posted July 30, 2017 Afaik every payment module has to be initiated by AEUC. Is it listed in function registerModulesBackwardCompatHook of advancedeucompliance.php?
zimmer-media Posted August 1, 2017 Posted August 1, 2017 When setting up the AEUC and the native Stripe module, I do not see all Stripe options in the order completion.
zimmer-media Posted August 1, 2017 Posted August 1, 2017 @mdekker That would be great, because the module is with a small reason, why I would switch to TB.
zimmer-media Posted August 2, 2017 Posted August 2, 2017 @mdekker many thanks michael - it looks good, but i have 2 divs with stripe now - test in 2 shops
zimmer-media Posted August 2, 2017 Posted August 2, 2017 @mdekker :drum: :thumbsup: thanks - must clean my glasses :zipper_mouth:
30knees Posted August 5, 2017 Author Posted August 5, 2017 @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.
30knees Posted August 5, 2017 Author Posted August 5, 2017 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?
Occam Posted August 5, 2017 Posted August 5, 2017 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.
30knees Posted August 5, 2017 Author Posted August 5, 2017 @Occam I clicked through the different modules, but I didn't find in the file displayPaymentInfo.tpl. Where should I look?
Occam Posted August 5, 2017 Posted August 5, 2017 /modules//views/templates/hook Oops, sorry, that was PS 1.5! In 1.6 (and thirty bees?) The file is called just payment.tpl
30knees Posted August 5, 2017 Author Posted August 5, 2017 @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.
Occam Posted August 5, 2017 Posted August 5, 2017 Ok, my test invironment doesn't support SSL, that's why I cannot check if the following modifications work: Open /modules/stripe/views/templates/hook/payment.tpl 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.
Occam Posted August 5, 2017 Posted August 5, 2017 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.
Occam Posted August 5, 2017 Posted August 5, 2017 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.
30knees Posted August 8, 2017 Author Posted August 8, 2017 Just checking whether the conclusion of the discussion was to not use @Occam 's edits because AEUC doesn't use the file?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now