shopping_cart page added product alert

Open to all! Ask other shopowners for help.
Post Reply
Omar_one
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

shopping_cart page added product alert

Post 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
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: shopping_cart page added product alert

Post 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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: shopping_cart page added product alert

Post 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.
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: shopping_cart page added product alert

Post 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 ?
I am not here to build for you.
I am here to build with you. Let's help each other.
Omar_one
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: shopping_cart page added product alert

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply