Merge branch 'ticket-9260' into develop

This commit is contained in:
Marion Muszynski 2016-08-30 13:56:13 +02:00
commit 563b9059de
4 changed files with 11 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class CategoryImg extends Module {
public function hookdisplayLeftVP($params) { public function hookdisplayLeftVP($params) {
global $smarty; global $smarty;
$id_category = $params['id_category']; $id_category = $params['id_category'];
$id_lang = (int) Tools::getValue('id_lang', Configuration::get('PS_LANG_DEFAULT')); $id_lang = (int) Tools::getValue('id_lang', Configuration::get('PS_LANG_DEFAULT'));
@ -47,6 +47,7 @@ class CategoryImg extends Module {
$smarty->assign('sale', $sale); $smarty->assign('sale', $sale);
$smarty->assign('consumable', ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false); $smarty->assign('consumable', ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false);
$smarty->assign('category', $category); $smarty->assign('category', $category);
$smarty->assign('is_thumb_vp',(file_exists(_PS_ROOT_DIR_.'/img/c/'.$category->id.'_thumb_vp.jpg'));
return $this->display(__FILE__, 'left_img.tpl'); return $this->display(__FILE__, 'left_img.tpl');
} }
} }

View File

@ -3,8 +3,11 @@
<img src="{$link->getCatImageLink($category->link_rewrite, $category->id, 'cover_vp')}" alt="{$category->name}" /> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id, 'cover_vp')}" alt="{$category->name}" />
<div class="logo_cat"> <div class="logo_cat">
{* <img src="{$base_dir_ssl}modules/privatesales/img/{$sale->id}/thumb_{$cookie->id_lang}.jpg" /> *} {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/{$category->id}_thumb_vp.jpg" alt="{$category->name}" />
{else}
<img src="{$base_dir_ssl}modules/privatesales/img/{$sale->id}/thumb_{$cookie->id_lang}.jpg" />
{/if}
</div> </div>
{if !$consumable} {if !$consumable}
<div class="delivery_delay_left"> <div class="delivery_delay_left">

View File

@ -11,6 +11,7 @@ class ProductController extends ProductControllerCore {
'sale' => $sale, 'sale' => $sale,
'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)), 'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)),
'is_sale_home' => ($sale? $sale->id_category == $id_category: FALSE), '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')),
)); ));
// assign date estimation from sale delay // assign date estimation from sale delay

View File

@ -208,7 +208,11 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
<div class="title_block"> <div class="title_block">
<div class="content"> <div class="content">
<div class="logo_vente"> <div class="logo_vente">
{if $is_thumb_vp}
<img src="{$base_dir_ssl}img/c/{$sale->id_category}_thumb_vp.jpg" height="80px"/> <img src="{$base_dir_ssl}img/c/{$sale->id_category}_thumb_vp.jpg" height="80px"/>
{else}
<img src="{$base_dir_ssl}modules/privatesales/img/{$sale->id}/thumb_{$cookie->id_lang}.jpg" height="80px"/>
{/if}
</div> </div>
{if $sale} {if $sale}
<div class="psales"> <div class="psales">