babyewok Posted February 21, 2014 Share Posted February 21, 2014 I have PS 1.5.6 and would like to set a particular category to show ALL of its products, regardless of the default products per category set in the back office. How can I go about this? Link to comment Share on other sites More sharing options...
vekia Posted February 21, 2014 Share Posted February 21, 2014 just increase value of 'products per page' param under preferences > products tab in your BO. remember, it can affect performance, so you have to use well configured server with enough resources Link to comment Share on other sites More sharing options...
babyewok Posted February 21, 2014 Author Share Posted February 21, 2014 Thanks, but I want to be able to do this for just one category regardless of what the back office setting is. Link to comment Share on other sites More sharing options...
vekia Posted February 21, 2014 Share Posted February 21, 2014 in this case it's necessary to modify the CMSController, moreover, if you want to configure it via back office, it will be necessary to modify also admin controllers and database to store information about new feature. This is the only possible way Link to comment Share on other sites More sharing options...
babyewok Posted February 25, 2014 Author Share Posted February 25, 2014 There is no need to be able to change it from the back office. Where do I need to look in CMS Controller? I can't see any referrence to product list numebrs in there? Link to comment Share on other sites More sharing options...
babyewok Posted February 25, 2014 Author Share Posted February 25, 2014 Also I need to be able to set the default sort order for specific categories from A-Z - would this setting be found in the same place as the items per page setting? I was hoping it would all be simple to do via the category.tpl file Link to comment Share on other sites More sharing options...
vekia Posted February 25, 2014 Share Posted February 25, 2014 it will not be as easy as it seems. copy contents of category controller (init function) to cms controller (also init function) remember that you have to change things like id of category (because in category controller id of category is a part of $_GET variables) Link to comment Share on other sites More sharing options...
babyewok Posted February 25, 2014 Author Share Posted February 25, 2014 Or to change somethig in FrontController.php via an override as I see that had productsort and pagination in there. Could I not put something in there to manually set the the default orderby, orderway and product number for specific categories vi asome kind of if statement? For example: if (something to reference a list of category ids){ $this->context->smarty->assign(array( 'orderby' => $this->orderBy, 'orderway' => $this->orderWay, 'orderbydefault' => name, 'orderwayposition' => asc, 'orderwaydefault' => asc, 'stock_management' => (int)$stock_management)); } else { $this->context->smarty->assign(array( 'orderby' => $this->orderBy, 'orderway' => $this->orderWay, 'orderbydefault' => $order_by_values[(int)Configuration::get('PS_PRODUCTS_ORDER_BY')], 'orderwayposition' => $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')], // Deprecated: orderwayposition 'orderwaydefault' => $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')], 'stock_management' => (int)$stock_management)); } And then if (somethign to reference a list of category ids){ $pagination_infos = array( 'products_per_page' => 50, 'pages_nb' => $pages_nb, 'p' => $this->p, 'n' => $this->n, 'nArray' => $nArray, 'range' => $range, 'start' => $start, 'stop' => $stop, 'current_url' => $current_url ); }else { $pagination_infos = array( 'products_per_page' => (int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 'pages_nb' => $pages_nb, 'p' => $this->p, 'n' => $this->n, 'nArray' => $nArray, 'range' => $range, 'start' => $start, 'stop' => $stop, 'current_url' => $current_url ); } Or is that all very messy? I have changed my mind about listing ALL the products, just perhaps adding high number instead. The reason I need this is that I have set up a product a-z category, with subcats of a-e, f-j, etc and so regardless of the usual sort order, they MUST be listed A-Z. I also thought that listing more products per page would be useful as otherwise it makes the category no easier to look though to find what you want than any other! Link to comment Share on other sites More sharing options...
babyewok Posted February 25, 2014 Author Share Posted February 25, 2014 it will not be as easy as it seems. copy contents of category controller (init function) to cms controller (also init function) remember that you have to change things like id of category (because in category controller id of category is a part of $_GET variables) Seems we replied at the same time .... I'm afraid you have completely lost me now! I don't understand why I need to move functions to the CMS controller to achieve this. I assumed I would need to change the functions in the files they are currently (as above) Link to comment Share on other sites More sharing options...
babyewok Posted February 27, 2014 Author Share Posted February 27, 2014 So do you thinks that my suggested way of changing FrontController.php is out of the question? Link to comment Share on other sites More sharing options...
babyewok Posted February 27, 2014 Author Share Posted February 27, 2014 It would be great if ou can help (ezpecially for the sort order) - I am pretty stumped on this one :/ Link to comment Share on other sites More sharing options...
jjryeste Posted November 10, 2014 Share Posted November 10, 2014 Hello vekia i have one problem i create and ohter product-list.tpl and modify category.tpl for include new id category and not views , add to cart , please help me me ppage category modify is http://www.punto-de-cruz.es/hilos-y-kits/hilos/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now