| Current Path : /home/bijouxly/www/templates/themler2016w_160437/editor/includes/cartlink/ |
| Current File : /home/bijouxly/www/templates/themler2016w_160437/editor/includes/cartlink/default_cartlink_8.php |
<div class="data-control-id-812639 bd-horizontalmenu-23 clearfix <?php echo $params->get('moduleclass_sfx'); ?>" data-cart-position="<?php echo $module->position; ?>" data-id="8" data-template="<?php echo JFactory::getApplication()->getTemplate(); ?>">
<div class="bd-container-inner">
<ul class="data-control-id-812640 bd-menu-49 nav nav-pills navbar-left">
<li class="data-control-id-812641 bd-menuitem-52">
<a href="<?php echo $cartHref; ?>">
<?php if ($data->totalProduct and $show_price): ?>
<span>
<?php echo JText::_('COM_VIRTUEMART_CART_TITLE');?>
</span>
<div class="data-control-id-812705 bd-pricetext-32">
<span class="data-control-id-812704 bd-container-71 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-51-popup">
<ul class="data-control-id-812652 bd-menu-51">
<li class="data-control-id-812653 bd-menuitem-53">
<div class="data-control-id-812671 bd-cartcontainer-9">
<?php $currentRawProduct = reset($data->rawProducts); ?>
<div class="data-control-id-812826 bd-grid-12">
<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-22 col-md-12 list">
<div class="data-control-id-812851 bd-griditem-22"><div class="data-control-id-812853 bd-layoutcontainer-50 bd-columns bd-no-margins">
<div class="bd-container-inner">
<div class="container-fluid">
<div class="row ">
<div class="data-control-id-812918 bd-columnwrapper-183
col-md-4">
<div class="bd-layoutcolumn-183 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="data-control-id-812919 bd-imagestyles-12"', false);
else
$imgHtml = str_replace('<img', '<img class="data-control-id-812919 bd-imagestyles-12" ', $productItems->productImage->image);
?>
<a class="data-control-id-812920 bd-productimage-14 bd-no-margins" href="<?php echo $productItems->productImage->link; ?>">
<?php echo $imgHtml; ?>
</a>
<?php endif; ?>
<?php endif; ?></div></div>
</div>
<div class="data-control-id-812879 bd-columnwrapper-182
col-md-7">
<div class="bd-layoutcolumn-182 bd-column" ><div class="bd-vertical-align-wrapper"><?php if (isset($productItems->productTitle)) : ?>
<div class="data-control-id-812915 bd-producttitle-24">
<?php
if ('' !== $productItems->productTitle->link)
echo JHTML::link($productItems->productTitle->link, $productItems->productTitle->name);
else
echo $productItems->productTitle->name;
?>
</div>
<?php endif; ?>
<div class="data-control-id-812914 bd-cartprice-9">
<?php echo $product['quantity'] ?> x <div class="data-control-id-812913 bd-pricetext-34">
<?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="data-control-id-812861 bd-columnwrapper-181
col-md-1">
<div class="bd-layoutcolumn-181 bd-column" ><div class="bd-vertical-align-wrapper"><a class="data-control-id-812877 bd-itemeditlink-9" href="<?php echo $product['href']; ?>">
<span class="
bd-icon-115 bd-icon data-control-id-812876"></span>
</a>
</div></div>
</div>
</div>
</div>
</div>
</div></div>
</div>
<?php $currentRawProduct = next($data->rawProducts); ?>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="data-control-id-812823 bd-pricetext-33">
<span class="data-control-id-812790 bd-label-33">
<?php echo $totalLabel; ?>
</span>
<span class="data-control-id-812822 bd-container-72 bd-tagstyles">
<?php echo $totalPrice; ?>
</span>
</div>
<div class="data-control-id-812771 bd-layoutcontainer-49 bd-columns bd-no-margins">
<div class="bd-container-inner">
<div class="container-fluid">
<div class="row ">
<div class="data-control-id-812784 bd-columnwrapper-177
col-md-4">
<div class="bd-layoutcolumn-177 bd-column" ><div class="bd-vertical-align-wrapper"><a href="<?php echo $cartHref; ?>" class="data-control-id-812785 bd-button">
<?php echo $cartText; ?>
</a></div></div>
</div>
<div class="data-control-id-812777 bd-columnwrapper-176
col-md-8">
<div class="bd-layoutcolumn-176 bd-column" ><div class="bd-vertical-align-wrapper"><a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart&task=checkout_task'); ?>" class="data-control-id-812778 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>