Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default Strange sub category problem while browsing products

    if you visit any product on my site, say this one for example:

    http://www.canemasters.com/hickory-b...cane-p-10.html

    then hover your mouse above the sub category that you are in, which happens to be the picture of the hickory wood in the top left corner, the url that is being linked to is the same on every single product, and it's wrong. They are all pointing to:

    http://www.canemasters.com/-c-.html

    which just takes the customer to the home page, when it should take them back to the category of the current product they are looking at.


    I'm not sure where to even begin looking. Any advice??

    Thank you.

  2. #2

    Default Re: Strange sub category problem while browsing products

    I think this may have something to do with the ultimate seo url's mod that I have installed.

    If you look at:

    http://www.canemasters.com/page.html?id=20

    all of the categories have that "-c-" in the url which I take means "category"
    example:

    http://www.canemasters.com/canes-c-1.html
    http://www.canemasters.com/staffs-and-sticks-c-9.html
    http://www.canemasters.com/accessories-c-2.html
    http://www.canemasters.com/instructional-media-c-7.html
    http://www.canemasters.com/packages-c-8.html
    http://www.canemasters.com/cmia-c-6.html

    maybe it's the .htaccess file that's causing it??

    here's my htaccess file just in case.

    Options +FollowSymLinks
    RewriteEngine On
    #RewriteBase /

    rewritecond %{http_host} ^canemasters.com [nc]
    rewriterule ^(.*)$ http://www.canemasters.com/$1 [r=301,nc]

    # From Ultimate SEO URLs
    RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
    #RewriteRule ^index\.php/(.*)/ index\.php?main_page={QUERY_STRING} [L]

    # For Open Operations Info Manager
    RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

    # For dreamscape's News & Articles Manager
    RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
    RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
    RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

    # All other pages
    # Don't rewrite real files or directories
    RewriteCond %{REQUEST_FILENAME} !-f [NC]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]

  3. #3
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Strange sub category problem while browsing products

    Quote Originally Posted by canemasters View Post
    I think this may have something to do with the ultimate seo url's mod that I have installed.

    If you look at:

    http://www.canemasters.com/page.html?id=20

    all of the categories have that "-c-" in the url which I take means "category"
    example:

    http://www.canemasters.com/canes-c-1.html
    http://www.canemasters.com/staffs-and-sticks-c-9.html
    http://www.canemasters.com/accessories-c-2.html
    http://www.canemasters.com/instructional-media-c-7.html
    http://www.canemasters.com/packages-c-8.html
    http://www.canemasters.com/cmia-c-6.html

    maybe it's the .htaccess file that's causing it??

    here's my htaccess file just in case.
    Ya it is related to SEO. i have the same problem.

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Strange sub category problem while browsing products

    The problem is not uncommon whenever short code is used.

    Short code
    RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]


    Try this one change and see what happens.

    Full code
    RewriteRule ^(.*)-c-(.*).html$ http://www.canemasters.com/index.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]

    I not sure why the dot was escaped 'index\.php' but you can escape it again if further testing is needed.



    As all Servers are setup somewhat differently it is only by trial & error that can determine what will work on that Server. With that said, the RewriteRule is designed to to redirect to ANY site and thus, using a full URL is desired.

    It does happen though that when redirecting to the same Hosting account, using the Document Root descriptor (i.e. starting with a forward slash) will work as well.


    If using the full URL works for you, you might get away with short code such as:

    RewriteRule ^(.*)-c-(.*).html$ /index.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]

  5. #5
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Strange sub category problem while browsing products

    Quote Originally Posted by Website Rob View Post
    The problem is not uncommon whenever short code is used.

    Short code
    RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]


    Try this one change and see what happens.

    Full code
    RewriteRule ^(.*)-c-(.*).html$ http://www.canemasters.com/index.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]

    I not sure why the dot was escaped 'index\.php' but you can escape it again if further testing is needed.



    As all Servers are setup somewhat differently it is only by trial & error that can determine what will work on that Server. With that said, the RewriteRule is designed to to redirect to ANY site and thus, using a full URL is desired.

    It does happen though that when redirecting to the same Hosting account, using the Document Root descriptor (i.e. starting with a forward slash) will work as well.


    If using the full URL works for you, you might get away with short code such as:

    RewriteRule ^(.*)-c-(.*).html$ /index.php?main_page=index&cPath=$2&%{QUERY_STRING } [L]
    Careful with this... you got an extra space after the word "QUERY_STRING" and it is causing Internal Server Error 500.

    All the same, when I fix that part, it doesn't seem to change the resulting link problem. I'm wondering if its not the way the SEO is creating the link is just overlooking that one. As other -c- links work fine. I don't know enough about how SEO stuff works tho.

  6. #6
    Join Date
    Nov 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: Strange sub category problem while browsing products

    I have the same problem. Check:
    http://www.primitivehomedecors.com/p...oll-p-353.html

    This is the response I received from the module's latest author:
    Hi,
    From what i have seen now, it seems that you get the problem when you try to go back from a product in a subcategory, back to its main category by clicking the corresponding image (not the link in category box). with the module working correctly on all other occasions.
    The code uses a simple rewrite(replace) code which should work correctly on any occurance of the correct long URL. Please check if it works correctly on disabling the module from admin. Also, i really think the problem may be caused due to the template you may be using. Bacause according to my experience, the module has done proper rewrites on all my 7-8 projects till now. Check further at your end.
    -Anant

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Strange sub category problem while browsing products

    Quote Originally Posted by qhome View Post
    Careful with this... you got an extra space after the word "QUERY_STRING" and it is causing Internal Server Error 500.
    Nah, that's just the Forum script incorrectly displaying. I've noticed it can happen when using a long line of code, it sometimes puts in a blank space at the oddest places.

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Strange sub category problem while browsing products

    Quote Originally Posted by newbey View Post
    This is the response I received from the module's latest author:

    Hi,

    From what i have seen now, it seems that you get the problem when you try to go back from a product in a subcategory, back to its main category by clicking the corresponding image (not the link in category box). with the module working correctly on all other occasions.

    The code uses a simple rewrite(replace) code which should work correctly on any occurance of the correct long URL.
    That is what I referred to earlier when I mentioned to put 'http://domain.com/' within the path.


    Please check if it works correctly on disabling the module from admin.
    That is good advice as the first method in troubleshooting is to try something without any add-ons. (in this case no rewriting)


    Also, i really think the problem may be caused due to the template you may be using. Bacause according to my experience, the module has done proper rewrites on all my 7-8 projects till now. Check further at your end.
    -Anant
    That I would disagree with, unless a Template has been "really heavily modified".


    Something else I mentioned earlier is why the dot was escaped: index\.php.

    Looking closer I can now see the logic or structure of the RewriteRules within this Mod are written backwards to the norm. That is why the dot is escaped.

    So to clarify, a full or long URL with this mod would be:

    RewriteRule ^(.*)-c-(.*).html$ http://domain.com/index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]


    And look at the code closely. You can't blame me if the Forum script throws in a blank space or two.
    Last edited by Website Rob; 9 Feb 2008 at 02:05 PM.

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Strange sub category problem while browsing products

    Being somewhat intrigued by this situation, I installed this mod and tested it myself. As the Song says; "Every which way but loose" is what I tried... all to no avail in solving the problem.

    If the Mod creator / maintainer / whoever, has a working example and can explain what the problem / solution is, that would be Great!


    In the meantime, I have noticed where the Mod works the way it should with somewhat of a work-around.

    If you turn on Breadcrumbs you will see that the problem does not happen if that is used. Why it doesn't work for the image [id="categoryIcon" class="categoryIcon"], I don't know. But you can turn off displaying the 'categoryIcon' from within the "stylesheet.css" file.

    By default, the listing is like so: .categoryIcon {}

    Change that to: .categoryIcon { display:none }

    There is not a declaration for an ID using 'categoryIcon' so no worries there.


    newbey, you have Breadcrumb turned ON and can see a working example.

    http://www.primitivehomedecors.com/p...oll-p-353.html
    Home > Country Collectibles > Primitive Dolls > Primitive Janet Doll

    Primitive Dolls is a link that works correctly and takes you back to the Sub-categories Listing.


    IMHO, the problem is somewhat 'minor' in the great scheme of things. The work put into this Mod and the fact there is only one minor problem, that I know of, is a small price to pay for this Free Mod.

  10. #10

    Default Re: Strange sub category problem while browsing products

    It is a minor problem, and you can always just click "listing" to go back. I'm glad to see that so many people are interested in getting this fixed.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Display images of Sub-Sub category in Main page while navigating.
    By Javier Romero in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 May 2013, 10:02 AM
  2. Replies: 1
    Last Post: 1 May 2013, 10:20 PM
  3. Determining root category ID while in a sub-category [cPath question]
    By stealthify in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 May 2009, 03:22 PM
  4. Coding advice... show Subcategories' products when browsing main category?
    By bodyjewelrystores in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 25 Dec 2007, 05:35 PM
  5. All products in a category on the screen while browsing.
    By PaulineNMU in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Jul 2006, 04:04 AM

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