VirtueMart 3.4.2
Template: vina_assyrian
Template developer: https://vinagecko.com/
- SP Pagebuilder
- Helix3
Problem:
When Virtuemart SEO is enabled background image of menu is wrong - It loads another menu item.
http://prntscr.com/uoa1kr
Description:
I am charged with administration of old Joomla webshop and template is out of date and is not being supported by developers for a long time. However client is happy with it and mostly it works ok.
Recently we activated SEO in Virtuemart configuration and all URLs became SEF.
The problem is on "product detail view" level where there is a title of the category with background image. This is called from menu item "background image".
What happens is that with Virtuemart SEO turned on somehow it shows details from another menu item "Kategorije2", while I am browsing product from category "White II". When looking at configuration of "Kategorije2" I see it is not linked to VM Category but to VM "Top level category". If I change that to some other category entire title (background image and text) are not displayed.
Menu item "White II" is setup properly and linked to appropriate category.
Menu item "Kategorije 2" is also set in menu type "Hidden".
I suspect it has something to do with linking categories and menu items but I haven't been able to see where that is.
I have also searched for modules but this title is not set up as a module, but it dinamically changes according to category you are browsing.
I have browsed through template files and files of Helix and SP but haven't been able to find details on generation. The only thing I found is where this title is generated but I wasn't able to see from where it is called:
templates/vina_assyrian/features/title.php
Code: Select all
class Helix3FeatureTitle {
private $helix3;
public function __construct($helix){
$this->helix3 = $helix;
$this->position = 'title';
}
public function renderFeature() {
$app = JFactory::getApplication();
$menuitem = $app->getMenu()->getActive(); // get the active item
if($menuitem) {
$params = $menuitem->params; // get the menu params
if($params->get('enable_page_title', 0)) {
$page_title = $menuitem->title;
$page_title_alt = $params->get('page_title_alt');
$page_subtitle = $params->get('page_subtitle');
$page_title_bg_color = $params->get('page_title_bg_color');
$page_title_bg_image = $params->get('page_title_bg_image');
$style = '';
$pathway = $app->getPathway();
$items = $pathway->getPathWay();
if(count($items) > 1) {
$last_name = end($items)->name;
}
else {
$last_name = $items[0]->name;
}
if($page_title_bg_color) {
$style .= 'background-color: ' . $page_title_bg_color . ';';
}
if($page_title_bg_image) {
$style .= 'background-image: url(' . JURI::root(true) . '/' . $page_title_bg_image . ');';
}
if( $style ) {
$style = ' style="' . $style . '"';
}
//if($page_title_alt) {
//$page_title = $page_title_alt;
//}
if($page_title_alt) {
$last_name = $page_title_alt;
}
$output = '';
$output .= '<div class="sp-page-title"'. $style .'>';
$output .= '<div class="container">';
//$output .= '<h1>'. $last_name .'</h1>';
$output .= '<h1>'. $page_title .'</h1>';
//if($page_subtitle) {
// $output .= '<h3>'. $page_subtitle .'</h3>';
//}
$output .= '</div>';
$output .= '</div>';
return $output;
}
}
}
}
VM SEO option:
http://prntscr.com/uoa0o3
SEO OFF (How it should look like)
===============================
Category view
http://prntscr.com/uoa257
Product detail view
http://prntscr.com/uoa2hz
SEO ON (Image and title are wrong)
===============================
Category view
http://prntscr.com/uoa15a
Product detail view
http://prntscr.com/uoa0o3
MENUS
===============================
"Women -> T-shirts -> White II" menu item
http://prntscr.com/uoa3bq
http://prntscr.com/uoa44w
"Kategorije2" menu item
http://prntscr.com/uoa3pc
http://prntscr.com/uoa55g
HELP
============
Any help or point to right direction is appreciated.
Unfortunately current Joomla is not up to date, nor is it planned for near future, and it seems that this will not help.