ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

related categories mode not getting correct data.

September 14, 2012 11:00am

Subscribe [1]
  • #1 / Sep 14, 2012 11:00am

    iammikek

    10 posts

    This question may be related to a resolved thread.

    i’m having the same issues as the above thread and have the following going on in a single article (product view).

    my url is as such
    /products/product_detail/46

    <ul id="other_products_in_this_category">
                 {exp:channel:entries 
    dynamic="yes"
    category_group="4" 
    channel="products" 
    related_categories_mode="yes" 
    url_title="not {current_entry}" 
    limit="11"
    disable="member_data|pagination"
    }
    <li><a href="/products/product_detail/{url_title}" title="read more on {title}">{title}</a></li>
                 {/exp:channel:entries}
    </ul>

    is there any reason why this shouldnt work? as you can see, i do get a list of products but from all categories

    im in ee2.5.0

    ta

     

  • #2 / Sep 17, 2012 3:26pm

    Dan Decker

    7338 posts

    Hi iammikek,

    Thanks for posting to the forums, lets get this sorted out!

    My first question, where are you getting the variable {current_entry} ? That’s not in ExpressionEngine by default. Since it would certainly impact results, I need to know where that’s coming from.

    I look forward to your reply!

    ~

  • #3 / Sep 19, 2012 4:50am

    iammikek

    10 posts

    Taking another look at {current_entry} tag, it doesnt appear to be defined.

    The origin of this code i’m not sure, I’m working in cartthrob2 so it might have come from an earlier version of that.

    Anyway, i’ve removed it and get the same functionality.

    In:
    http://redmud2.brightstorm.co.uk/products/product_detail/owl

    I have

    {exp:channel:entries related_categories_mode="yes" dynamic="yes" custom_fields="no" member_data="no"}
    <li><a href="/products/product_detail/{url_title}" title="read more on {title}">{title}</a></li>
    {/exp:channel:entries}
    {exp:channel:entries 
    dynamic="yes"
    category_group="4" 
    channel="products" 
    related_categories_mode="yes" 
    limit="11"
    disable="member_data|pagination"
    }
    <li><a href="/products/product_detail/{url_title}" title="read more on {title}">{title}</a></li>
                 {/exp:channel:entries}

    stacked up and they produce the same results.

    Looking at the categories, even though i have specified this product to be in ’ Wooden Carvings ’ when i save i also get assigned to the parents up from this too which could perhaps be the problem?

     

  • #4 / Sep 20, 2012 5:34pm

    Kevin Smith

    4784 posts

    Yep, it sounds like the fact that the parent categories are always selected might be the issue here. Could you have a look at this preference in your channel and turn it off? You’ll need to edit your entries again to make sure that only the proper categories are selected. Could you give that a try?

  • #5 / Sep 21, 2012 7:13am

    iammikek

    10 posts

    ah. that did the trick. thanks

  • #6 / Sep 24, 2012 12:54pm

    Dan Decker

    7338 posts

    Hi iammikek,

    I’m glad Kevin was able to get you on the right track!

    If you need anything else, please let us know.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases