fix conflicts
This commit is contained in:
commit
40596721a0
@ -1557,6 +1557,7 @@ class AdminProducts extends AdminTab
|
||||
if (isset($id) AND !empty($id))
|
||||
{
|
||||
$object = new $this->className($id);
|
||||
$random = Tools::getValue('random');
|
||||
|
||||
// ANTADIS : Customs Inputs update
|
||||
Db::getInstance()->ExecuteS('
|
||||
@ -1565,11 +1566,11 @@ class AdminProducts extends AdminTab
|
||||
'.(int) $object->id.',
|
||||
"'.pSQL(Tools::getValue('nc8')).'",
|
||||
"'.pSQL(Tools::getValue('id_country')).'",
|
||||
"'.pSQL(Tools::getValue('videos')).'"
|
||||
'.(int)$random.'
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE `nc8` = "'.pSQL(Tools::getValue('nc8')).'",
|
||||
`id_country` = "'.pSQL(Tools::getValue('id_country')).'",
|
||||
`videos` = "'.pSQL(Tools::getValue('videos')).'"
|
||||
`random` = '.(int)$random.'
|
||||
');
|
||||
|
||||
if (Validate::isLoadedObject($object))
|
||||
@ -2889,6 +2890,16 @@ class AdminProducts extends AdminTab
|
||||
<label for="active_off" class="t"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" style="float:left; padding:0px 5px 0px 5px" />'.$this->l('Disabled').($obj->active ? '' : ' (<a href="'.$preview_url.'" alt="" target="_blank">'.$this->l('View product in shop').'</a>)').'</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">'.$this->l('Random:').'</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input style="float:left;" type="radio" name="random" id="random_on" value="1" '.($this->getFieldValue($obj, 'random') ? 'checked="checked" ' : '').'/>
|
||||
<label for="random_on" class="t"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" style="float:left; padding:0px 5px 0px 5px;" />'.$this->l('Enabled').' ('.$this->l('Random color or size').')</label>
|
||||
<br class="clear" />
|
||||
<input style="float:left;" type="radio" name="random" id="random_off" value="0" '.(!$this->getFieldValue($obj, 'random') ? 'checked="checked" ' : '').'/>
|
||||
<label for="random_off" class="t"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" style="float:left; padding:0px 5px 0px 5px" />'.$this->l('Disabled').'</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="product_options" '.(!$obj->active ? 'style="display:none"' : '').'>
|
||||
<td style="vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">'.$this->l('Options:').'</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
@ -4626,7 +4637,7 @@ class AdminProducts extends AdminTab
|
||||
// }
|
||||
|
||||
$customs_data = Db::getInstance()->getRow('
|
||||
SELECT `nc8`, `id_country`
|
||||
SELECT `nc8`, `id_country`, `random`
|
||||
FROM `'._DB_PREFIX_.'product_customs`
|
||||
WHERE id_product = '.(int)$obj->id
|
||||
);
|
||||
@ -4638,6 +4649,9 @@ class AdminProducts extends AdminTab
|
||||
case 'id_country':
|
||||
return (!empty($customs_data['id_country']) ? $customs_data['id_country'] : '');
|
||||
break;
|
||||
case 'random':
|
||||
return ($customs_data)?(int)$customs_data['random']:0;
|
||||
break;
|
||||
default:
|
||||
return parent::getFieldValue($obj, $data, $id_lang);
|
||||
break;
|
||||
|
@ -176,6 +176,14 @@ class Product extends ProductCore
|
||||
if ($row['pack'] AND !Pack::isInStock($row['id_product']))
|
||||
$row['quantity'] = 0;
|
||||
|
||||
// is random product
|
||||
$is_random = Db::getInstance()->getValue('
|
||||
SELECT `random`
|
||||
FROM `'._DB_PREFIX_.'product_customs`
|
||||
WHERE id_product = '.(int)$row['id_product']
|
||||
);
|
||||
$row['is_random'] = (int)$is_random;
|
||||
|
||||
if ($cached) {
|
||||
self::$producPropertiesCache[$cacheKey] = $row;
|
||||
return self::$producPropertiesCache[$cacheKey];
|
||||
|
@ -82,7 +82,7 @@ class CategoryController extends CategoryControllerCore {
|
||||
);
|
||||
|
||||
$id_products = array();
|
||||
foreach($this->cat_products as $p) {
|
||||
foreach($this->cat_products as $key => $p) {
|
||||
$id_products[] = $p['id_product'];
|
||||
}
|
||||
$attributes = array();
|
||||
@ -106,7 +106,7 @@ class CategoryController extends CategoryControllerCore {
|
||||
}
|
||||
if(!isset($attributes[$attr['id_product']][$attr['group']])) {
|
||||
$attributes[$attr['id_product']][$attr['group']] = array();
|
||||
}
|
||||
}
|
||||
if(!isset($id_attributes[$attr['id_product']])) {
|
||||
$id_attributes[$attr['id_product']] = array();
|
||||
}
|
||||
@ -133,7 +133,7 @@ class CategoryController extends CategoryControllerCore {
|
||||
}
|
||||
$images[$img['id_product']][] = $img;
|
||||
}
|
||||
|
||||
|
||||
self::$smarty->assign('images', $images);
|
||||
self::$smarty->assign('categoryProductAttributes', $attributes);
|
||||
} else { // Hook executed, use the override
|
||||
|
@ -63,10 +63,16 @@ class ProductController extends ProductControllerCore {
|
||||
}
|
||||
}
|
||||
|
||||
$is_random = Db::getInstance()->getValue('
|
||||
SELECT `random`
|
||||
FROM `'._DB_PREFIX_.'product_customs`
|
||||
WHERE id_product = '.(int)$this->product->id
|
||||
);
|
||||
$bestSaleCart = Module::hookExec('bestSaleCart');
|
||||
self::$smarty->assign(array(
|
||||
'bestSaleCart' => $bestSaleCart,
|
||||
'product' => $this->product,
|
||||
'is_random' => $is_random,
|
||||
'coverImage' => Product::getCover($this->product->id),
|
||||
'delivery_date' => (!empty($delivery_date)?$delivery_date:null),
|
||||
));
|
||||
|
@ -7222,3 +7222,32 @@ table#carrierTable tbody td {
|
||||
#relay_point_selected_box .mr_relay_update_relay span a{
|
||||
font-size: 16px
|
||||
}
|
||||
|
||||
/* random product */
|
||||
#category .random{
|
||||
top: 115px;
|
||||
right: 25px;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
border-top: 0;
|
||||
}
|
||||
#product .random{
|
||||
left: 370px;
|
||||
position: absolute;
|
||||
top: 55px;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
#product .info_random {
|
||||
background: url(../img/bg_coup_coeur.png) no-repeat;
|
||||
height: 143px;
|
||||
left: 410px;
|
||||
padding: 30px 45px;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
width: 257px;
|
||||
display: none;
|
||||
z-index: 2;
|
||||
}
|
||||
|
BIN
themes/site/img/random.png
Normal file
BIN
themes/site/img/random.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
@ -553,6 +553,12 @@ $( document ).ready(function() {
|
||||
}, function(){
|
||||
$('.info_coeur').stop(true, true).fadeOut();
|
||||
});
|
||||
|
||||
$('.random').hover(function() {
|
||||
$('.info_random').stop(true, true).fadeIn();
|
||||
}, function(){
|
||||
$('.info_random').stop(true, true).fadeOut();
|
||||
});
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
@ -34,6 +34,11 @@
|
||||
<div class="coeur">
|
||||
<img src="{$img_dir}coup_de_coeur_{$cookie->id_lang}.png" alt="{l s='Coup de coeur'}">
|
||||
</div>
|
||||
{/if}
|
||||
{if $product.is_random}
|
||||
<div class="random">
|
||||
<img src="{$img_dir}random.png" alt="{l s='Random'}">
|
||||
</div>
|
||||
{/if}
|
||||
<h3>{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:64:'...'|escape:'htmlall':'UTF-8'}</a></h3>
|
||||
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.av3ailable_for_order) && $product.available_for_order)))}
|
||||
@ -48,13 +53,13 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
{if isset($images[$product.id_product]) && count($images[$product.id_product]) > 1}
|
||||
<div class="flexslider">
|
||||
<ul class="slides">
|
||||
{foreach from=$images[$product.id_product] item=image}
|
||||
<li>
|
||||
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $image.id_image, 'home')}" {if isset($homeSize)} height="{$homeSize.height}"{/if}/></a>
|
||||
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $image.id_image, 'home')}" {if isset($homeSize)} height="{$homeSize.height}"{/if}/></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
@ -410,6 +410,14 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
|
||||
<p>{l s='Bébé Boutik aime ce produit : parce qu’il est innovant, pratique, parce qu’il éveille votre enfant par ses couleurs, sa texture, ses fonctions, ou parce qu’il l’habille avec douceur et originalité, Bébé Boutik vous le recommande !'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{if $is_random}
|
||||
<div class="random">
|
||||
<img src="{$img_dir}random.png" alt="{l s='Random'}">
|
||||
</div>
|
||||
<div class="info_random">
|
||||
<p>{l s='Bébé Boutik vous propose se produit de façon aléatoire !'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{if $sale->delivery_delay == 2
|
||||
|| $sale->delivery_delay == 3
|
||||
|| $sale->delivery_delay == 4
|
||||
|
Loading…
Reference in New Issue
Block a user