- Posts: 16
- Thank you received: 0
VirtueMart Category menu
-
noxmihai
Inactive member - Topic Author
- New Member
Less
More
11 years 1 month ago #34300
by noxmihai
Replied by noxmihai on topic VirtueMart Category menu
Hi Ivan, thank you for quick response.
That is true replacing category with categories the subcategories appear with picture.
So I replace the default.php from /templates/hot_drug_store/html/com_virtuemart/category
with
default.php from /templates/hot_drug_store/html/com_virtuemart/categories
but now the subcategories products don't show up
I do not know if what I did is correct
please give me a solution
That is true replacing category with categories the subcategories appear with picture.
So I replace the default.php from /templates/hot_drug_store/html/com_virtuemart/category
with
default.php from /templates/hot_drug_store/html/com_virtuemart/categories
but now the subcategories products don't show up
I do not know if what I did is correct
please give me a solution
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 1 month ago #34310
by ivan.milic
Replied by ivan.milic on topic VirtueMart Category menu
No you shouldn't do that. That are two different views you mixed files.
Return that and try this, for defualt.php in category layout view ,
replace:
with code form categories view:
Return that and try this, for defualt.php in category layout view ,
replace:
Code:
foreach ( $this->category->children as $category ) {
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
| <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
</a>
<?php
$iCategory ++;
}
with code form categories view:
Code:
foreach ( $this->category->children as $category ) {
// Show the horizontal seperator
if ($iCol == 1 && $iCategory > $categories_per_row) { ?>
<div class="horizontal-separator"></div>
<?php }
// this is an indicator wether a row needs to be opened or not
if ($iCol == 1) { ?>
<div class="row">
<?php }
// Show the vertical seperator
if ($iCategory == $categories_per_row or $iCategory % $categories_per_row == 0) {
$show_vertical_separator = ' ';
} else {
$show_vertical_separator = $verticalseparator;
}
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
<br />
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb("",false);
//} ?>
</a>
</h2>
</div>
</div>
<?php
$iCategory ++;
// Do we need to close the current row now?
if ($iCol == $categories_per_row) { ?>
<div class="clear"></div>
</div>
<?php
$iCol = 1;
} else {
$iCol ++;
}
}
The following user(s) said Thank You: noxmihai
Please Log in to join the conversation.
Time to create page: 0.081 seconds