%PDF- %PDF-
| Direktori : /home/lightco1/www/templates/lightco/html/com_virtuemart/manufacturer/ |
| Current File : /home/lightco1/www/templates/lightco/html/com_virtuemart/manufacturer/default.php |
<?php
/**
*
* Description
*
* @package VirtueMart
* @subpackage Manufacturer
* @author Kohl Patrick, Eugen Stranz
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2701 2011-02-11 15:16:49Z impleri $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
// Category and Columns Counter
$iColumn = 1;
$iManufacturer = 1;
// Calculating Manufacturers Per Row
$manufacturerPerRow = VmConfig::get ('manufacturer_per_row', 3);
if ($manufacturerPerRow > 1) {
$manufacturerCellWidth = ' width'.floor ( 100 / $manufacturerPerRow );
} else {
$manufacturerCellWidth = '';
}
// Separator
$verticalSeparator = " vertical-separator";
$horizontalSeparator = '<div class="horizontal-separator"></div>';
// Lets output the categories, if there are some
if (!empty($this->manufacturers)) { ?><h1 class="project-heading">Browse by Brand</h1>
<div class="manufacturer-view-default">
<?php // Start the Output
foreach ( $this->manufacturers as $manufacturer ) {
// Show the horizontal seperator
if ($iColumn == 1 && $iManufacturer > $manufacturerPerRow) {
echo $horizontalSeparator;
}
// this is an indicator wether a row needs to be opened or not
if ($iColumn == 1) { ?>
<div class="row">
<?php }
// Show the vertical seperator
if ($iManufacturer == $manufacturerPerRow or $iManufacturer % $manufacturerPerRow == 0) {
$showVerticalSeparator = ' ';
} else {
$showVerticalSeparator = $verticalSeparator;
}
// Manufacturer Elements
$manufacturerURL = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id, FALSE);
$manufacturerIncludedProductsURL = JRoute::_('index.php?option=com_virtuemart&view=category&brand=true&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id, FALSE);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb("",false);
if($manufacturer->virtuemart_manufacturer_id == 24){
$manufacturerIncludedProductsURL = 'http://lightco.com.au/il-fanale';
$doc =& JFactory::getDocument();
$doc->setMetaData( 'title', 'LightCo Luxury Lighting - Il Fanale® Official Importer');
}
//var_dump($manufacturer->virtuemart_manufacturer_id);
// Show Category ?>
<div class="manufacturer floatleft<?php echo $manufacturerCellWidth . $showVerticalSeparator ?>">
<div class="spacer">
<!--<h2>
<a title="<?php //echo $manufacturer->mf_name; ?>" href="<?php //echo $manufacturerURL; ?>"><?php //echo $manufacturer->mf_name; ?></a>
</h2>-->
<?php
if(file_exists($manufacturer->images[0]->file_url)){
if (getimagesize($manufacturer->images[0]->file_url) !== false) {
$info = pathinfo($manufacturer->images[0]->file_url);
if($info['extension'] == 'jpg'){
$f_url = $info["dirname"].'/resized/'.$info["filename"]."_300x350.jpg";
}
else{
$f_url = $info["dirname"].'/resized/'.$info["filename"]."_300x350.png";
}
if(file_exists($f_url)){
if (getimagesize($f_url) !== false) {
?>
<a title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerIncludedProductsURL; ?>">
<img class="product_sub_img" style="max-height: 90px; width: auto;" src="<?php echo $f_url; ?>" alt="<?php echo $manufacturer->mf_name; ?> Image">
</a>
<?php } }else{ ?>
<a title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerIncludedProductsURL; ?>">
<img class="product_sub_img" style="max-height: 90px; width: auto;" src="<?php echo $manufacturer->images[0]->file_url; ?>" alt="<?php echo $manufacturer->mf_name; ?> Image">
</a>
<?php }}}else{ ?>
<a title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerIncludedProductsURL; ?>">
<img class="sub_cat_img" style="height: 255px !important; width: 218px;" src="images/img_not_available.png" alt="">
</a>
<?php }?>
</div>
</div>
<?php
$iManufacturer ++;
// Do we need to close the current row now?
if ($iColumn == $manufacturerPerRow) {
echo '<div class="clear"></div></div>';
$iColumn = 1;
} else {
$iColumn ++;
}
}
// Do we need a final closing row tag?
if ($iColumn != 1) { ?>
<div class="clear"></div>
</div>
<?php } ?>
</div>
<?php
}
?>