Merge branch 'ticket-9260' into develop
This commit is contained in:
commit
1fdec1c945
@ -42,12 +42,18 @@ class CategoryImg extends Module {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file_exists(_PS_ROOT_DIR_.'/img/c/'.(int)$params['id_category'].'_thumb_vp.jpg') && $params['id_category'] != $category->id) {
|
||||
$id_category_thumb = $params['id_category'];
|
||||
} else {
|
||||
$id_category_thumb = $category->id;
|
||||
}
|
||||
|
||||
$sale = Sale::getSaleFromCategory(Tools::getValue('id_category'));
|
||||
$smarty->assign('sale', $sale);
|
||||
$smarty->assign('consumable', ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false);
|
||||
$smarty->assign('category', $category);
|
||||
$smarty->assign('is_thumb_vp',(file_exists(_PS_ROOT_DIR_.'/img/c/'.$category->id.'_thumb_vp.jpg')));
|
||||
$smarty->assign('is_thumb_vp',(file_exists(_PS_ROOT_DIR_.'/img/c/'.$id_category_thumb.'_thumb_vp.jpg')));
|
||||
$smarty->assign('id_category_thumb',$id_category_thumb);
|
||||
return $this->display(__FILE__, 'left_img.tpl');
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<div class="logo_cat">
|
||||
{if $is_thumb_vp}
|
||||
<img src="{$base_dir_ssl}img/c/{$category->id}_thumb_vp.jpg" alt="{$category->name}" />
|
||||
<img src="{$base_dir_ssl}img/c/{$id_category_thumb}_thumb_vp.jpg" alt="{$category->name}" />
|
||||
{else}
|
||||
<img src="{$base_dir_ssl}modules/privatesales/img/{$sale->id}/thumb_{$cookie->id_lang}.jpg" />
|
||||
{/if}
|
||||
|
@ -7,11 +7,18 @@ class ProductController extends ProductControllerCore {
|
||||
$id_category = $this->product->id_category_default;
|
||||
$sale = Sale::getSaleFromCategory($id_category);
|
||||
|
||||
if (file_exists(_PS_ROOT_DIR_.'/img/c/'.(int)$id_category.'_thumb_vp.jpg') && $id_category != $sale->id_category) {
|
||||
$id_category_thumb = $id_category;
|
||||
} else {
|
||||
$id_category_thumb = $sale->id_category;
|
||||
}
|
||||
|
||||
self::$smarty->assign(array(
|
||||
'sale' => $sale,
|
||||
'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)),
|
||||
'is_sale_home' => ($sale? $sale->id_category == $id_category: FALSE),
|
||||
'is_thumb_vp' => (file_exists(_PS_ROOT_DIR_.'/img/c/'.$sale->id_category.'_thumb_vp.jpg')),
|
||||
'is_thumb_vp' => (file_exists(_PS_ROOT_DIR_.'/img/c/'.$id_category_thumb.'_thumb_vp.jpg')),
|
||||
'id_category_thumb' => $id_category_thumb,
|
||||
));
|
||||
|
||||
// assign date estimation from sale delay
|
||||
|
Loading…
Reference in New Issue
Block a user