1 Attachment(s)
How do I move "New Products ..." & "All Products ..." to top of category box?
I am trying to do this in the categories side box...
Attachment 11999
Thank you!
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
you should be able to just move the code in the categories sidebox template
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
includes/templates/YOUR_TEMPLATE/templates/sideboxes/tpl_categories.php
if it doesnt exist take a copy from here:
includes/templates/template_default/templates/sideboxes/tpl_categories.php
and upload it here:
includes/templates/YOUR_TEMPLATE/templates/sideboxes/
take this:
PHP Code:
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
// display limits
$display_limit = zen_get_products_new_timelimit();
$show_this = $db->Execute("select p.products_id
from " . TABLE_PRODUCTS . " p
where p.products_status = 1 " . $display_limit . " limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
$show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
}
}
and pu it just below this:
PHP Code:
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
always backup before trying stuff..
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
Thanks for the reply! I did already try that but it seems to break my page as it makes me lose everything except my header?
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
really thats odd because all you are doing is outputting the $content for the links before the categories.. strange. not at my pc to try, if i get chance laster i'll give it a try for you
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
Thank you, I appreciate it!
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
Re: How do I move "New Products ..." & "All Products ..." to top of category box?
philip937 posted the solution
You can see it HERE