Jump to content

Products view in category


NormundsM

Recommended Posts

Hello!

 

I have prestashop 1.6.1.0 with theme default-bootstrap. I wanted to make another product view under product category as it's possible by default. Maybe someone could advice some module which could help resolve me this need? As I'm beginner in this field then I could use already usable product (module), not write by myself those features.

 

Thank You!

Link to comment
Share on other sites

I want to modify products view under categories. In list view one product takes a lot of space and I want to make it more compact, so there would be shown more products at one time. At grid view there are more products, but still they takes too much place as well prestashop shows only name, not short description, which is not enough.

Link to comment
Share on other sites

Old bug, replace the regenerateEntireNTree in category.php with this

 

    public static function regenerateEntireNtree()
    {
        $id = Context::getContext()->shop->id;
        $id_shop = $id ? $id: Configuration::get('PS_SHOP_DEFAULT');
        $categories = Db::getInstance()->executeS('
		SELECT c.`id_category`, c.`id_parent`
		FROM `'._DB_PREFIX_.'category` c
		LEFT JOIN `'._DB_PREFIX_.'category_shop` cs
		ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')
		ORDER BY c.`id_parent`, cs.`position` ASC');
        $categories_array = array();
        foreach ($categories as $category) {

            $categories_array[$category['id_parent']]['subcategories'][] = $category['id_category'];
        }
        $n = 1;

        if (isset($categories_array[0]) && $categories_array[0]['subcategories']) {
            foreach ($categories_array[0]['subcategories'] as $subcat)
            {
                Category::_subTree($categories_array, $subcat, $n);
            }
            
        }
    }
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...