user2817 Fra Ukjent Medlem siden des. -0001 user2817 mar. 17 2016 06:56 p.m. Hi, my name is Denise. I just started looking into litecart and would like to change the homepage to just show a listing of all products either all categories incl. subcategories merged together or one particular category. Is there a setting in the admin backend that I am overlooking? In what file can I change what will be served for the content section of a page?
tim Founder Fra Sweden Medlem siden mai 2013 tim mar. 17 2016 07:03 p.m. This requires LiteCart to crawl through all subcategories before fetching all the products and there is no current feature like that. You would have to rewrite func_catalog and the method catalog_products_query to grab all products of the category id and all subcategory ids. These are not known so crawling is necessary first.
user2817 Fra Ukjent Medlem siden des. -0001 user2817 mar. 17 2016 07:24 p.m. Thank you for replying and replying fast. Is e.g. the "Green Duck" under the Subcategory just a reference to the "Green Duck" under the main category Rubber Ducks (they have the same product code RD002)? Couldn't the visit of the homepage trigger a show category, like when clicking on a category link (kind of called from the template without modifying anything outside the template)? Rubber Ducks Subcategory Green Duck Yellow Duck Green Duck Purple Duck Red Duck Yellow Duck
tim Founder Fra Sweden Medlem siden mai 2013 tim mar. 17 2016 07:29 p.m. You can mount a product inside multiple categories. I think that is what you are refering to. Couldn't the visit of the homepage trigger a show category, like when clicking on a category link (kind of called from the template without modifying anything outside the template)? I'm not sure what you mean. Do you want the first page (home) to be an alias for a category page e.g. /category?category_id=1 ?
user2817 Fra Ukjent Medlem siden des. -0001 user2817 mar. 17 2016 07:45 p.m. The alias could serve as a temporary solution. If I may talk about Prestashop from which I would actually like to escape for the small project I am working on right now - as example what I am looking for, there are ways in Prestashop: e.g. through the Featured Products on the Homepage module or a modification like described in this tutorial "Category page as "homepage" of your store" https://mypresta.eu/en/art/developer/category-page-as-landing-page-of-your-prestashop.html maybe something similar like the small modification could be easily done in litecart.
tim Founder Fra Sweden Medlem siden mai 2013 tim mar. 17 2016 08:06 p.m. Here is my add-on for featured products https://www.litecart.net/addons/72/featured-products If you want to redo your index page just create a custom box and include it in includes/templates/mytemplate.catalog/views/index.inc.php.
user2817 Fra Ukjent Medlem siden des. -0001 user2817 mar. 17 2016 09:52 p.m. Deleted my post with a question - I will have a look at the problem again tomorrow, maybe I will figure it out a bit further myself.
tim Founder Fra Sweden Medlem siden mai 2013 tim mar. 17 2016 09:56 p.m. When including the box straight in the view file there is no need to store it as a snippet. So step 3 is redundant. includes/boxes/box_category_products.inc.php does not output any HTML so therefore it needs a view file for stitching the snippets with.
user2817 Fra Ukjent Medlem siden des. -0001 user2817 mar. 17 2016 10:05 p.m. OK, I have to go through it again and see.
user2806 Fra Ukjent Medlem siden des. -0001 user2806 apr. 11 2016 06:32 p.m. Why not just modify the "views/index.inc.php" ? Kill the content and add search box reference thru or category list there ?
vladislaw LiteCart Fan Fra Bulgaria Medlem siden jan. 2021 vladislaw okt. 10 2023 09:21 p.m. Hello, I'm also trying to get products on the home page, for example, from category 4, how do I do it?
tim Founder Fra Sweden Medlem siden mai 2013 tim okt. 11 2023 02:00 a.m. @vladislaw You could clone one of the boxes on the main page and change the query to fetch a category. 'categories' => [4, 5, 6], 'limit' => 10, ]);``` https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/templates/default.catalog/pages/index.inc.php https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/boxes/box_latest_products.inc.php https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/templates/default.catalog/views/box_latest_products.inc.php
vladislaw LiteCart Fan Fra Bulgaria Medlem siden jan. 2021 vladislaw okt. 11 2023 04:49 p.m. Done thanks!