PrestaShop1.7 icon indicating copy to clipboard operation
PrestaShop1.7 copied to clipboard

When using Bootstrap v5, dropdown ideal banks doesn't work.

Open sharkooon opened this issue 1 year ago • 4 comments

Expected behavior

On checkout payment step: Click on iDeal -> "Kies een bank" A dropdown is shown with bank options.

Actual behavior

No dropdown is shown with bank options.

Why doesn't it work?

When using bootstrap v5 (the new Prestashop core theme Hummingbird is using bootstrap v5.2) has changed the data attribute for dropdowns. So no dropdown is shown when clicking on "Kies een bank".

Fix: only for bootstrap v5 and higher. modules/mollie/views/templates/hook/ideal_dropdown.tpl change data attribute: data-toggle="dropdown" to: data-bs-toggle="dropdown"

Maybe add a second data-attribute like to match old and new bootstrap versions: data-toggle="dropdown" data-bs-toggle="dropdown" Or add option in module Mollie settings to set bootstrap version.

This is a serious thing because we can't override the template file mollie/views/templates/hook/ideal_dropdown.tpl in for example: themes/hummingbird/modules/mollie/views/templates/hook/ideal_dropdown.tpl

See: Bootstrap v5 Breaking changes

Environment PrestaShop version: 8.1.3 Mollie module version: 6.0.4 PHP version: 8.1.27 Bootstrap: v5.2.0

sharkooon avatar Feb 06 '24 13:02 sharkooon

Hi there, Thank you for the information!

We will analyze the issue and get back to you.

Best Regards, Invertus Support team

justelis22 avatar Feb 08 '24 13:02 justelis22

Hi there @sharkooon,

This theme is not officially released as per https://devdocs.prestashop-project.org/8/themes/hummingbird/ so this is not a priority task for now. Moving forward we will make this adjustment and decide how we handle the versioning.

If you have any other questions, please let me know!

Best Regards, Invertus Support team

justelis22 avatar Feb 12 '24 12:02 justelis22

I know that it it not released yet, but bootstrap v5 itself is released in May 5, 2021. And since mollie module template files are not extendable by themes, it is always reliable on bootstrap 4.

$paymentOption->setAdditionalInformation($this->templateParser->parseTemplate(
    $this->context->getSmarty(),
    $this->idealDropdownInfoBlock,
    $this->module->getLocalPath() . 'views/templates/hook/ideal_dropdown.tpl'
));

Suggestions:

  • Make mollie template files be extendable by themes. Like /themes/themename/modules/mollie/views/templates/hook/ideal_dropdown.tpl would solve* the issue.

  • Make it bootstrap dependent

  • Configurable setting in mollie to select bootstrap version.

sharkooon avatar Feb 12 '24 13:02 sharkooon

Hi @sharkooon,

I have forwarded the information to the Mollie team. We will evaluate and decide when the improvement will be done.

As soon as we have more details, I will let you know!

Best Regards, Invertus Support team

justelis22 avatar Mar 04 '24 09:03 justelis22

Hi @sharkooon,

The issue was fixed and the beta 6.2.0 is already available.

If you can, please install it and if you have some feedback, I would highly appreciate it

Best Regards, Invertus Support team.

justelis22 avatar May 30 '24 07:05 justelis22