VM category and homepage H1 tags

Fashion and clothing responsive Joomla ecommerce template with full VirtueMart support and advanced store features.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Nov 06, 2013 8:58 am
Reply with quote
Report this post
Hello,

I try to optimize the Shop and Buy template for a virtuemart store.
I have some troubles with the h1 tags that are missing in homepage and, most annoying, into category view page.
For homepage the problem is a user choice, so i can fix it somehow. Each person may want different approach here.
On category page on the other hand i don't have the category name displayed by template, thing that doesn't allow me to set the h1 tag to category name. For products is displaying the product name as h1, excellent. But for categories?

Please advise
User avatar
Fresh Boarder

teitbite
Wed Nov 06, 2013 10:41 am
Reply with quote
Report this post
Hi

Please edit /html/com_virtuemart/category/default.php and put this on top of the part showing a category description:

Code: Select all
<h1 class="category_title">
   <?php echo $this->category->category_title; ?>
</h1>


I'm not sure if showing a "category_title" will do the job, so it's better to make a dump and check where a category title is hidding. To make a dump pleas use this code somewhere in a mentioned file:

Code: Select all
print '<pre>';
var_dump( $this->category );
print '</pre>';


so if the code I gave You will not work try using a different field name from a dump instead of category_title. Unfortunatelly a default VM style is not supporting it either so I have nothing to compare it with :(
User avatar
Moderator

GK User
Thu Nov 07, 2013 9:18 am
Reply with quote
Report this post
Thanks, i have fix it almoust as you say with addindg the category name into the templates/gk_shop_and_buy/html/cpm_virtuemart/category/default.php

<?php if (empty($this->keyword) && !empty($this->category) && !empty($this->category->category_description)) : ?>
<div class="category_description">
<?php if(!empty($this->category->category_name)) : ?>
<h1><?php echo $this->category->category_name; ?></h1>
<?php endif; ?>
<?php echo $this->category->category_description; ?>
</div>
<?php endif; ?>
User avatar
Fresh Boarder

teitbite
Thu Nov 07, 2013 4:32 pm
Reply with quote
Report this post
Hi

Ok. So it was "category_name" :) That was the part I was not sure. Great to hear You got it working anyway.
User avatar
Moderator


cron