<?php /* Smarty version Smarty-3.1.8, created on 2019-10-16 13:52:58
         compiled from "/home/stg70/public_html/agmc-v2/application/core/views/frontend/custom/catalog/default/CatalogGridBlock.tpl" */ ?>
<?php /*%%SmartyHeaderCode:7552927925da6e87a879786-22953199%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1ac6e63be27ba52f75290095064f771e811a0203' => 
    array (
      0 => '/home/stg70/public_html/agmc-v2/application/core/views/frontend/custom/catalog/default/CatalogGridBlock.tpl',
      1 => 1571049180,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '7552927925da6e87a879786-22953199',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'prodsMaxCount' => 0,
    'resProducts' => 0,
    'toAppend' => 0,
    'resProduct' => 0,
    'uniqueID' => 0,
    'productID' => 0,
    'listLevel' => 0,
    'originCatalogID' => 0,
    'language' => 0,
    'categoryKey' => 0,
    'view_public_path' => 0,
    'view_images' => 0,
    'showTitle' => 0,
    'bodystyleparam' => 0,
    'catparam' => 0,
    'urlValue' => 0,
    'brandName' => 0,
    'languageDirection' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5da6e87a942ab5_10047479',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5da6e87a942ab5_10047479')) {function content_5da6e87a942ab5_10047479($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_truncate')) include '/home/stg70/public_html/agmc-v2/library/template/plugins/modifier.truncate.php';
?><script type="text/javascript">
    var productsCountVar = '<?php echo (($tmp = @$_smarty_tpl->tpl_vars['prodsMaxCount']->value)===null||$tmp==='' ? 0 : $tmp);?>
';
    var lastCatkey       = "<?php echo $_smarty_tpl->tpl_vars['resProducts']->value[count($_smarty_tpl->tpl_vars['resProducts']->value)-1]['catKey'];?>
|default:''";
   
</script>

<?php if ((($tmp = @$_smarty_tpl->tpl_vars['toAppend']->value)===null||$tmp==='' ? '' : $tmp)!='Yes'){?>
<ul class="cateListing list-unstyled m-0 gridBg row p-0" id="prodListingUl">
    <?php }?> 
    <?php $_smarty_tpl->tpl_vars["categoryKey"] = new Smarty_variable('', null, 0);?>
    <?php  $_smarty_tpl->tpl_vars['resProduct'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['resProduct']->_loop = false;
 $_smarty_tpl->tpl_vars["key"] = new Smarty_Variable;
 $_from = (($tmp = @$_smarty_tpl->tpl_vars['resProducts']->value)===null||$tmp==='' ? array() : $tmp); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['resProduct']->key => $_smarty_tpl->tpl_vars['resProduct']->value){
$_smarty_tpl->tpl_vars['resProduct']->_loop = true;
 $_smarty_tpl->tpl_vars["key"]->value = $_smarty_tpl->tpl_vars['resProduct']->key;
?> 
    <?php $_smarty_tpl->tpl_vars["productID"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['productID'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productOptionsCount"] = new Smarty_variable((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['productOptionCount'])===null||$tmp==='' ? '' : $tmp), null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["offerPrice"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['offerPrice'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productOptionRegularPrice"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['productOptionRegularPrice'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productOptionCashBack"] = new Smarty_variable((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['productOptionCashBack'])===null||$tmp==='' ? '' : $tmp), null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productOptionOfferDiscount"] = new Smarty_variable(round($_smarty_tpl->tpl_vars['resProduct']->value['productOptionOfferDiscount']), null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productOptionQuantitySum"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['productOptionQuantitySum'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["item.freeProductsCount"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['freeProductsCount'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["productCurrency"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['productDefaultCurrency'], null, 0);?> 
    <?php $_smarty_tpl->tpl_vars["uniqueID"] = new Smarty_variable((($tmp = @$_smarty_tpl->tpl_vars['uniqueID']->value)===null||$tmp==='' ? '' : $tmp), null, 0);?>

		 <li class="col-12 col-sm-6 col-md-4 col-lg-6 col-xl-4 p-0" rel="product_<?php echo $_smarty_tpl->tpl_vars['productID']->value;?>
" uniqueID="<?php echo $_smarty_tpl->tpl_vars['uniqueID']->value;?>
">
        <div class="imageBox bg-white mb-sm-0 mb-3 text-left h-100 d-flex flex-column position-relative">
            <div class="image-thumb position-relative px-3 py-2">
                <figure class="position-relative mb-0">
                    <?php if ((($tmp = @$_smarty_tpl->tpl_vars['listLevel']->value)===null||$tmp==='' ? '' : $tmp)=='3'){?>
                        <?php ob_start();?><?php echo (($tmp = @$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['sef_path'][0][0]->getSefRequestPath($_smarty_tpl->tpl_vars['resProduct']->value['productID'],'product',$_smarty_tpl->tpl_vars['originCatalogID']->value))===null||$tmp==='' ? 0 : $tmp);?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable($_tmp1, null, 0);?>
                        <?php ob_start();?><?php echo (($tmp = @$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['sef_path'][0][0]->getSefRequestPath($_smarty_tpl->tpl_vars['resProduct']->value['productID'],'product',$_smarty_tpl->tpl_vars['originCatalogID']->value))===null||$tmp==='' ? 0 : $tmp);?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php if ((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['catKey'])===null||$tmp==='' ? '' : $tmp)!=$_smarty_tpl->tpl_vars['categoryKey']->value){?><?php echo "<div class='category_icon position-absolute font-weight-bold'>";?><?php echo $_smarty_tpl->tpl_vars['resProduct']->value['catBgName'];?><?php echo "</div>";?><?php }?><?php $_tmp3=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>$_tmp2,'class'=>"d-inline-block w-100",'title'=>$_smarty_tpl->tpl_vars['language']->value['lblViewDetails'],'content'=>$_tmp3."<img class='lazy img-fluid' data-original='".($_smarty_tpl->tpl_vars['view_public_path']->value)."/uploads/catalog/vehicles/thumb/".($_smarty_tpl->tpl_vars['resProduct']->value['productImage'])."' src='".($_smarty_tpl->tpl_vars['view_images']->value)."/loader-small.gif' alt='".($_smarty_tpl->tpl_vars['resProduct']->value['productTitle'])."'>"),$_smarty_tpl);?>

                   <?php }else{ ?>
                      
                       <?php if ((($tmp = @$_smarty_tpl->tpl_vars['listLevel']->value)===null||$tmp==='' ? '' : $tmp)=='1'){?>
                           <?php if ((($tmp = @mb_strtolower($_smarty_tpl->tpl_vars['resProduct']->value['bodyStyle'], 'UTF-8'))===null||$tmp==='' ? '' : $tmp)!='off road'){?>
                                <?php $_smarty_tpl->tpl_vars["showTitle"] = new Smarty_variable((($_smarty_tpl->tpl_vars['resProduct']->value['catName']).(" ")).($_smarty_tpl->tpl_vars['resProduct']->value['bodyStyle']), null, 0);?>
                           <?php }else{ ?>
                               <?php $_smarty_tpl->tpl_vars["showTitle"] = new Smarty_variable($_smarty_tpl->tpl_vars['resProduct']->value['catName'], null, 0);?>
                            <?php }?>
                       <?php }else{ ?>
                            <?php $_smarty_tpl->tpl_vars["showTitle"] = new Smarty_variable(($_smarty_tpl->tpl_vars['resProduct']->value['productShortDescription']), null, 0);?>
                       <?php }?>
                       <?php if ((($tmp = @$_smarty_tpl->tpl_vars['showTitle']->value)===null||$tmp==='' ? '' : $tmp)==''){?>
                           <?php $_smarty_tpl->tpl_vars["showTitle"] = new Smarty_variable(($_smarty_tpl->tpl_vars['resProduct']->value['productTitle']), null, 0);?>                           
                        <?php }?>
                        <?php if ((($tmp = @mb_strtolower($_smarty_tpl->tpl_vars['resProduct']->value['bodyStyle'], 'UTF-8'))===null||$tmp==='' ? '' : $tmp)!='off road'){?>
                             <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['resProduct']->value['catKey'])."/".($_smarty_tpl->tpl_vars['resProduct']->value['bodyStyle'])."/", null, 0);?>
                        <?php }else{ ?>
                             <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['resProduct']->value['catKey'])."/", null, 0);?>                             
                        <?php }?>
                        <?php $_smarty_tpl->tpl_vars["bodystyleparam"] = new Smarty_variable(($_smarty_tpl->tpl_vars['resProduct']->value['bodyStyle']), null, 0);?>
                        <?php if ((($tmp = @$_smarty_tpl->tpl_vars['listLevel']->value)===null||$tmp==='' ? '' : $tmp)=='2'){?>
                            <?php $_smarty_tpl->tpl_vars["catparam"] = new Smarty_variable(($_smarty_tpl->tpl_vars['resProduct']->value['catKey']), null, 0);?>
                            <?php if ((($tmp = @mb_strtolower($_smarty_tpl->tpl_vars['bodystyleparam']->value, 'UTF-8'))===null||$tmp==='' ? '' : $tmp)!='off road'){?>
                                 <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['catparam']->value)."/".($_smarty_tpl->tpl_vars['bodystyleparam']->value)."/code/".($_smarty_tpl->tpl_vars['resProduct']->value['bmwCode'])."/", null, 0);?>
                           <?php }else{ ?>
                                 <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['catparam']->value)."/code/".($_smarty_tpl->tpl_vars['resProduct']->value['bmwCode'])."/", null, 0);?>                     
                           <?php }?>
                        <?php }else{ ?>
                            <?php if ((($tmp = @mb_strtolower($_smarty_tpl->tpl_vars['bodystyleparam']->value, 'UTF-8'))===null||$tmp==='' ? '' : $tmp)!='off road'){?>
                                <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['resProduct']->value['catKey'])."/".($_smarty_tpl->tpl_vars['bodystyleparam']->value)."/", null, 0);?>
                           <?php }else{ ?>
                                <?php $_smarty_tpl->tpl_vars["urlValue"] = new Smarty_variable("/series/".($_smarty_tpl->tpl_vars['resProduct']->value['catKey'])."/", null, 0);?>                            
                           <?php }?>
                        <?php }?>
                      <?php ob_start();?><?php if ((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['catKey'])===null||$tmp==='' ? '' : $tmp)!=$_smarty_tpl->tpl_vars['categoryKey']->value){?><?php echo "<div class='category_icon position-absolute font-weight-bold'>";?><?php echo $_smarty_tpl->tpl_vars['resProduct']->value['catBgName'];?><?php echo "</div>";?><?php }?><?php $_tmp4=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>($_smarty_tpl->tpl_vars['urlValue']->value),'class'=>"d-inline-block w-100",'title'=>$_smarty_tpl->tpl_vars['language']->value['lblViewDetails'],'content'=>$_tmp4."<img class='lazy img-fluid' data-original='".($_smarty_tpl->tpl_vars['view_public_path']->value)."/uploads/catalog/vehicles/thumb/".($_smarty_tpl->tpl_vars['resProduct']->value['productImage'])."' src='".($_smarty_tpl->tpl_vars['view_images']->value)."/loader-small.gif' alt='".($_smarty_tpl->tpl_vars['showTitle']->value)."'>"),$_smarty_tpl);?>

                   <?php }?>
               </figure>
               <?php $_smarty_tpl->tpl_vars["categoryKey"] = new Smarty_variable(($_smarty_tpl->tpl_vars['resProduct']->value['catKey']), null, 0);?>
                <!-- days left ends -->
			 </div>
            <div class="deatils product-info-block px-md-4 px-3 pb-3"> 
                <?php if ((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['financeDesc'])===null||$tmp==='' ? '' : $tmp)!=''){?>
                    <div class="advantage-label bg-primary text-white font-xsmall px-lg-4 px-3 py-1 mb-3 text-center">
                    <span class="font-family-secondary"><?php echo $_smarty_tpl->tpl_vars['resProduct']->value['financeDesc'];?>
</span> <?php if ((($tmp = @$_smarty_tpl->tpl_vars['listLevel']->value)===null||$tmp==='' ? '' : $tmp)=='3'){?><?php if ((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['financeDetailedDesc'])===null||$tmp==='' ? '' : $tmp)!=''){?> <i class="icon-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<?php echo htmlspecialchars(htmlspecialchars_decode($_smarty_tpl->tpl_vars['resProduct']->value['financeDetailedDesc'], ENT_QUOTES), ENT_QUOTES, 'UTF-8', true);?>
"></i><?php }?><?php }?></div>
                   <?php }else{ ?>
                   
                    <div class="advantage-label bg-primary text-white font-xsmall px-lg-4 px-3 py-1 mb-3 text-center opacity-0">
                    <span class="font-family-secondary">offer</span></div>
                <?php }?>
			    <h6 class="productTitle font-weight-bold f15 mb-1">
                    <?php if ((($tmp = @$_smarty_tpl->tpl_vars['listLevel']->value)===null||$tmp==='' ? '' : $tmp)=='3'){?>
                        <?php ob_start();?><?php echo (($tmp = @$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['sef_path'][0][0]->getSefRequestPath($_smarty_tpl->tpl_vars['resProduct']->value['productID'],'product',$_smarty_tpl->tpl_vars['originCatalogID']->value))===null||$tmp==='' ? 0 : $tmp);?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['resProduct']->value['productTitle'],45);?>
<?php $_tmp6=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>$_tmp5,'content'=>($_smarty_tpl->tpl_vars['brandName']->value)." ".$_tmp6,'class'=>"text-secondary"),$_smarty_tpl);?>

                    <?php }else{ ?>
                        <?php ob_start();?><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['showTitle']->value,45);?>
<?php $_tmp7=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>($_smarty_tpl->tpl_vars['urlValue']->value),'content'=>($_smarty_tpl->tpl_vars['brandName']->value)." ".$_tmp7,'class'=>"text-secondary"),$_smarty_tpl);?>

                    <?php }?>
                </h6>
                <?php if ((($tmp = @$_smarty_tpl->tpl_vars['resProduct']->value['productOptionRegularPrice'])===null||$tmp==='' ? '' : $tmp)>=0){?>
            <div class="font-small">
                <?php echo $_smarty_tpl->tpl_vars['language']->value['lblStartFrom'];?>
 <span class="font-weight-bold"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['price'][0][0]->getFormattedCurrency($_smarty_tpl->tpl_vars['resProduct']->value['productOptionRegularPrice']);?>
</span></div>
                <?php }?>
                <div class="row m-0 pt-1 link-block align-items-center">
                    <div class="col-6 p-0 text-left">
                        <?php ob_start();?><?php if ($_smarty_tpl->tpl_vars['languageDirection']->value=='rtl'){?><?php echo "<i class='icon-arrow-left font-weight-bold font-xsmall mr-1'></i>";?><?php }else{ ?><?php echo "<i class='icon-arrow-right font-weight-bold font-xsmall mr-1'></i>";?><?php }?><?php $_tmp8=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>($_smarty_tpl->tpl_vars['urlValue']->value),'class'=>"font-weight-bold font-small viewDetail d-flex align-items-center py-1",'title'=>$_smarty_tpl->tpl_vars['language']->value['lblViewDetails'],'content'=>$_tmp8.($_smarty_tpl->tpl_vars['language']->value['lblViewDetails'])),$_smarty_tpl);?>

                    </div>
                </div>
            </div>
        </div>
    </li>
	<?php } ?>
<?php if ((($tmp = @$_smarty_tpl->tpl_vars['toAppend']->value)===null||$tmp==='' ? '' : $tmp)!='Yes'){?></ul><?php }?>
<?php if ((($tmp = @$_smarty_tpl->tpl_vars['toAppend']->value)===null||$tmp==='' ? '' : $tmp)!='Yes'&&count((($tmp = @$_smarty_tpl->tpl_vars['resProducts']->value)===null||$tmp==='' ? array() : $tmp))==0){?>
<?php echo $_smarty_tpl->getSubTemplate ('IndexNoProduct.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?>

<?php }?><?php }} ?>