Post by arhatron » Tue Feb 07, 2023 11:16 am

Opencart 4.0.1.1

There is alert message says '' Success: You have modified products!", with X icon at the right side. The message should be closed when the X is pressed, but it didn't.

And it overlaps the logout button. Every time user click the X button, just want to close the alert message, but becomes logged out.

I have googled, this message is at:
upload\backend\view\javascript\common.js

Code: Select all

$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-circle-check"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></span></button></div>');
stackoverflow
https://stackoverflow.com/questions/402 ... ot-working
Those answers can't solve the problem.

data-dismiss => data-bs-dismiss
It is already "data-bs-dismiss"

Add " fade show" after alert-dismissible
No use.

The docs from bootstrap 5.1
https://getbootstrap.com/docs/5.1/compo ... dismissing

Code: Select all

<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.
  <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
I copy this code to product_form.twig, just put it anywhere, it actuall works.
But if I replace the common.js, no use, can't be closed.

How to solve this?
Last edited by arhatron on Wed Feb 08, 2023 7:32 pm, edited 3 times in total.

New member

Posts

Joined
Wed Sep 07, 2016 12:38 pm

Post by ADD Creative » Tue Feb 07, 2023 6:06 pm

You don't say what version of OpenCart you are using. If it's 4.0.1.1, look at the master branch on GitHub.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by arhatron » Wed Feb 08, 2023 3:00 pm

ADD Creative wrote:
Tue Feb 07, 2023 6:06 pm
You don't say what version of OpenCart you are using. If it's 4.0.1.1, look at the master branch on GitHub.
It's 4.0.1.1. I went to Github Opencart master branch, where to look at?

New member

Posts

Joined
Wed Sep 07, 2016 12:38 pm

Post by ADD Creative » Wed Feb 08, 2023 6:24 pm

There is an issue, but it doesn't reference the fix.
https://github.com/opencart/opencart/issues/11607

So you would need to work out what has changed or use the whole master branch, which may or may not be stable.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Wed Feb 08, 2023 6:28 pm

You shouldn't use any 4.0.x.x version for a live site, none of them are stable enough, still too many bugs to be fixed.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by arhatron » Wed Feb 08, 2023 7:57 pm

ADD Creative wrote:
Wed Feb 08, 2023 6:24 pm
There is an issue, but it doesn't reference the fix.
https://github.com/opencart/opencart/issues/11607

So you would need to work out what has changed or use the whole master branch, which may or may not be stable.
Thank you for the link. I just use the new master branch, and saw it really fixed. But I already have a site ...
I do want to know what has changed about this issue. Maybe I have to work out my self.

New member

Posts

Joined
Wed Sep 07, 2016 12:38 pm
Who is online

Users browsing this forum: No registered users and 8 guests