Merge branch 'ticket-10883' into develop

This commit is contained in:
Marion Muszynski 2016-09-14 11:04:01 +02:00
commit 3e16557de0
2 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,13 @@ class CategoryController extends CategoryControllerCore {
$other_sales = array();
if(!empty($sale)){
$other_sales = $sale->getOthersSales(true, null, null, 'current', false, Configuration::get('PRIVATES_SHOW_PUBLIC'), '`date_start` desc', $site_version_front);
foreach ($other_sales as $key => &$s) {
if (file_exists(_PS_ROOT_DIR_.'/img/c/'.(int)$s['id_category'].'_thumb_vp.jpg')) {
$s['is_thumb_img'] = true;
} else {
$s['is_thumb_img'] = false;
}
}
}
if (!in_array($site_version_front, $sale->versions)) {

View File

@ -239,7 +239,11 @@ $(document).ready(function() {
{foreach $other_sales as $sale}
<li>
<a href="{$link->getCategoryLink($sale['id_category'], $sale['link_rewrite'])|escape:'htmlall':'UTF-8'}">
{if $sale['is_thumb_img'] == true}
<img src="{$smarty.const.__PS_BASE_URI__}img/c/{$sale['id_category']}_thumb_vp.jpg" alt="{$sale['name']}" />
{else}
<img src="{$smarty.const.__PS_BASE_URI__}modules/privatesales/img/{$sale['id_sale']}/thumb_{$cookie->id_lang}.jpg" alt="{$sale['name']}" />
{/if}
<div class="text">
<h2>{$sale['name']}</h2>
{if isset($extrafields[$sale['id_sale']])}