Page 1 of 1

shopping_cart page added product alert

Posted: Mon Aug 08, 2022 7:28 pm
by Omar_one
Hello ,
I have an issue after the customer adding product and going shopping_cart page alert message it didn't show the close (X) as the demo, it show as the attachment
Capture2225.JPG
I checked language files
english.php
info_shopping_cart.php
but didn't find anything weird there
any idea where to look ?

thank you in advance for your help
Omar

Re: shopping_cart page added product alert

Posted: Mon Aug 08, 2022 7:59 pm
by Kofod95
Maybe the override file from the BS5 template? If I remember correctly that file does something like that.
Sorry for not being more informative.

//Daniel

Re: shopping_cart page added product alert

Posted: Mon Aug 08, 2022 9:01 pm
by ecartz
If you can duplicate this, look at the HTML source.

The thing that determines how the output is styled would be https://github.com/CE-PhoenixCart/Phoen ... ck.php#L18 so

Code: Select all

<button type="button" class="close" data-dismiss="alert">&times;</button>
should appear in your HTML source. The Bootstrap 5 version is slightly different and would appear at includes/sytem/override. Note that it isn't controlled by the TEMPLATE_SELECTION, so you might need to remove the override file manually if you previously installed BS5 and then reverted.

If you can't duplicate it, you might check if you are changing the styles that might affect BUTTON.close.

Re: shopping_cart page added product alert

Posted: Tue Aug 09, 2022 8:43 am
by burt
Its the BS5 template which was only ever 90% completed.

New File:

/includes/system/override/alert_block.php

File Content:

Code: Select all

<?php
/*
  $Id$

  CE Phoenix, E-Commerce made Easy
  https://phoenixcart.org

  Copyright (c) 2021 Phoenix Cart

  Released under the GNU General Public License
*/

  class alertBlock {

  	public function __construct() {
  	}

    public function alertBlock($alerts, $alert_output = false) {
	  $alertBox_string = '';

      foreach ($alerts as $alert) {
        $alertBox_string .= '<div role="alert"';

        if (isset($alert['params']) && !Text::is_empty($alert['params'])) $alertBox_string .= ' ' . $alert['params'];

        $alertBox_string .= '>';
          $alertBox_string .= $alert['text'];
        $alertBox_string .= '<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>';

       $alertBox_string .= '</div>';
      }

      if ($alert_output) {
        echo $alertBox_string;
      }

      return $alertBox_string;
    }

  }
See if that works ?

Re: shopping_cart page added product alert

Posted: Tue Aug 09, 2022 10:29 am
by Omar_one
Thank you guys @Kofod95 @ecartz @burt
you are right it was about override file ,, I just delete the file as I am not using BS5 template ,, I think I forget it when we was testing the modules when @ecartz start updating the modules to 1.0.8.xx

sorry guys it was my mistake .
burt wrote: Tue Aug 09, 2022 8:43 am New File:
/includes/system/override/alert_block.php
See if that works ?
it was just change the small rectangle to end of the text .. (I am not on BS5 template)

Thank you