Author Topic: Category module how does it work?  (Read 289 times)

Huubs

  • Jr. Member
  • **
  • Posts: 129
Category module how does it work?
« on: July 05, 2019, 15:51:07 pm »
Hello,

I want to use the category module to display the category image on one of my module positions, and let that be clickable to go through to the actual VM category page.

But I don't understand how this category works. Nothing shows up when I print_r the $categories. What are the variables I can use? I don't see what variables are available.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3467
  • using Matomo instead of Google Analytics
Re: Category module how does it work?
« Reply #1 on: July 05, 2019, 23:08:34 pm »
If you want to include only a single VM category, you can achieve that, if you create a menu module in an available module position and assign a single VM category to it. Then select a category image in the menu settings > 'Link Type' tab.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Huubs

  • Jr. Member
  • **
  • Posts: 129
Re: Category module how does it work?
« Reply #2 on: July 09, 2019, 11:00:05 am »
If you want to include only a single VM category, you can achieve that, if you create a menu module in an available module position and assign a single VM category to it. Then select a category image in the menu settings > 'Link Type' tab.

Hmm, is that the only option? Because I like to use the category images instead...

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3905
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Category module how does it work?
« Reply #3 on: July 09, 2019, 13:39:10 pm »
See the component/virtuemart/view/category.
You have all code to get full categories with image

Huubs

  • Jr. Member
  • **
  • Posts: 129
Re: Category module how does it work?
« Reply #4 on: July 09, 2019, 15:54:02 pm »
See the component/virtuemart/view/category.
You have all code to get full categories with image

I have to make use of a module. So I thought about using the mod_virtuemart_category module. But that code is so weird, because every change I make it's not being showed.


Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2235
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Category module how does it work?
« Reply #5 on: July 09, 2019, 17:13:23 pm »
Clear cache and make sure your host does not use cache.
Make sure you either use template overrides or copy and rename module and classes.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Huubs

  • Jr. Member
  • **
  • Posts: 129
Re: Category module how does it work?
« Reply #6 on: July 10, 2019, 11:49:22 am »
Clear cache and make sure your host does not use cache.
Make sure you either use template overrides or copy and rename module and classes.

Jörgen @ Kreativ Fotografi

Yeah I did. But it's still not showing. It's like it doesnt exist. Is there any documentation regarding this module? Because even if I don't use overrides but edit the core module file it doesn't change or anything. I don't get the module at all. Why is it acting so weird?

Let me reprhase my question. Is there a possibility to add a module (doesnt have to be the category module) to show the image of the category and also directly make that image a link to the actual category page. I want it to be that the module only have to select the category to show, and that the module does the rest. I don't want to insert the image and link manually like in a custom html module. I want to use the things I set in Virtuemart itself.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2235
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Category module how does it work?
« Reply #7 on: July 10, 2019, 12:32:47 pm »
Have You published the module ?
Have You used a proper position ?
Have You set parent category to show, one level above that You want to display?

Have You checked how it works before modifying ?


Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Huubs

  • Jr. Member
  • **
  • Posts: 129
Re: Category module how does it work?
« Reply #8 on: July 10, 2019, 13:23:57 pm »
Have You published the module ?
Have You used a proper position ?
Have You set parent category to show, one level above that You want to display?

Have You checked how it works before modifying ?


Jörgen @ Kreativ Fotografi

Yeah I published it. Multiple posiitons, and I have all the categories publsihed and enabled.

Yeah but still it doesn't deisplay anything. It seems like it just doesn't render or execure.

EDIT: Ok I found the solution.

Now I want to show the variables that are available. Hwo can I see what variables are available?


I am using another module, this is working like absolute shite haha.