add define
This commit is contained in:
parent
df4be5618d
commit
086f3f5906
@ -154,3 +154,11 @@ define('_PS_GEOLOCATION_NO_ORDER_', 1);
|
||||
|
||||
if (!defined('_PS_CACHE_ENABLED_'))
|
||||
define('_PS_CACHE_ENABLED_', 0);
|
||||
|
||||
/* Consumable */
|
||||
if (!defined('_SHOP_CATEGORYROOT'))
|
||||
define('_SHOP_CATEGORYROOT', 8711761);
|
||||
if (!defined('_SHOP_CATEGORYENABLED'))
|
||||
define('_SHOP_CATEGORYENABLED', 1);
|
||||
if (!defined('_SHOP_PRIVATESALES_CONSUMABLE'))
|
||||
define('_SHOP_PRIVATESALES_CONSUMABLE', 3963);
|
||||
|
@ -37,9 +37,6 @@ class AdminPrivateSales extends AdminTab {
|
||||
if(($trailer_signin = Tools::getValue('trailer_signin')) !== FALSE) {
|
||||
Configuration::updateValue('PRIVATESALES_TRAILER_SIGNIN', (int) $trailer_signin);
|
||||
}
|
||||
if(($expendable = Tools::getValue('expendable')) !== FALSE) {
|
||||
Configuration::updateValue('PRIVATESALES_EXPENDABLE', (int) $expendable);
|
||||
}
|
||||
if(($title_newsletter = Tools::getValue('title_newsletter')) !== FALSE) {
|
||||
Configuration::updateValue('PRIVATESALES_TITLE_NEWSLETTER', $title_newsletter);
|
||||
}
|
||||
@ -234,13 +231,6 @@ class AdminPrivateSales extends AdminTab {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="overflow: auto;">
|
||||
<label style="padding-top: 1px;">'.$this->l('Expendable privatesale:').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" value="'.Configuration::get('PRIVATESALES_EXPENDABLE').'" name="expendable" style="width: 30px;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="margin-form">
|
||||
<input type="submit" class="button" name="submitUpdate" value="'.$this->l('Update settings').'" />
|
||||
</div>
|
||||
|
@ -1243,7 +1243,7 @@ class Sale {
|
||||
return $orders;
|
||||
}
|
||||
|
||||
public static function getSales($enabled=NULL, $logout=NULL, $featured=NULL, $future=NULL, $lite=FALSE, $pub=FALSE, $order_by='`date_end` ASC', $limit=NULL, $sale_type=NULL, $site_version=FALSE, $expendable=FALSE) {
|
||||
public static function getSales($enabled=NULL, $logout=NULL, $featured=NULL, $future=NULL, $lite=FALSE, $pub=FALSE, $order_by='`date_end` ASC', $limit=NULL, $sale_type=NULL, $site_version=FALSE, $consumable=FALSE) {
|
||||
global $cookie;
|
||||
$result = array();
|
||||
$where = array();
|
||||
@ -1296,8 +1296,8 @@ class Sale {
|
||||
// $query.= ' AND pt.id_sale_type = '. $sale_type;
|
||||
// }
|
||||
|
||||
if ($expendable!== TRUE && ($expendable_vp = Configuration::get('PRIVATESALES_EXPENDABLE'))!== FALSE) {
|
||||
$query .= ' AND p.`id_sale` != '.(int) $expendable_vp;
|
||||
if ($consumable!== TRUE && _SHOP_CATEGORYENABLED!== FALSE) {
|
||||
$query .= ' AND p.`id_sale` != '.(int) _SHOP_PRIVATESALES_CONSUMABLE;
|
||||
}
|
||||
|
||||
$query .= ' ORDER BY '.$order_by;
|
||||
|
@ -227,7 +227,6 @@ class PrivateSales extends Module {
|
||||
Configuration::updateValue('PRIVATESALES_FEATURED_ORDER', 0);
|
||||
Configuration::updateValue('PRIVATESALES_TRAILER_NOTIFY', 1);
|
||||
Configuration::updateValue('PRIVATESALES_TRAILER_SIGNIN', 0);
|
||||
Configuration::updateValue('PRIVATESALES_EXPENDABLE', 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -494,7 +493,7 @@ class PrivateSales extends Module {
|
||||
$smarty->assign(array(
|
||||
'category' => new Category($product->id_category_default, $cookie->id_lang),
|
||||
'sale' => $sale,
|
||||
'expendable' => ((int) Configuration::get('PRIVATESALES_EXPENDABLE') == (int) $sale->id)? true : false,
|
||||
'consumable' => ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false,
|
||||
));
|
||||
return $this->display(__FILE__, 'product.tpl');
|
||||
}
|
||||
@ -505,7 +504,7 @@ class PrivateSales extends Module {
|
||||
$smarty->assign(array(
|
||||
'category' => new Category(Tools::getValue('id_category'), $cookie->id_lang),
|
||||
'sale' => $sale,
|
||||
'expendable' => ((int) Configuration::get('PRIVATESALES_EXPENDABLE') == (int) $sale->id)? true : false,
|
||||
'consumable' => ((int) _SHOP_PRIVATESALES_CONSUMABLE == (int) $sale->id)? true : false,
|
||||
));
|
||||
return $this->display(__FILE__, 'category.tpl');
|
||||
}
|
||||
|
@ -4169,7 +4169,7 @@ body.vp-maman, #index.logged.vp-maman {
|
||||
top: 18px;
|
||||
width: 145px;
|
||||
}
|
||||
#sale_end.expendable{
|
||||
#sale_end.consumable{
|
||||
background: none;
|
||||
top: 11px;
|
||||
padding: 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{if $sale}
|
||||
{if $expendable}
|
||||
<div id="sale_end" class="expendable">
|
||||
{if $consumable}
|
||||
<div id="sale_end" class="consumable">
|
||||
<img src="{$base_dir_ssl}modules/privatesales/img/{$sale->id}/thumb_{$cookie->id_lang}.jpg" height="50px"/>
|
||||
</div>
|
||||
{else}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{if $sale}
|
||||
{if $expendable}
|
||||
{if $consumable}
|
||||
<div id="sale_end"></div>
|
||||
{else}
|
||||
<div id="sale_end">
|
||||
|
Loading…
Reference in New Issue
Block a user