user2817 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 17 มี.ค. 2016 18:56 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 จาก Sweden เป็นสมาชิกตั้งแต่ พ.ค. 2013 tim 17 มี.ค. 2016 19:03 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 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 17 มี.ค. 2016 19:24 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 จาก Sweden เป็นสมาชิกตั้งแต่ พ.ค. 2013 tim 17 มี.ค. 2016 19:29 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 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 17 มี.ค. 2016 19:45 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 จาก Sweden เป็นสมาชิกตั้งแต่ พ.ค. 2013 tim 17 มี.ค. 2016 20:06 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 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 17 มี.ค. 2016 21:52 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 จาก Sweden เป็นสมาชิกตั้งแต่ พ.ค. 2013 tim 17 มี.ค. 2016 21:56 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 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 17 มี.ค. 2016 22:05 OK, I have to go through it again and see.
user2817 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2817 28 มี.ค. 2016 10:49 Thank you, this worked.
user2806 จาก ไม่รู้จัก เป็นสมาชิกตั้งแต่ ธ.ค. -0001 user2806 11 เม.ย. 2016 18:32 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 จาก Bulgaria เป็นสมาชิกตั้งแต่ ม.ค. 2021 vladislaw 10 ต.ค. 2023 21:21 Hello, I'm also trying to get products on the home page, for example, from category 4, how do I do it?
tim Founder จาก Sweden เป็นสมาชิกตั้งแต่ พ.ค. 2013 tim 11 ต.ค. 2023 02:00 @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 จาก Bulgaria เป็นสมาชิกตั้งแต่ ม.ค. 2021 vladislaw 11 ต.ค. 2023 16:49 Done thanks!