Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#3996 by wenotine
04 Mar 2017, 08:00
Dear support,

Please help me to solve this issue:

When we upload a product, which has a start date that is different than now, it works fine and I can see the product in the store.

We made our menu regarding the mshop_index_catalog, and we count the products in the mshop_index_catalog table to show the customers, how many products are in a category.

If any product has a start date that is different than now, that product does not go to the index_catalog table, and this is my problem.

After I run aimeos job rebuildIndex, than all those products go to the index_catalog list.

After spent I dont know how many hours to find the exact place, where the products go to the mshop_index_catalog, I coudnt find it :) (nor in the saveItem() nor in the rebuildIndex()...

So, my question is, how and where should I run the rebuildIndex if I want to do this process automatically, so my menu will be always updated even if I have products, that has a different start date than now?

Thank you so much,

#3997 by aimeos
04 Mar 2017, 12:22
I still don't know what you exact problem is. Do you mean that products with a start date in the future are not shown?

The entries for the mshop_index_catalog table are written in the rebuildIndex() method of the index catalog manager:
#3998 by wenotine
05 Mar 2017, 11:00
Thanks for the reply,

Products in the future shown correctly, but we build our menu according to the mshop_index_catalog table contents:

$product_manager = \Aimeos\MShop\Factory::createManager($context, 'product');
$product_search = $product_manager->createSearch(true);
$product_search->setSlice(0, 1000000);

$catalog_controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
$tree_count_list = $catalog_controller->aggregateIndex( $product_search, '' );

So we use, the to build our menu like:

- t-shirt ( 69 pcs)
- shoes ( 51 pcs)

We get the xx pcs numbers from the

So my question is, how can I manually refresh the index.catalog table and add those items to the table, that are allready shown on the website BUT the index catalog list dont contain them.

Thank you!