Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default category point to an Ez-page?

    Hi everyone,
    I just have a question for you, I have just implemented a site with zen cart 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?

  2. #2
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: category point to an Ez-page?

    Any help would be apreciated!!

  3. #3
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: category point to an Ez-page?

    Can I ask why? You could make a category page have any content you like, ie look like an EZ page.

  4. #4
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: category point to an Ez-page?

    Because the customer wants to have briefings on the first page and I dont know how I could embed some of the ezpages into the first page to look like briefings. I told him that he could actually have this category as a regular ezpage but it doesn't listen to me

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default category point to ezpage

    You are using the right variable for your test, but it does not contain just the cPath number(s). As indicated by this line

    $cPath_new = str_replace('=0_', '=', $cPath_new);

    '=0_' is being replaced by '=', and the whole content is like 'cPath=3' for your case.
    Your test should be

    if($cPath_new == 'cPath=3')

 

 

Similar Threads

  1. v151 Point to another web page
    By Advisers Australia in forum Customization from the Admin
    Replies: 2
    Last Post: 14 Jan 2014, 05:28 AM
  2. ez page point to define_page_4
    By JohnBoyCR in forum Customization from the Admin
    Replies: 3
    Last Post: 10 Sep 2009, 12:25 AM
  3. Change Page Focus/Start Point
    By vegascoug in forum General Questions
    Replies: 5
    Last Post: 2 Jun 2009, 10:12 PM
  4. Category Meta Tag Descriptions - Whats the point?
    By PastGenToys in forum General Questions
    Replies: 3
    Last Post: 11 Jul 2007, 03:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg