WordPress.org

Ready to get started?Download WordPress

Forums

WP e-Commerce Related Products
[resolved] Related Products (Pull from Child Category) (2 posts)

  1. timothycd
    Member
    Posted 2 years ago #

    Is it possible to pull the 'Related Products' from a Child Category rather than just a Category?

    EXAMPLE: I have a 'Jacket' that falls under MENS > RACE COLLECTION. I want to show all 'Race Collection' products as 'Related Products'. I do not want to show the entire 'Men's' Category.

    http://wordpress.org/extend/plugins/wpec-related-products/

  2. Onnay Okheng
    Member
    Plugin Author

    Posted 1 year ago #

    yeah you can, modify "wpec-related-products.php". Change this script:

    // cat in array
            foreach ($product_cat as $cat_item) {
                $cat_array_name_list[] = $cat_item->slug;
            }

    with this:

    // cat in array
            foreach ($product_cat as $cat_item) {
                if($cat_item->parent != 0)
                $cat_array_name_list[] = $cat_item->slug;
            }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic