v4.0.x feature listings see in parent category

Discussion in 'Modules / Plugins / Modifications' started by hel68c, Oct 17, 2009.

  1. hel68c Customer

    Hi,

    I installed the feature_listings function in the template browse.tpl and I would like to see only the Featured ads in all main category and subcategory.

    With this code, I only see feature Ads in their category.


    I would like to see in each main categories, all featured ads including those in the sub-category

    e.g.
    In The main category Arts & Crafts, I would like to see all Featured Ads that are in their subcategory, Drawings, Paintings, Original Arts, Accessories, Sculpting.
    Code:
    [B]Arts & Crafts[/B] --> Drawings
                      Paintings --> Original Arts
                                    Accessories
                      Sculpting
    
  2. Mike-N-Tosh Owner

    Serge,

    In a v4.0.8 installation, css_featured_listings_horizontal is not part of the standard 68 classified plugins. Is this a third party plugin or one that you made? The one that does come with 4.1.x is css_featured. (I also don't know if that is backward compatible)

    I don't believe that the variable $sec is available in the browse.tpl template file in v4.x installations.
  3. hel68c Customer

    Hi Mike,

    The variable $sec is working fine with css_feature_listings "I made the change in category.php" but like I mention, it only display the Feature Ads in their category.

    Do you have any advice on how?
  4. hel68c Customer

    I tried function.feature_listings_horizontal.php version 4.1.2 and am unable to display feature Ads in their parent category.
  5. Eric Barnes Guest

  6. hel68c Customer

    I understand that the category is not included in the plug in. I took at the tips & tricks from the 68classifieds Blog Featured listings by category.


    I'm only asking if anyone has an idea of how to display all the ads in a main category and sub-categories from this plug in.

    I just upgraded to the new version 4.1.6 and I am a little apprehensive about the conversion of all the changes I've made to version 4.08.
  7. hel68c Customer

    Hi,

    I'm trying to get all the subcategory id from the module feature_listing_horizontal. I tried the code below and I only get one category. When I print_r $options['arr_childs'] in feature_listings_horizontal.php it display "Array ( [0] => 81 )".

    When I print_r $options['arr_childs'] in category.php it display "Array ( [0] => 81 [1] => 82 [2] => 83 [3] => 129 [4] => 134 [5] => 228 [6] => 229 [7] => 252 [8] => 266 [9] => 271 [10] => 305 [11] => 332 [12] => 84 [13] => 227 )"

    Do you know how to get all subcategory like category.php or how can I transfer the variable $options['arr_childs'] from category.php to feature_listings_horizontal.php?

    Thanks

    PHP:
     feature_listings_horizontal.php

                $slug
    =$_GET['cat'];
                
    $cat=$Categories->getCategoryBySlug($slug);

                
    $sec=$cat['id'];

                
    $arr_childs = array($sec);

                
    $Categories->get_ids($arr_childs);
                
    $options['arr_childs']=$arr_childs;
  8. seymourjames All Hands On Deck

    Why don't you try to take the relvant code out of category.php and use it in the plugin. Its the only thing I can think of.
  9. hel68c Customer


    that's what I did but despite several attempts, I can not have the subcategories ID. :(

Share This Page