News:

Looking for documentation? Take a look on our wiki

Main Menu

Products in more than one category. Display cats?

Started by Kiku, January 19, 2012, 11:58:03 AM

Previous topic - Next topic

Kiku

What about showing product categories on product page?

If I put in \templates\SOMETEMPLATE\html\com_virtuemart\productdetails\default.php

<?php echo $this->product->category_name ?>

it will show only one category a praduct is assigned to, I have many products which are included in two or even three categories.

Please someone figure it out, I've found a guide for VM 1.1.x (http://forum.virtuemart.net/index.php?topic=46439.0) but obviously it doesn't work for VM 2.0

Thank you for any advice!

PRO

you could use the related categories file for this, but you would have to do it manually.

Kiku

Quote from: BanquetTables.pro on January 19, 2012, 13:28:31 PM
you could use the related categories file for this, but you would have to do it manually.

Thank you for your reply. That's some kind of solution, but as you said... manually. That's not the point. I'm sure someone who knows enough php language and VM can write that kind of modification. It's just the matter of time spent on it. I know very basics of whole structure of Joomla and VM - I'm a 100% beginner, so simply I can't do it  :-[ I even don't  know in which file functions are stored for the front end of shop  >:(

Kiku

Come on guys, anyone? Thought VM has bigger community :( Or maybe my question isn't correct? I'll donate if it's necessary.

bettondesign

I am also looking for the answer to this. This should be a basic part of any e-commerce framework.

I have used:
<?php echo $this->category->category_name?>
and
<?php echo $this->product->category_name?>
But they both give the same result. This seems to work in the same way as breadcrumbs in so far as it will display the category depending on how you navigate to the product.

If I find the answer I will post it here.

PRO


bettondesign

Still having no luck with this. It seems like it should be such as simple thing to fix but it's looking impossible.