vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 12 Nov 2020 09:42 Hello, how can I visualize all the categories with related images as in the category page, in the home page? For example, under the slide see all the categories with images. Thank you
tonny Curtain Guru Dari Netherlands Anggota sejak Des 2016 tonny 12 Nov 2020 14:43 Hi, in includes/templates/default.catalog/pages/index.inc.php below line 10 wich is: <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_slides.inc.php'); ?> add <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_categories.inc.php'); ?>
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 12 Nov 2020 21:59 I edited tonnys post to use the right file.
tonny Curtain Guru Dari Netherlands Anggota sejak Des 2016 tonny 12 Nov 2020 22:43 Where did I go wrong Tim?
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 13 Nov 2020 01:22 Before the file to add was manufacturer instead of box_categories. I will try it this afternoon. Thank you all
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 13 Nov 2020 01:31 @tonny you had box_manufacturer_logotypes in the instructions.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 13 Nov 2020 05:22 hello, got this error: Warning: Use of undefined constant FS_DIR_APP - assumed 'FS_DIR_APP' (this will throw an Error in a future version of PHP) in ~/includes/templates/default.catalog/pages/index.inc.php (Line 9) Warning: include(FS_DIR_APPincludes/boxes/box_categories.inc.php): failed to open stream: No such file or directory in ~/includes/templates/default.catalog/pages/index.inc.php (Line 9) Warning: include(FS_DIR_APPincludes/boxes/box_categories.inc.php): failed to open stream: No such file or directory in ~/includes/templates/default.catalog/pages/index.inc.php (Line 9) Warning: include(): Failed opening 'FS_DIR_APPincludes/boxes/box_categories.inc.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in ~/includes/templates/default.catalog/pages/index.inc.php (Line 9)
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 13 Nov 2020 21:54 That means you are not on 2.2. For older versions it's include vmod::check(FS_DIR_HTTP_ROOT . WS_DIR_BOXES . 'box_categories.inc.php');
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 14 Nov 2020 02:50 Hello, yes I did try that: Warning: include(/home/mobus/public_html/includes/templates/default.catalog//views/box_categories.inc.php): failed to open stream: No such file or directory in ~/includes/classes/view.inc.php (Line 63) Warning: include(/home/mobus/public_html/includes/templates/default.catalog//views/box_categories.inc.php): failed to open stream: No such file or directory in ~/includes/classes/view.inc.php (Line 63) Warning: include(): Failed opening '/home/mobus/public_html/includes/templates/default.catalog//views/box_categories.inc.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in ~/includes/classes/view.inc.php (Line 63)
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 16 Nov 2020 02:07 You are missing the view file, did you delete it? https://github.com/litecart/litecart/blob/master/public_html/includes/templates/default.catalog/views/box_categories.inc.php
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 16 Nov 2020 02:28 Yes there is no that file there, you right. But the categories appear in the website, any browser so it is not cache, it is really working fine, so there is something instead of it. Version 2.1.6 There is a file in public_html/includes/boxes named box_categories.inc, in public_html/includes/templates/default.catalog/views/ there is only box_category_tree.inc.php
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 16 Nov 2020 02:29 So what do you see if you go to https://yoursite.tld/categories? Put the file back.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 16 Nov 2020 02:31 I see all the categories
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 16 Nov 2020 02:35 That makes no sense, because it should be using includes/templates/default.catalog/views/ there is only box_category_tree.inc.php.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 16 Nov 2020 02:38 Hello, I also just now downloaded again 2.1.6 and there is no that file there, should I copy it from public_html/includes/boxes and put it back?
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 16 Nov 2020 02:45 Grab it from the latest version. Should be fine.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 16 Nov 2020 03:19 Ok I will and I will let you know the result. By the way, how it is posdible that the categories are shown without the file?
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 16 Nov 2020 03:21 If I remember right they were moved to pages/categories during a few versions then back to box_categories due to this very request by some to add it to other pages.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 16 Nov 2020 07:50 It works in both way: the new file from the latest version or adding the file presents in public_html/includes/boxes named box_categories.inc But in both ways it show a vertical list of categories. Like it does not load the correct css. I will try to work on it.
btkg LiteCart Fan Dari United Kingdom Anggota sejak Jul 2019 btkg 17 Feb 2021 22:54 I might be a bit late into this and it is already solved but it looks like you are trying to do something similar to me. This applies to 2.2.7 I just took the templates/catalog/layouts/index.inc.php and stripped out the vast majority of the code to leave <div id="content"> {snippet:notices} <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_categories.inc.php'); ?> </div> front page now is just the categories with images on desktop and tablet but just a list on 'phone. Looks clean and neat (in my humble opinion that is!) Hope that this helps you or anybody else.
vilaiporn LiteCart Fan Dari Thailand Anggota sejak Agu 2017 vilaiporn 18 Feb 2021 02:09 Great! Best solution. Thank you very much.
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 30 Apr 2023 09:35 hello, where would i find the code to remove this "Categories" title? i cannot seem to find it in the normal places? thanks <h1 class="card-title">Categories</h1>?
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 6 Mei 2023 10:42 /includes/boxes/box_categories.inc.php cannot see any code for the title? is this file calling another?
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 6 Mei 2023 22:08 For the left category tree, have a look here: https://github.com/litecart/litecart/blob/2.5.3/public_html/includes/templates/default.catalog/views/box_category_tree.inc.php#L32
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 7 Mei 2023 10:01 thanks! would the /views folder also hold the code for the footer "categories" tree? i find if there are a lot of categories the foot gets very tall and need to figure out a way to reduce the list or drop down
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 8 Mei 2023 13:37 The site footer is here: https://github.com/litecart/litecart/blob/2.5.3/public_html/includes/boxes/box_site_footer.inc.php https://github.com/litecart/litecart/blob/2.5.3/public_html/includes/templates/default.catalog/views/box_site_footer.inc.php
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 2 Jun 2023 06:01 can anyone share some ideas on how to stop the cell getting so tall with lots of root categories? thanks
btkg LiteCart Fan Dari United Kingdom Anggota sejak Jul 2019 btkg 2 Jun 2023 10:33 Zara Without knowing anything about your circumstances the somewhat trite answer would be have less categories! That said, is it possible that your category list could be collapsed by reassigning / rethinking the list? As an example from my own field. I could have a category list of China / India / Japan / Africa / Indonesia / Blends. On the other hand these all reside under the one category Teas. Matter of personal preference really, but I'm sure that there is research that shows the more choice you offering the less likely you are to reach a sale. The coding approach - and I am not offering assistance on this, just a "what if" - would be to add another footer (duplicate the code for the footer) to the page but this time strip out the other "cells" and have it filled with just the categories. With the correct css this would then be a neat box across the screen - tho' this would really only apply to a broad screen. Just how much scrolling your viewers would have to do on a 'phone is anybodies guess. Which I suspect leads back to your original issue with the output in your picture .... ? Unless of course you decide that for a 'phone you do not display the box, in which case you could ask what is the point in having it in the first place, which in a horribly cyclic way gets back to the number of categories.... I could be wrong but I'm sure that the majority of site views are now on a 'phone - if you start with a 'phone view and "design out" from there approach you may get a different perspective on what you are trying to achieve. Not trying to be a bummer, and hope this helps. Dave
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 3 Jun 2023 07:14 hello, i dont quiet think "having less categories" is a solution to this problem (something that i surely could have resolved myself) to leave the categories cell there in the footer, it will be to tall. i could remove it, if it does not misalign the footer and maintain the centring of the other cells. categories - brands - account - information - contact seem to fit best, i am not sure how to correctly change that. thanks
btkg LiteCart Fan Dari United Kingdom Anggota sejak Jul 2019 btkg 3 Jun 2023 09:36 Zara I did say that I [i]was[/i] being trite, and being fair your original question did seem to imply that you needed the category list in the footer. However if you just need to remove the section from the footer it is a simple task to either comment out the category bit in the footer or just delete it. That will however leave 4 cells in a box designed for 5 - which will left align. To solve that problem you will then need to go into the css. But remember that you shouldn't make changes to the core template. You should create your own duplicate and make the changes there which will avoid the possibility of them being overwritten on updates. You will need to get your hands dirty to some degree editing code tho' to achieve this.
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 15 Agu 2023 05:16 Can anyone share some ideas on how to stop the cell getting so tall with lots of root categories?
tim Founder Dari Sweden Anggota sejak Mei 2013 tim 15 Agu 2023 17:24 It is limited to 10 first categories, here is the logic. https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/boxes/box_site_footer.inc.php#L25 I will remove Categories and Manufacturers in the site footer in a future version.
btkg LiteCart Fan Dari United Kingdom Anggota sejak Jul 2019 btkg 18 Agu 2023 10:20 Further to my previous suggestions the only way that you can reduce the height of the list would be to go into the css and set the font size and spacings to be much smaller that the other cells in the footer (I suppose that you could also do the reverse and make the text/spacing in the other cells larger till you achieve height parity). Or perhaps turn the category cell into a scrollable list? Apart from that there really is no way you can have two asymetric lists side by side with the same typesetting without one looking larger than the other.
zara LiteCart Fan Dari Australia Anggota sejak Apr 2023 zara 9 Sep 2023 05:43 thanks tim, if (++$i < 10) { $box_site_footer->snippets['categories'][$category['id']] = [ 'id' => $category['id'], 'name' => $category['name'], 'link' => document::ilink('category', ['category_id' => $category['id']]), ]; changed to if (++$i < 4) { now its shows first 3 cats. then .more... perfect