Your IP : 216.73.216.134


Current Path : /home/bijouxly/www/templates/carparts1/includes/cartlink/
Upload File :
Current File : /home/bijouxly/www/templates/carparts1/includes/cartlink/default_cartlink_1.php

<div class=" bd-horizontalmenu-3 clearfix <?php echo $params->get('moduleclass_sfx'); ?>" data-cart-position="<?php echo $module->position; ?>" data-id="1" data-template="<?php echo JFactory::getApplication()->getTemplate(); ?>">
    <div class="bd-container-inner">
        
        <ul class=" bd-menu-5 nav nav-pills navbar-left">
            <li class=" bd-menuitem-5">
                <a href="<?php echo $cartHref; ?>">
                    <?php if ($data->totalProduct and $show_price): ?>
                        
                            <span>
                                
                                    <?php echo JText::_('COM_VIRTUEMART_CART_TITLE');?>
                            </span>
                        
                            <div class=" bd-pricetext-7">
    
    <span class=" bd-container-10 bd-tagstyles">
        <?php echo $totalPrice; ?>
    </span>
</div>
                    <?php else: ?>
                        <span><?php echo $data->totalProductTxt; ?></span>
                    <?php endif ?>
                </a>
                <?php if ($show_product_list and $data->totalProduct): ?>
                    <div class="bd-menu-6-popup">
                        
                        <ul class=" bd-menu-6">
                            <li class=" bd-menuitem-6">
                                <div class=" bd-cartcontainer-2">
    <?php $currentRawProduct = reset($data->rawProducts); ?>
<div class=" bd-grid-17">
    <div class="container-fluid">
        <div class="separated-grid row">
        <?php foreach ($data->products as $product): ?>
            <?php
                preg_match('/href="(.*?)"/i', $product['product_name'], $hrefParts);
                $product['href'] = $hrefParts[1];
                //create product title decorator object
                $productTitleDecorator = new stdClass();
                $productTitleDecorator->link = $product['href'];
                $productTitleDecorator->name = $product['product_name'];
                //cretae products items collection
                $productItems = new stdClass();
                $productItems->productTitle = $productTitleDecorator;
                $productImageDecorator = new stdClass();
                $productImageDecorator->imagesExists = true;
                if ($currentRawProduct && $currentRawProduct->virtuemart_media_id && $currentRawProduct->virtuemart_media_id[0]) {
                    if (!class_exists ('TableMedias'))
                        require(JPATH_VM_ADMINISTRATOR . DS . 'tables' . DS . 'medias.php');
                    $db = JFactory::getDBO ();
                    $result = new TableMedias($db);
                    $result->load((int)$currentRawProduct->virtuemart_media_id[0]);
                    if (!class_exists ('VmMediaHandler'))
                        require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'mediahandler.php');
                    $media = VmMediaHandler::createMedia ($result, 'product');
                    $productImageDecorator->image = $media;
                } else {
                    $themeUrl = VmConfig::get('vm_themeurl',0);
                    if(empty($themeUrl)) {
                        $themeUrl = JURI::root().'components/com_virtuemart/';
                    }
                    $src = $themeUrl.'assets/images/vmgeneral/' . VmConfig::get('no_image_set');
                    $alt = JText::_('COM_VIRTUEMART_NO_IMAGE_SET');
                    $productImageDecorator->image = '<img src="' . $src . '" alt="' . $alt . '" />';
                }
                $productImageDecorator->link = $product['href'];
                $productImageDecorator->offsetHeight = 0;
                $productImageDecorator->offsetWidth = 0;
                $productItems->productImage = $productImageDecorator;
            ?>
            <div class="separated-item-4 col-md-12 list">
    <div class=" bd-griditem-4"><div class=" bd-layoutcontainer-12 bd-columns bd-no-margins">
    <div class="bd-container-inner">
        <div class="container-fluid">
            <div class="row ">
                <div class=" bd-columnwrapper-25 
 col-md-4">
    <div class="bd-layoutcolumn-25 bd-column" ><div class="bd-vertical-align-wrapper"><?php if (isset($productItems->productImage)) : ?>
    <?php if ($productItems->productImage->imagesExists) : ?>
    <?php
        $offsetHeight = isset($productItems->productImage->offsetHeight) ? $productItems->productImage->offsetHeight : 0;
        $offsetWidth = isset($productItems->productImage->offsetWidth) ? $productItems->productImage->offsetWidth : 0;
        $height = 'height:' . (VmConfig::get ('img_height') + $offsetHeight) . 'px;';
        $width ='width:' . (VmConfig::get ('img_width') + $offsetWidth) . 'px;';
        if (is_object($productItems->productImage->image))
            $imgHtml = $productItems->productImage->image->displayMediaThumb('class=" bd-imagestyles-28"', false);
        else
            $imgHtml = str_replace('<img', '<img class=" bd-imagestyles-28" ', $productItems->productImage->image);
    ?>
    <a class=" bd-productimage-3 bd-no-margins" href="<?php echo $productItems->productImage->link; ?>">
        <?php echo $imgHtml; ?>
    </a>
    <?php endif; ?>
<?php endif; ?></div></div>
</div>
	
		<div class=" bd-columnwrapper-26 
 col-md-7">
    <div class="bd-layoutcolumn-26 bd-column" ><div class="bd-vertical-align-wrapper"><?php if (isset($productItems->productTitle)) : ?>
<div class=" bd-producttitle-6">
    <?php
    if ('' !== $productItems->productTitle->link)
        echo JHTML::link($productItems->productTitle->link, $productItems->productTitle->name);
    else 
        echo $productItems->productTitle->name;
    ?>
</div>
<?php endif; ?>
	
		<div class=" bd-cartprice-2">
    <?php echo $product['quantity'] ?> x <div class=" bd-pricetext-8">
<?php
    if (!class_exists('CustomCurrency')) {
        class CustomCurrency {
            private $_style;
            public function __construct()
            {
                $vendorM = VmModel::getModel('currency');
                $this->_style = $vendorM->getData(0);
            }
            public function getDecimalSymbol()
            {
                if(!empty($this->_style))
                return $this->_style->currency_decimal_symbol;
            }
            public function getThousandsSeperator()
            {
                if(!empty($this->_style))
                return $this->_style->currency_thousands;
            }
        }
    }

    $currencyDisplay = new CustomCurrency();
    $decimalSymbol = $currencyDisplay->getDecimalSymbol();
    $thousandsSeparator = $currencyDisplay->getThousandsSeperator();
    if (preg_match('/[\.\d' . $decimalSymbol . $thousandsSeparator . ']+/', trim($product['subtotal_with_tax']), $matches)) {
        $price = $matches[0] / $product['quantity'];
        $leftCurrency = ''; $rightCurrency = '';
        $tmp = trim(str_replace($matches[0], '{s}', $product['subtotal_with_tax']));
        if ('' !== $tmp) {
            $parts = explode('{s}', $tmp);
            if ('' !== trim($parts[0]))
                $leftCurrency = $parts[0];
            else
                $rightCurrency = $parts[1];
        }
        if(!class_exists('calculationHelper'))
            require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'calculationh.php');
        $calculator = calculationHelper::getInstance ();
        $calculator->_roundindig = 0;
        echo  $leftCurrency . $calculator->roundInternal($price, 'salesPrice') . $rightCurrency;
    } else {
        echo $product['subtotal_with_tax'];
    }
?>
</div>
</div></div></div>
</div>
	
		<div class=" bd-columnwrapper-27 
 col-md-1">
    <div class="bd-layoutcolumn-27 bd-column" ><div class="bd-vertical-align-wrapper"><a class=" bd-itemeditlink-2" href="<?php echo $product['href']; ?>">
    <span class="
 bd-icon-27 bd-icon "></span>
</a>
	
		</div></div>
</div>
            </div>
        </div>
    </div>
</div></div>
</div>
        <?php $currentRawProduct = next($data->rawProducts); ?>
        <?php endforeach; ?>
        </div>
    </div>
</div>
	
		<div class=" bd-pricetext-9">
    <span class=" bd-label-9">
	<?php echo $totalLabel; ?>
</span>
    <span class=" bd-container-12 bd-tagstyles">
        <?php echo $totalPrice; ?>
    </span>
</div>
	
		<div class=" bd-layoutcontainer-13 bd-columns bd-no-margins">
    <div class="bd-container-inner">
        <div class="container-fluid">
            <div class="row ">
                <div class=" bd-columnwrapper-28 
 col-md-4">
    <div class="bd-layoutcolumn-28 bd-column" ><div class="bd-vertical-align-wrapper"><a href="<?php echo $cartHref; ?>" class=" bd-button">
    <?php echo $cartText; ?>
</a></div></div>
</div>
	
		<div class=" bd-columnwrapper-29 
 col-md-8">
    <div class="bd-layoutcolumn-29 bd-column" ><div class="bd-vertical-align-wrapper"><a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart&task=checkout_task'); ?>" class=" bd-button">
    <?php echo vmText::_('COM_VIRTUEMART_CHECKOUT_TITLE'); ?>
</a></div></div>
</div>
            </div>
        </div>
    </div>
</div>
</div>
                            </li>
                        </ul>
                        
                    </div>
                <?php endif ?>
            </li>
        </ul>
        
    </div>
</div>