News:

AbanteCart v1.4.2 is released.

Main Menu
support

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - dcart2

#1
Great.
Would love to test it out.

This forum's error message: "Sorry, you are not allowed to post external links." happens with putting in [ code ] [ / code ] by hand or using the #button
#2
Ok, I played with the storefront/model/catalog/category.php model, specifically getCategories(). I left the params as coded ($parent_id = 0, $limit=0) but changed the query to make sure that it would not grab the entire categories table (834 rows) but rather just 24 rows:
$parent_id = 0
and any that has
$parent_id IN (the_list_of_parents)

Store loads much quicker, and the `ul.categorymenu` displays and works correctly. That's all that's needed on the homepage. However, when traversing to `rt=product/category&path=4_662` the `div.contentpanel` loads 24 sub-categories. I'm pretty sure the 24 number is coincidently tied to my code change.

(I just hard-coded my parent_id=0 category_id's just to confirm working, fyi)
SELECT *
FROM categories c
LEFT JOIN category_descriptions cd ON (c.category_id = cd.category_id AND cd.language_id = '1')
LEFT JOIN categories_to_stores c2s ON (c.category_id = c2s.category_id)
WHERE c2s.store_id = '0' AND c.status = '1' AND
      ( c.category_id IN (1,3,4,6,7,8,10,13) OR c.parent_id IN (1,3,4,6,7,8,10,13) )
ORDER BY c.sort_order, LCASE(cd.name)

So, this helps, but is not my answer. More to come later.
#3
The cart that is having issues is not running on php7, but rather php5.4 with ABCart 1.2.6. We installed another cart on php7 that seems to be working fine.

I was looking at the `getCategory() in `storefront/model/catalog/category.php` and changed the $limit var from the coded `$limit=0` to various other numbers. At $limit=400, the site loads nicely, but no menus past 'Home' are shown. When I raise $limit=600, the first of the store's menu shows, but no children, and at $limit=800, the site starts to crawl again, and even reporting an error (url-encoded in subject line to help-at).


I run the query on the db directly and no issues:

SELECT *
FROM categories c
LEFT JOIN category_descriptions cd ON (c.category_id = cd.category_id AND cd.language_id = '1')
LEFT JOIN categories_to_stores c2s ON (c.category_id = c2s.category_id)
WHERE c.parent_id = '6' AND
     c2s.store_id = '0' AND c.status = '1'
ORDER BY c.sort_order, LCASE(cd.name)

Results in 6 rows in 49ms

OR

SELECT *
FROM categories c
LEFT JOIN category_descriptions cd ON (c.category_id = cd.category_id AND cd.language_id = '1')
LEFT JOIN categories_to_stores c2s ON (c.category_id = c2s.category_id)
WHERE c2s.store_id = '0' AND c.status = '1'
ORDER BY c.sort_order, LCASE(cd.name)


Results in 831 rows in 61ms

Any thoughts?

BTW, when I surround any of my message with square-bracket-code-square-bracket, the forum thinks I'm putting in external links and won't allow me to post the reply.
#4
To be clear about the category structure, there are 8 parent=0.
Of those there are a total of 16 immediate child categories.
Now those branch off and there are a total of 941 rows in `categories`.

I'm certain that this is the issue as I did truncate `categories` and `category_descriptions` and the site loaded speedily. Once the `categories` table got up to > 250 records, the site started to crawl.

Forum Rules Code of conduct
AbanteCart.com 2010 -