diff --git a/modules/privatesales/privatesales.php b/modules/privatesales/privatesales.php index f29bb482..23815eab 100755 --- a/modules/privatesales/privatesales.php +++ b/modules/privatesales/privatesales.php @@ -501,14 +501,11 @@ class PrivateSales extends Module { public function hookPrivateSales_Category($params) { global $cookie, $smarty; $sale = Sale::getSaleFromCategory(Tools::getValue('id_category')); - $has_salebg = false; - if(is_file(_PS_ROOT_DIR_.'/modules/privatesales/img/'.$sale->id.'/salebg_'.$cookie->id_lang.'.jpg')) { - $has_salebg = true; - } $smarty->assign(array( 'category' => new Category(Tools::getValue('id_category'), $cookie->id_lang), 'sale' => $sale, - 'has_salebg' => $has_salebg, + 'path_saleimg' => dirname(__FILE__).'/img/'.$sale->id.'/', + 'has_salebg' => is_file(dirname(__FILE__).'/img/'.$sale->id.'/salebg_'.$cookie->id_lang.'.jpg'), 'consumable' => ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false, )); return $this->display(__FILE__, 'category.tpl'); diff --git a/themes/site/modules/privatesales/category.tpl b/themes/site/modules/privatesales/category.tpl index 603333b4..b96a0fa4 100755 --- a/themes/site/modules/privatesales/category.tpl +++ b/themes/site/modules/privatesales/category.tpl @@ -3,7 +3,8 @@ body#category #columns { /* background-image: url("{/literal}{$link->getCatImageLink($sale->alias[$cookie->id_lang], $sale->id_category, 'privatesales')}{literal}"); */ /* background: url("https://static.bebeboutik.com{$path}img/{$sale->id}/salebg_{/literal}{$cookie->id_lang}{literal}.jpg")no-repeat fixed center 0; */ - background: url("{/literal}{$path}{literal}/modules/privatesales/img/{/literal}{$sale->id}{literal}/salebg_{/literal}{$cookie->id_lang}{literal}.jpg") no-repeat fixed center 0; + /* background: url("{/literal}{$path}{literal}/modules/privatesales/img/{/literal}{$sale->id}{literal}/salebg_{/literal}{$cookie->id_lang}{literal}.jpg") no-repeat fixed center 0; {* for local/dev *} */ + background: url("{/literal}{$path_saleimg}{literal}salebg_{/literal}{$cookie->id_lang}{literal}.jpg") no-repeat fixed center 0; } {/literal} {/if}