poNgz0r Posted May 5, 2011 Share Posted May 5, 2011 Is there a way i can add a class to the messagestack table? when i successfully remove an item i get this table <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="messageStackSuccess"> <td class="messageStackSuccess"><img src="images/icons/success.gif" border="0" alt="Uitgevoerd" title=" Uitgevoerd " /> Success: The discount code has been removed.</td> </tr> </table> I want to add a class to this table in the function messagestack i see this: function output() { $this->table_data_parameters = 'class="messageBox"'; return $this->tableBlock($this->errors); } but there is no class messageBox added.... This is the function the create the box... so i am kinda lost why there is no extra table class class tableBlock { var $table_border = '0'; var $table_width = '100%'; var $table_cellspacing = '0'; var $table_cellpadding = '2'; var $table_parameters = ''; var $table_row_parameters = ''; var $table_data_parameters = ''; function tableBlock($contents) { $tableBox_string = ''; $form_set = false; if (isset($contents['form'])) { $tableBox_string .= $contents['form'] . "\n"; $form_set = true; array_shift($contents); } $tableBox_string .= '<table border="' . $this->table_border . '" width="' . $this->table_width . '" cellspacing="' . $this->table_cellspacing . '" cellpadding="' . $this->table_cellpadding . '"'; if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters; $tableBox_string .= '>' . "\n"; Link to comment Share on other sites More sharing options...
poNgz0r Posted May 5, 2011 Author Share Posted May 5, 2011 Seems like this if if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters; stays empty but why? Link to comment Share on other sites More sharing options...
dennish Posted April 11, 2012 Share Posted April 11, 2012 I was bothered by the same issue. The solution I found (on osC 2.3.1.): Just replace the following code in catalog/includes/classes/messagestack.php function output($class) { $this->table_parameters = 'class="messageBox"'; $output = array(); for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) { if ($this->messages[$i]['class'] == $class) { $output[] = $this->messages[$i]; } } by function output($class) { // $this->table_data_parameters = 'class="messageBox"'; $this->table_parameters = 'class="messageBox"'; $output = array(); for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) { if ($this->messages[$i]['class'] == $class) { $output[] = $this->messages[$i]; } } Done! Link to comment Share on other sites More sharing options...
♥mattjt83 Posted April 11, 2012 Share Posted April 11, 2012 On my site I just changed the messageStackSuccess class in my stylesheet to change the look of it. It worked well. Matt Link to comment Share on other sites More sharing options...
LaliaTK Posted June 16, 2012 Share Posted June 16, 2012 On my site I just changed the messageStackSuccess class in my stylesheet to change the look of it. It worked well. That worked for me everywhere in the store except in the "Tell A Friend" and "Write Review" areas. When I submit a review, the "Thank you for your review" text appears in the right place, but the little lightbulb icon is too far down. When I use the "Tell A Friend" functionality, the "success" text is placed waaaaaaaaaay at the top of the screen. In both instances, the code itself does not even seem to appear in the source code of the page when I'm looking at it, so how can I style it? I can't even tell if it has the proper CSS class attached. Auugh. I also tried dennish's fix and absolutely nothing changed. :-/ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.