I expect you have set the listing style to "columns".
Then when it gets to the first if(), it outputs the listing because that is true, and when it gets to the second if() that is also true so it outputs again. You need to reorganize the tests so you cover each possibility once. The way your posted code is written, you will get the extra listing unless you are on cat 544 ($current_category_id !== 544). Is that what you want?
PHP Code:
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
}
if ($current_category_id !== 544) {
require($template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display2.php');
}
else {// (PRODUCT_LISTING_LAYOUT_STYLE == 'rows')
needs to be something like
PHP Code:
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if ($current_category_id == 544) {
require($template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display2.php');
} else {
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
}
} else {// (PRODUCT_LISTING_LAYOUT_STYLE == 'rows')
Bookmarks