Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Location
    Prague, Czech Republic
    Posts
    530
    Plugin Contributions
    0

    Default Help - category URLs not correct

    Hopefully somebody can identify the problem easily here.

    The URL's for my category images on the main page are coming up with a prefix of 7_8_9 and hence aren't redirecting properly - example here

    Any ideas what I have changed/installed, I've only just noticed it now and there are several mods installed so didn't really want to have to go to the trouble of uninstalling each one if somebody might recognise where it's coming from

    Thanks in advance

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

    Default Re: Help - category URLs not correct

    The cPaths in the center column are built in
    /includes/modules[/your_template]/category_row.php.
    This section does the actual work:
    PHP Code:
        $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']);

        
    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<br />' $categories->fields['categories_name'] . '</a>'); 
    It would appear that somehow $cPath_new is getting "7_8_9_" added to its value.
    Do you have a copy of this file in a /your_template/ folder? What does this section look like?

  3. #3
    Join Date
    Jul 2009
    Location
    Prague, Czech Republic
    Posts
    530
    Plugin Contributions
    0

    Default Re: Help - category URLs not correct

    Thanks Glen,

    As soon as I saw you write "The cPaths" I realised what the problem was, namely this that I was experimenting with yesterday - http://www.zen-cart.com/forum/showthread.php?t=102871 - I thought I'd put the original file back in though, obviously not!

    Original file back in place and all is fine - cheers! :)

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

    Default Re: Help - category URLs not correct

    Looks like that was a very simple hack with a ton of unintended consequences. There are more controllable ways to expand categories without being an expert programmer.

 

 

Similar Threads

  1. HELP!: How can I find the correct name of the correct Handler page?
    By bongobayfusion in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 18 Jan 2012, 10:00 PM
  2. price calculation not correct! Help!
    By simpledomaining in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 16 Nov 2011, 11:11 AM
  3. multiple images not displaying in correct order - HELP!
    By jen_ny in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Sep 2010, 03:37 PM
  4. Please Help - Inc and Ex VAT prices/totals not correct
    By snowy2007 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 8 Dec 2008, 04:27 PM
  5. Help Needed Download items not correct
    By cshart in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Feb 2008, 06:33 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR