Utilising existing code in the contact_us.tpl.php, this will place the Store Name & Address before the contact form (easy to add store owner too).
Though there are other ways, this method will hopefully encourage a means to display further informational blocks in a consistent fashion.
catalog/includes/classes/message_stack.php - insert information
/catalog/templates/yourtemplate/stylesheet-new.css (or stylesheet.css) - add this:PHP Code:// class methods
function add($class, $message, $type = 'error') {
if ($type == 'error') {
$this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => tep_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . ' ' . $message);
} elseif ($type == 'warning') {
$this->messages[] = array('params' => 'class="messageStackWarning"', 'class' => $class, 'text' => tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $message);
} elseif ($type == 'success') {
$this->messages[] = array('params' => 'class="messageStackSuccess"', 'class' => $class, 'text' => tep_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . ' ' . $message);
} elseif ($type == 'information') {
$this->messages[] = array('params' => 'class="messageStackInformation"', 'class' => $class, 'text' => $message);
} else {
$this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => $message);
}
}
catalog/includes/languages/english/contact_us.php - and any other language file. Before final ?>:Code:.messageStackInformation { font-family: Verdana, Arial, sans-serif; font-size: 12px; background-color: #f8f8f9; }
orCode:$messageStack->add('contact', STORE_NAME . '<br/>' . STORE_NAME_ADDRESS, 'information');
To use in other places, just add, where appropriate:Code:$messageStack->add('contact', STORE_OWNER . '<br/>' . STORE_NAME . '<br/>' . STORE_NAME_ADDRESS, 'information');
Thanks, Rep Power (and donationsPHP Code:<?php echo $messageStack->output('contact'); ?>) gratefully accepted.
![]()



LinkBack URL
About LinkBacks


) gratefully accepted. 





Bookmarks