New menu-item to new category page does not show new product

  • Posts: 16
  • Thank you received: 2
  • Hikashop Essential
1 month 1 week ago #319656

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.27

Upgraded from old HS essential version 2.1.3 to version 4.3.0

Everything works OK but have a problem with adding new category, a new menu-item and a new product. Below the steps.


New category
New HS category "Persoonlijke ontwikkeling".
Canonical URL = /hikashop-menu-for-module-122/category/84-persoonlijke-ontwikkeling

New menu item
Within existing menu created a new menu-item called "Persoonlijke ontwikkeling".
Alias is "persoonlijke-ontwikkeling".
In tab "Category options" / tab "Div" ==> block "Data display" choose Main category = "Persoonlijke ontwikkeling".
Furthermore all same options as a an already existing menu-item.

New HS product
Added one new HS product with product code "PER-900".
Added this new HS product to this the new HS category "Persoonlijke ontwikkeling".
Added this new HS product also to another already existing category "Overdag".

Results
New added HS product does NOT show up in the new category page "Persoonlijke ontwikkeling" when selecting menu-item "Persoonlijke ontwikkeling".
New added HS product does show up in existing category page "Overdag" when selecting existing menu-item "Overdag".

Looks like assigning the new product to a new category has a problem but assigning it to existing category has NO problem.
What did I miss here?
Something changed during the migration to the new HS version?

Furthermore
On the admin page for the existing menu-item I get the warning:
You have an override on the view 'category / listing' so the settings under the tab 'Product Options' will potentially not be used. Please backup your modifications and delete the override.

I do not get this warning on the new menu-item page. I don't understand this?!?

Removing the override shows the new HS product on the menu item / category page "Persoonlijke ontwikkeling" but the layout is not what I want.

On the menu-item / category page "Overdag" I get the new HS product in the layout of the override "listing.php".

Where does it go wrong?

Please Log in or Create an account to join the conversation.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
1 month 1 week ago #319682

Hi,

Your previous menu items were created with the old interface which stored the settings of the menu items in the hikashop_config table.
The new menu items you create now use the new interface which stores the settings of the menu items along with the rest of the settings in the joomla menus table.
Your old view override takes the settings from the hikashop_config table, but doesn't know about the settings in the menu item and thus it doesn't find the settings of the new menu item and can't display the products properly.
Without the old view override, the default view file of the latest version will be able to get the data from both sources so that it works with old and new menu items.

So basically, the modifications added in the category / listing.php override you have need to be copied, then you delete the view override, and recreate it based on the current version and the modifications you can now paste to that new version.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
  • Hikashop Essential
1 month 1 week ago #319792

Hi Nicolas,

Thanks for your answer.
I got really confused about this strange behaviour but with your explanation I understand what happens "behind the scenes".
I will re-contruct a new "category / listing.php" override and incorporate the old changes into it.
That should do the job.

Greetz,
Bart

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
  • Hikashop Essential
1 month 6 days ago #319921

Hi Nicolas,

Tried to change the override as you described above. That works fine.

See attachment "original_structure.png" which works still fine after migration from HS v2 to v4.

for a new HS category and menu-item I get the product / listing_div.php.
But can you tell me where do I force the product / listing_table.php to appear correctly ?
I can not find any setting to get this product / listing_table.php to occur.
I still see the product / listing_div.php appearing.
See attachment new_structure.png.

Steps I did are:
- Added new HS category "Persoonlijke ontwikkeling" only for the momentjust one single product called "Werken aan je EGO".
- Added a new menu with menu-type Hikashop ==> Category listing.
- Filled in all the setting s same as other "old" menu-item.
- I want to force product / listing_table.php but don't know where to look for?

Attachments:
Last edit: 1 month 6 days ago by bartuelen.

Please Log in or Create an account to join the conversation.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
1 month 5 days ago #319923

Hi,

In product / listing.php you have that line which loads either listing_div or listing_table based on how your menu item is configured:

$html = $this->loadTemplate($layout_type);
Note that you'll see that line twice in that file and you can replace both.
You can use instead:
$html = $this->loadTemplate('table');

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
  • Hikashop Essential
1 month 2 days ago #320124

Hi Nicolas,

Solution applied and it works fine!

Thanks!

Bart

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum