New Zenner
- Join Date:
- Feb 2011
- Posts:
- 73
- Plugin Contributions:
- 0
category point to an Ez-page?
Hi everyone,
I just have a question for you, I have just implemented a site with zen cart https://www.pelagosmarine.gr. I have just embeded the categories inside the first page with their images and their descriptions from a file which is located into modules folder category_row.php. Now I'am trying to change the target link of the 3th category to point to an ez-page.
just read the code below
while (!$categories->EOF) {
if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';
$categories_description = zen_get_category_description($categories->fields['categories_id'], $_SESSION['languages_id']);
$cPath_new = zen_get_path($categories->fields['categories_id']);
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
// $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);
?>
<div id="categorylist"> <div class="dosomething"> <?php $description = substr($categories_description, 0, 150); //echo strlen($description); //if($language_id == 1){ if(strlen($categories_description) < 150) { if($cPath_new == 3) { $list_box_contents[$row][$col] = array('params' => '"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '<br><a href="http://www.pelagosmarine.gr/index.php?main_page=page&id=42">' . '<span>' . $categories->fields['categories_name'] . '</span></a><br><br>'. zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br /><br><div class="moreinfo">' . $description. '</div><br>'); } $list_box_contents[$row][$col] = array('params' => '"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '<br><a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . '<span>' . $categories->fields['categories_name'] . '</span><br><br>'. zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br /></a><br><div class="moreinfo">' . $description. '</div><br>'); $col ++; if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) { $col = 0; $row ++; } $categories->MoveNext(); I know for sure that the variable for the category is $cPath_new and the category_id is 3. But I cannot get it right for some reason... what I'm missing here? Could you please advice me?:smile: