Hikashop and Bootstrap 5

  • Posts: 427
  • Thank you received: 19
3 years 7 months ago #331870

Hi, I recently read this article which says that Joomla 4 will be with the support of Bootstrap 5. Is it possible for Hikashop to be adapted for him? In my tests it works perfectly with version 4, thus saving a lot of time for shaping the design. I will be really happy to have a framework on which to build all the components - this will save a lot of time for customizations. B)

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331873

Hi,

HikaShop is not integrated with bootstrap. So it can display properly regardless of the version of bootstrap used by the template / Joomla, and even if they don't use bootstrap at all.

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 2
2 years 3 weeks ago #346012

HI,
i have an issue with hikashop and bootstrap 5;
In the button "check terms" when checking out, if the button is not clicked, then an alert message is displayed, coming from the file
"administrator/components/com_hikashop/helpers/helper.php".
in this file, the alert is displayed using the line
$html = '<div class="alert alert-'.$type.' alert-block">'.($close?'<button type="button" class="close" data-dismiss="alert">×</button>':'').'<p>'.implode('</p><p>',$display_messages).'</p></div>';

the problem is that bootstrap 5 uses "data-bs-dismiss" and not "data-dismiss". So the message can't be closed.
Do you have a solution ? (without me to add specific js function to close it)

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 3 weeks ago #346013

Hi,

Well, a simple solution would be to hide the close button with a bit of CSS:
.alert .close{display:none;}
Not having a close button for an error message is not really a problem in itself.

Another solution would be a view override of show_block_terms changing the line:

$this->checkoutHelper->displayMessages('terms_' . $this->step . '_' .  $this->module_position);
to:
ob_start();
$this->checkoutHelper->displayMessages('terms_' . $this->step . '_' .  $this->module_position);
echo str_replace('data-dismiss', 'data-bs-dismiss', ob_get_clean());

A third option would be for us to add data-bs-dismiss as well in there. That way, the data-dismiss attribute would be picked up by old versions of BS and the data-bs-dismiss would be picked up by BS 5 and above. Sounds like a good thing to add in HikaShop.

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum