why this code not work ?? vm 3 categories/default.php
<?php
foreach ($category->childs as $child) {
$caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$child->virtuemart_category_id);
$cattext = vmText::_($child->category_name);
?>
<a href="<?php echo $caturl ?>" title="<?php echo $child->category_name ?>"><?php echo $child->category_name ?></a>
<br />
<?php
}
?>
Because ther is some error
Jörgen @ Kreativ Fotografi
There should be code to look at and understand, I will not write your code for You. Maybe some one else will work for free for You.
Look at the category module and You should find some examples. Just saying this don´t work, taken out of context does not help much.
using print_r( ... ) helps to see what there is to use.
Jörgen @ Kreativ Fotografi
Os jorgen says, you should print_r the $category, perhaps no children exist ?
Why you dont hire someone ?
And you say categories/default.php and after explain code from a Joomla module.
If you dont explain what you want we loose more time (and you) for simple things.
Have you child categories ?
have you disabled show child categories in the menu setting or Vm config ?
Sorry, but we are here to help, not to code for you.
Do a var_dump or vmdebug.
See original code, you have already a sample how to do in views/category folder