News:

Support the VirtueMart project and become a member

Main Menu

Changing related categories template

Started by tzic, March 24, 2015, 17:09:45 PM

Previous topic - Next topic

tzic

Joomla version 2.5.11
VM Version 2.0.26d (with security fix applied)

Hello I use a third party plugin and categories show like this http://www.ahealthcare.gr/eshop Is there a way to use the same template for related categories in productdetails page which currently is like this? http://www.ahealthcare.gr/%CE%BD%CE%BF%CF%83%CE%BF%CE%BA%CE%BF%CE%BC%CE%B5%CE%B9%CE%B1%CE%BA%CE%AD%CF%82-%CE%BA%CE%BB%CE%AF%CE%BD%CE%B5%CF%82/%CF%87%CE%B5%CE%B9%CF%81%CE%BF%CE%BA%CE%AF%CE%BD%CE%B7%CF%84%CE%B1-%CE%BA%CF%81%CE%B5%CE%B2%CE%AC%CF%84%CE%B9%CE%B1/%CE%BA%CE%BB%CE%AF%CE%BD%CE%B7-%CE%BC%CE%BF%CE%BD%CF%8C%CF%83%CF%80%CE%B1%CF%83%CF%84%CE%B7-%CF%87%CE%B5%CE%B9%CF%81%CE%BF%CE%BA%CE%B9%CE%BD%CE%B7%CF%84%CE%B7-detail

In the directory mytemplate/html/categories/ the default.php file styles the "all categories" page

jimport('mowebso.joomla.thirdparty.virtuemart');
$mowebso = MoWebSoVirtuemart::getInstance();

// Include The Right Start File For The Chosen Theme
$this->addTemplatePath(JPATH_SITE . '/templates/' . $mowebso->templateName . '/html/com_virtuemart/themes/' . $mowebso->themeName . '/categories/');
echo $this->loadTemplate('start');


Is there a easy way to change the default_relatedcategories.php file located at /httpdocs/components/com_virtuemart/views/productdetails/tmpl in order to get the style of all categories?

defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();
$document->addStyleSheet('/components/com_virtuemart/assets/css/relcats.css');
?>


<div class="product-related-categories">
    <h1><?php echo JText::_('COM_VIRTUEMART_RELATED_CATEGORIES'); ?></h1>
    <div style="text-align:left;">
        <?php foreach ($this->product->customfieldsRelatedCategories as $field) { ?>
            <table cellspacing="0" cellpadding="0"  class="product-field product-field-type-<?php echo $field->field_type ?> grid-border" >

                <tr><td class="grid-td grid-border">