mise en place listing, page produit et page dédié

This commit is contained in:
Romu 2017-01-05 07:11:22 -08:00
parent 2ced845b55
commit 2d2ad84158
45 changed files with 3117 additions and 986 deletions

View File

@ -807,7 +807,7 @@ class Blocktopmenu extends Module
}
protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop = false)
protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false)
{
$id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id;
$id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id;

View File

@ -1,96 +1,108 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
class FlashsalesPageModuleFrontController extends ModuleFrontController
{
public function initContent()
{
parent::initContent();
$id_lang = (int)$this->context->language->id;
$id_flash_sale = Tools::getvalue('id_flash_sale') ? (int)Tools::getvalue('id_flash_sale') : null;
$flash_sales = FlashSale::getFlashSales($id_lang, 'page');
if (is_array($flash_sales) && count($flash_sales))
{
foreach ($flash_sales as $key => $flash_sale)
{
if (!FlashSale::getAllProducts($id_lang, $id_flash_sale, 'page'))
{
unset($flash_sales[$key]);
continue;
}
$higher_reduction = FlashSale::getHigherReduction((int)$flash_sale['id_flash_sale']);
if (isset($higher_reduction['reduction']) && !empty($higher_reduction['reduction']))
{
if ($higher_reduction['reduction_type'] == 'percentage')
$higher_reduction = round($higher_reduction['reduction'], 2).' %';
elseif ($higher_reduction['reduction_type'] == 'amount')
$higher_reduction = Tools::displayPrice($higher_reduction['reduction'], Context::getContext()->currency->id);
else
$higher_reduction = false;
}
$flash_sales[$key]['higher_reduction'] = $higher_reduction;
}
if (!count($flash_sales))
$flash_sales = false;
}
$this->productSort();
$products = FlashSale::getAllProducts($id_lang, $id_flash_sale, 'page', false, $this->p - 1, $this->n, $this->orderBy, $this->orderWay);
$nbProducts = (int)count($products);
$this->pagination($nbProducts);
if (version_compare(_PS_VERSION_, '1.6', '>'))
$this->addColorsToProductList($products);
$this->context->smarty->assign(array(
'request' => $this->context->link->getModuleLink('flashsales', 'page', array('id_flash_sale' => $id_flash_sale)),
'flash_sales' => $flash_sales,
'id_flash_sale' => $id_flash_sale,
'products' => $products,
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'nbProducts' => $nbProducts,
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
'name' => Configuration::get('FLASHSALE_PAGE_TITLE', $id_lang),
'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM')
));
$this->setTemplate('page.tpl');
// Tools::redirect('index.php?controller=404');
}
public function setMedia()
{
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'product_list.css');
$this->addCSS(_THEME_CSS_DIR_.'category.css');
if (Configuration::get('PS_COMPARATOR_MAX_ITEM'))
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
}
}
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
class FlashsalesPageModuleFrontController extends ModuleFrontController
{
public function initContent()
{
parent::initContent();
$id_lang = (int)$this->context->language->id;
$id_flash_sale = Tools::getvalue('id_flash_sale') ? (int)Tools::getvalue('id_flash_sale') : null;
$flash_sales = FlashSale::getFlashSales($id_lang, 'page');
if (is_array($flash_sales) && count($flash_sales))
{
foreach ($flash_sales as $key => $flash_sale)
{
if (!FlashSale::getAllProducts($id_lang, $id_flash_sale, 'page'))
{
unset($flash_sales[$key]);
continue;
}
$higher_reduction = FlashSale::getHigherReduction((int)$flash_sale['id_flash_sale']);
if (isset($higher_reduction['reduction']) && !empty($higher_reduction['reduction']))
{
if ($higher_reduction['reduction_type'] == 'percentage')
$higher_reduction = round($higher_reduction['reduction'], 2).' %';
elseif ($higher_reduction['reduction_type'] == 'amount')
$higher_reduction = Tools::displayPrice($higher_reduction['reduction'], Context::getContext()->currency->id);
else
$higher_reduction = false;
}
$flash_sales[$key]['higher_reduction'] = $higher_reduction;
}
$imgFlashSale = false;
if ($id_flash_sale) {
$flash_sale = new FlashSale($id_flash_sale, $id_lang);
$name = $flash_sale->name;
$description = $flash_sale->description;
$imgFlashSale = file_exists(_PS_MODULE_DIR_.'flashsales/views/img/banner/'.$flash_sale->id.'.jpg') ? 'flashsales/views/img/banner/'.$flash_sale->id.'.jpg' : false ;
}
if (!count($flash_sales))
$flash_sales = false;
}
$this->productSort();
$products = FlashSale::getAllProducts($id_lang, $id_flash_sale, 'page', false, $this->p - 1, $this->n, $this->orderBy, $this->orderWay);
$nbProducts = (int)count($products);
$this->pagination($nbProducts);
if (version_compare(_PS_VERSION_, '1.6', '>'))
$this->addColorsToProductList($products);
$this->context->smarty->assign(array(
'request' => $this->context->link->getModuleLink('flashsales', 'page', array('id_flash_sale' => $id_flash_sale)),
'flash_sales' => $flash_sales,
'id_flash_sale' => $id_flash_sale,
'imgFlashSale' => $imgFlashSale,
'products' => $products,
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'nbProducts' => $nbProducts,
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
'pageTitle' => Configuration::get('FLASHSALE_PAGE_TITLE', $id_lang),
'name' => isset($name) ? $name : Configuration::get('FLASHSALE_PAGE_TITLE', $id_lang),
'description' => isset($description) ? $description : false,
'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM')
));
$this->setTemplate('page.tpl');
// Tools::redirect('index.php?controller=404');
}
public function setMedia()
{
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'product_list.css');
$this->addCSS(_THEME_CSS_DIR_.'category.css');
if (Configuration::get('PS_COMPARATOR_MAX_ITEM'))
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -1,92 +1,92 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{capture name=path}{l s='Flash sales' mod='flashsales'}{/capture}
{if version_compare($smarty.const._PS_VERSION_,'1.6','<')}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
<div class="flashsale flashsale-page">
<h1 class="page-heading">{$name|escape:'html':'UTF-8'}</h1>
{if $flash_sales && count($flash_sales)}
<ul class="row">
{foreach from=$flash_sales item=flash_sale}
<li class="col-sm-3 col-xs-6 {if isset($id_flash_sale) && $id_flash_sale == $flash_sale.id_flash_sale}selected{/if}">
<div class="content_list">
<div class="content_image">
<a href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}" title="{$flash_sale.name|escape:'html':'UTF-8'}">
<div class="content_reduction">
<span>{l s='Up to' mod='flashsales'}</span>
<span class="reduction">- {$flash_sale.higher_reduction|escape:'html':'UTF-8'}</span>
<hr/>
</div>
</a>
</div>
<h5><a class="content_name" href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}">{$flash_sale.name|escape:'html':'UTF-8'}</a></h5>
</div>
</li>
{/foreach}
</ul>
{/if}
{if $products && count($products)}
<div class="content_sortPagiBar">
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
{include file="$tpl_dir./pagination.tpl"}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./nbr-product-page.tpl"}
</div>
{else}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./nbr-product-page.tpl"}
</div>
<div class="top-pagination-content clearfix">
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl"}
</div>
{/if}
</div>
{include file="$tpl_dir./product-list.tpl" products=$products}
<div class="content_sortPagiBar">
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl" paginationId='bottom'}
{include file="$tpl_dir./product-compare.tpl" paginationId='bottom'}
{include file="$tpl_dir./nbr-product-page.tpl" paginationId='bottom'}
</div>
{include file="$tpl_dir./pagination.tpl" paginationId='bottom'}
{else}
<div class="bottom-pagination-content clearfix">
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl" paginationId='bottom'}
</div>
{/if}
</div>
{else}
<p class="alert alert-warning">{l s='No flash sales at this time.' mod='flashsales'}</p>
{/if}
</div>
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{capture name=path}{l s='Flash sales' mod='flashsales'}{/capture}
{if version_compare($smarty.const._PS_VERSION_,'1.6','<')}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
<div class="flashsale flashsale-page">
<h1 class="page-heading">{$name|escape:'html':'UTF-8'}</h1>
{if $flash_sales && count($flash_sales)}
<ul class="row">
{foreach from=$flash_sales item=flash_sale}
<li class="col-sm-3 col-xs-6 {if isset($id_flash_sale) && $id_flash_sale == $flash_sale.id_flash_sale}selected{/if}">
<div class="content_list">
<div class="content_image">
<a href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}" title="{$flash_sale.name|escape:'html':'UTF-8'}">
<div class="content_reduction">
<span>{l s='Up to' mod='flashsales'}</span>
<span class="reduction">- {$flash_sale.higher_reduction|escape:'html':'UTF-8'}</span>
<hr/>
</div>
</a>
</div>
<h5><a class="content_name" href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}">{$flash_sale.name|escape:'html':'UTF-8'}</a></h5>
</div>
</li>
{/foreach}
</ul>
{/if}
{if $products && count($products)}
<div class="content_sortPagiBar">
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
{include file="$tpl_dir./pagination.tpl"}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./nbr-product-page.tpl"}
</div>
{else}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./nbr-product-page.tpl"}
</div>
<div class="top-pagination-content clearfix">
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl"}
</div>
{/if}
</div>
{include file="$tpl_dir./product-list.tpl" products=$products}
<div class="content_sortPagiBar">
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
<div class="sortPagiBar clearfix">
{include file="$tpl_dir./product-sort.tpl" paginationId='bottom'}
{include file="$tpl_dir./product-compare.tpl" paginationId='bottom'}
{include file="$tpl_dir./nbr-product-page.tpl" paginationId='bottom'}
</div>
{include file="$tpl_dir./pagination.tpl" paginationId='bottom'}
{else}
<div class="bottom-pagination-content clearfix">
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl" paginationId='bottom'}
</div>
{/if}
</div>
{else}
<p class="alert alert-warning">{l s='No flash sales at this time.' mod='flashsales'}</p>
{/if}
</div>

View File

@ -11,17 +11,14 @@
<div class="container">
<div >
<div class="header clearfix" {if $category->id_image} style="background-image: url('{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" {/if}>
<div class="content" >
<h1>
{$category->name|escape:'html':'UTF-8'}
</h1>
<div class="description">
{$category->description}
</div>
<div class="content" >
<h1>
{$category->name|escape:'html':'UTF-8'}
</h1>
<div class="description">
{$category->description}
</div>
</div>
</div>
</div>
</div>

View File

@ -355,7 +355,7 @@ body.content_only { margin: 0 }
background-color: #f5f0f1;
padding: 45px 30px 45px 0;
overflow: hidden;
height: 265px;
height: 290px;
}
#constructorLink div .inner.small-title { padding: 30px }
#constructorLink div .inner .img { width: 168px; height: 100%;position: relative; float: left;}
@ -393,20 +393,16 @@ body.content_only { margin: 0 }
padding: 5px 15%;
margin: 0 0 30px 0;
}
#index #best_sales .product-container .border { height: 292px }
#index #best_sales .product-container .short_desc { height: 60px }
@media(max-width: 1199px) {
#constructorLink div .inner { height: 325px; }
#constructorLink div .inner p { height: 95px }
#constructorLink .btn { margin-top: 15px; }
#index #best_sales .product-container .border { height: 325px }
}
@media(max-width: 990px) {
#constructorLink div .inner .img { width: 120px; }
#constructorLink div .inner .img img { left: -30px; }
#constructorLink div .inner { height: 350px; }
#index #best_sales .product-container .border { height: 350px }
}
@media(max-width: 767px) {
#constructorLink .title { font-size: 30px; }
@ -2529,21 +2525,36 @@ main#categorycms { margin-bottom: 30px }
max-width: 90px;
}
#postedito .pack_content .content_product .link_name {
color: #666666;
display: block;
font-family: 'pt_sansbold';
font-weight: normal;
color: #666666;
font-size: 16px;
line-height: 18px;
margin-bottom: 15px;
}
#postedito .pack_content .content_product {
border-left: 1px solid #dfdfdf;
padding: 25px;
padding: 15px;
}
#postedito .pack_content .content_product .price {
color: #e4535d;
font-family: 'vidaloka';
font-size: 24px;
letter-spacing: -1px;
line-height: 18px;
}
#postedito .pack_content .content_product .product-flashsale .flashsale-countdown-box {
background: #6ac5bb;
color: #fff;
font-family: 'pompiere_regular';
font-size: 18px;
margin-bottom: 15px;
padding: 7px 10px 5px 10px;
}
#postedito .pack_content .content_product .product-flashsale .flashsale-countdown-box i {
margin-right: 5px;
}
#postcms .pack_content .image img {
margin: 0 auto;
}
@ -2568,14 +2579,15 @@ main#categorycms { margin-bottom: 30px }
}
#postedito .price-percent-reduction {
background: url(../img/reduction.png) no-repeat top left;
color: #000;
font-size: 16px;
font-weight: bold;
line-height: 57px;
padding-left: 9px;
position: absolute;
text-align: left;
left: 15px;
top: 0;
left: -1px;
top: -1px;
height: 120px;
width: 106px;
z-index: 1;
@ -4121,6 +4133,19 @@ main#categorycms { margin-bottom: 30px }
}
#send_friend_form .submit #sendEmail{ margin-left: 5px;}
/* Flashsales */
#product .netReViewsWrap .flashsale-countdown-box {
background: #6ac5bb;
color: #fff;
font-family: 'pompiere_regular';
font-size: 20px;
margin-top: 30px;
padding: 7px 15px 5px 15px;
}
#product .netReViewsWrap .flashsale-countdown-box i {
margin-right: 5px;
}
@media (max-width: 1199px) {
/*#product .pictos .picto { text-align: center;}*/
@ -7645,3 +7670,37 @@ div.languages>span{
#gototop.active { left: 50px }
#gototop:hover { opacity: 1 }
/*************************************************************************************************************
************************************** FLASHSALES ***************************************
**************************************************************************************************************/
#module-flashsales-page {
}
#module-flashsales-page .page-heading .header {
background-size: cover;
background-position: center top;
margin-bottom: 30px;
padding: 30px;
}
#module-flashsales-page .page-heading .header .content {
background-color: #fff;
color: #666;
padding: 20px;
border: 0;
width: 50%;
}
#module-flashsales-page .page-heading .header .content h1 {
color: #4d4d4d;
margin-top: 0;
}
#module-flashsales-page .page-heading .header .content .description {
margin-bottom: 10px;
}
@media (max-width: 991px) {
#module-flashsales-page .page-heading .header .content { width: 75% }
}
@media (max-width: 768px) {
#module-flashsales-page .page-heading .header .content { width: 100% }
}

View File

@ -255,7 +255,9 @@ span.title {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-flashsale:before {
content: "\e90f";
}
.icon-youtube:before {
content: "\e900";
}
@ -495,16 +497,15 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
#breadcrumbs .breadcrumb_item a {
font-weight: bold;
}
#breadcrumbs .breadcrumb_item:after {
#breadcrumbs .breadcrumb_item a:after {
content:'.';
display: inline-block;
font-weight: normal;
font-size: 22px;
margin-left: 0px;
margin-left: 5px;
position: relative;
top: -3px;
}
#breadcrumbs span{ margin-left: 10px;}
#breadcrumbs .breadcrumb_item{ margin-left: 0; }
#breadcrumbs a:last-child:after{ content:'';}
/* BLOCK PRODUIT */
@ -740,7 +741,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
background-color: #efefef;
border: 1px solid #efefef;
padding: 5px 15px 10px 15px;
margin-bottom: 15px;
margin-bottom: 10px;
}
.column.bloc.product-container .avail .inner { padding: 0; margin: 0;}
.bloc.product-container .avail i {
@ -787,7 +788,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
}
.bloc.product-container .product-actions > div:first-child {
margin-top: 15px;
margin-top: 10px;
}
.column.bloc.product-container .product-actions > div:first-child {
@ -795,11 +796,11 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
}
.bloc.product-container .short_desc {
margin-top: 5px;
height: 40px;
height: 38px;
font-size: 14px;
line-height: 16px;
}
.column.bloc.product-container .short_desc { height: 85px; }
.column.bloc.product-container .short_desc { height: 74px; }
.bloc.product-container .short_desc * {
font-weight: normal;
@ -822,6 +823,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
font-size: 16px;
height: auto;
margin-bottom: 2px;
margin-top: 0;
height: 18px;
overflow: hidden;
}
@ -881,32 +883,46 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
}
.column.bloc.product-container .border {
height: 412px;
height: 370px;
}
/* height if column or not */
.bloc.product-container .wrapImg {
height: 227px;
}
.bloc.product-container .border {
height: 265px;
height: 290px;
}
.column.bloc.product-container .pictos { bottom: 0px; }
.column.bloc.product-container .wrapImg { min-height: 215px; height: auto;}
.column.bloc.product-container .border { height: 363px; }
.column.bloc.product-container .featureConditioning .value { display: block;}
/* Flashsales */
.product-container .product-flashsale {
height: 40px;
}
.product-container .product-flashsale .flashsale-countdown-box {
background: #6ac5bb;
color: #fff;
font-family: 'pompiere_regular';
font-size: 20px;
padding: 7px 15px 5px 15px;
}
.product-container .product-flashsale .flashsale-countdown-box i {
margin-right: 5px;
}
/* /height */
@media (max-width: 1199px) {
.bloc.product-container .featureConditioning { height: 32px; }
.bloc.product-container .featureConditioning { height: 45px; }
.bloc.product-container .featureConditioning .value { display: block;}
.bloc.product-container .product-infos h5.product-name { height: 37px; }
.bloc.product-container .short_desc { height: 35px; }
.bloc.product-container .short_desc { height: 50px; }
.bloc.product-container .product-price.old-price, .bloc.product-container .product-price .price { float: none; width: 100%; max-width: none; padding: 0; }
.bloc.product-container .product-price.old-price { font-size: 13px; }
.bloc.product-container .border { height: 300px; }
.bloc.product-container .border { height: 340px; }
.bloc.product-container .wrapImg { height: 242px; }
.column.bloc.product-container .border { height: 375px; }
.column.bloc.product-container .border { height: 395px; }
.column.bloc.product-container .wrapImg { }
.column.bloc.product-container .avail .shipping { font-size: 13px; }
.column.bloc.product-container .product-price.old-price { padding-top: 0; }
@ -918,10 +934,10 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
.bloc.product-container .product-infos h5.product-name { height: 52px; }
.bloc.product-container .product-img { max-height: 140px;}
.column.bloc.product-container .product-img { height: 140px;}
.bloc.product-container .short_desc { height: 60px; }
.bloc.product-container .short_desc { height: 70px; }
.bloc.product-container .wrapImg { height: auto; }
.bloc.product-container .border { height: 350px; }
.column.bloc.product-container .border { height: 372px; }
.bloc.product-container .border { height: 380px; }
.column.bloc.product-container .border { height: 395px; }
.bloc.product-container .pictos { position: static; }
.column.bloc.product-container .pictos { position: absolute; }
@ -932,23 +948,24 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
.bloc.product-container .product-img { }
.bloc.product-container .wrapImg { height: auto; }
.bloc.product-container .pictos { position: static;}
.bloc.product-container .short_desc { height: 48px; }
.bloc.product-container .short_desc { height: 70px; }
.bloc.product-container .border { height: auto; }
.bloc.product-container .product-price { text-align: left; }
.column.bloc.product-container .border { height: 525px; }
.column.bloc.product-container .product-img { min-height: 200px; }
.column.bloc.product-container .short_desc { height: 60px; }
.column.bloc.product-container .border {height: 370px; }
.column.bloc.product-container .border {height: 380px; }
.column.bloc.product-container .product-infos { height: auto; }
.column.bloc.product-container .avail { padding: 10px;}
.bloc.product-container .btnWrap { padding-left: 0; }
#category main .category_content { padding-right: 15px; padding-left: 15px; }
.column.bloc.product-container .product-flashsale .flashsale-countdown-box { font-size: 16px; }
}
@media (max-width: 620px) {
.column.bloc.product-container .avail .label-warning > span { font-size: 13px; }
.bloc.product-container .product-price.old-price .barre { display: block; }
.column.bloc.product-container .product-price.old-price .barre { display: inline; }
.bloc.product-container .wrapreviews, .bloc.product-container .featureConditioning,
.column.bloc.product-container .product-infos h5.product-name {
height: auto;
@ -957,7 +974,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
.bloc.product-container .product-img, .column.bloc.product-container .product-img { min-height: 0;}
.bloc.product-container .btnWrap .btn { padding-left: 5px; }
.column.bloc.product-container .wrapImg { min-height: 190px; }
.column.bloc.product-container .wrapImg { min-height: unset; }
.bloc.product-container .avail i { font-size: 21px; }
.bloc.product-container { width: 100%; }
.bloc.product-container .product-img img { height: auto; min-height: 0; max-height: 100px;}
@ -968,7 +985,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
.bloc.product-container .product-img { width: 100%; }
.bloc.product-container .product-infos { position: static; height: auto; }
.bloc.product-container .product-infos h5.product-name, .bloc.product-container .short_desc, .bloc.product-container .border { height: auto;}
.bloc.product-container .short_desc { margin-top: 10px;}
.bloc.product-container .short_desc { margin: 10px 0 15px 0;}
.bloc.product-container .product-price { height: auto; margin-bottom: 10px; }
.column.bloc.product-container .border, .column.bloc.product-container .short_desc, .column.bloc.product-container .product-infos, .column.bloc.product-container .wrapreviews { height: auto; }
.column.bloc.product-container .product-img { margin-bottom: 10px; }
@ -982,6 +999,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
.crossseling {
display: none;
}
.column.bloc.product-container .product-flashsale .flashsale-countdown-box { font-size: 16px; }
}

View File

@ -33,4 +33,5 @@
<glyph unicode="&#xe90c;" glyph-name="next" d="M774.115 468.413l-483.056 483.056c-11.374 11.374-29.614 11.374-40.988 0s-11.374-29.614 0-40.988l462.455-462.455-462.455-462.455c-11.374-11.374-11.374-29.614 0-40.988 5.58-5.58 13.090-8.584 20.387-8.584s14.807 2.79 20.387 8.584l483.056 483.056c11.374 11.159 11.374 29.614 0.215 40.773z" />
<glyph unicode="&#xe90d;" glyph-name="phone" d="M1023.511 152.060c2.17-16.624-2.896-31.077-15.177-43.361l-144.177-143.088c-6.504-7.227-14.994-13.375-25.473-18.429-10.479-5.061-20.776-8.313-30.89-9.756-0.723 0-2.896-0.186-6.511-0.547-3.608-0.36-8.306-0.544-14.087-0.544-13.735 0-35.959 2.349-66.674 7.048s-68.293 16.264-112.734 34.689c-44.453 18.429-94.859 46.075-151.227 82.929-56.368 36.852-116.353 87.444-179.95 151.765-50.588 49.866-92.504 97.563-125.748 143.091-33.244 45.531-59.983 87.628-80.219 126.292-20.237 38.664-35.414 73.714-45.531 105.152s-16.983 58.538-20.597 81.303-5.059 40.651-4.336 53.66c0.723 13.008 1.084 20.235 1.084 21.681 1.445 10.118 4.697 20.416 9.756 30.895s11.202 18.971 18.429 25.475l144.177 144.177c10.118 10.118 21.681 15.177 34.689 15.177 9.395 0 17.706-2.71 24.933-8.13s13.37-12.105 18.429-20.055l115.992-220.059c6.504-11.563 8.311-24.21 5.42-37.941s-9.034-25.294-18.429-34.689l-53.118-53.118c-1.445-1.445-2.71-3.794-3.794-7.046s-1.626-5.962-1.626-8.13c2.891-15.177 9.395-32.521 19.513-52.034 8.672-17.345 22.042-38.483 40.109-63.416s43.723-53.658 76.967-86.179c32.521-33.247 61.429-59.080 86.723-77.512 25.289-18.422 46.435-31.977 63.418-40.65s29.992-13.912 39.024-15.713l13.547-2.712c1.445 0 3.799 0.544 7.048 1.626 3.252 1.086 5.601 2.349 7.048 3.796l61.788 62.874c13.016 11.561 28.185 17.343 45.531 17.343 12.289 0 22.040-2.166 29.267-6.504h1.082l209.217-123.58c15.182-9.402 24.214-21.323 27.106-35.777z" />
<glyph unicode="&#xe90e;" glyph-name="badge" horiz-adv-x="1023" d="M898.441 140.882c39.729 6.178 65.036 45.907 54.152 84.467l-7.355 25.307c-7.943 27.661 2.648 57.093 26.484 73.575l21.777 15.011c33.257 22.954 38.847 69.463 12.069 99.772l-17.658 19.725c-19.129 21.483-22.365 52.681-8.237 77.701l12.951 22.954c20.012 35.022 4.707 79.466-32.375 95.065l-24.425 10.009c-26.484 11.186-42.965 37.67-41.2 66.514l1.765 26.19c2.942 40.031-30.323 73.575-70.346 71.516l-26.197-1.471c-28.844-1.471-55.328 15.305-65.926 42.090l-9.715 24.425c-15.011 37.376-59.153 53.269-94.469 33.846l-22.961-12.657c-25.307-13.834-56.505-10.009-77.701 9.421l-19.423 17.952c-29.727 27.366-76.524 22.365-99.772-10.598l-15.305-21.483c-16.776-23.549-46.503-33.551-73.869-25.314l-25.307 7.649c-38.56 11.775-78.583-12.951-85.357-52.681l-4.413-25.895c-5.001-28.256-27.366-50.327-55.622-54.74l-25.895-4.119c-39.736-6.178-65.044-45.914-54.152-84.467l7.355-25.314c7.943-27.661-2.648-57.093-26.484-73.575l-21.777-15.011c-33.257-22.954-38.854-69.456-12.069-99.772l17.658-19.725c19.129-21.483 22.365-52.688 8.237-77.701l-12.951-22.954c-20.019-35.022-4.707-79.459 32.375-95.058l24.425-10.009c26.491-11.186 42.973-37.67 41.207-66.522l-1.765-26.19c-2.942-40.031 30.315-73.582 70.339-71.523l26.197 1.471c28.844 1.471 55.328-15.305 65.926-42.083l9.715-24.425c15.011-37.376 59.16-53.269 94.476-33.846l22.961 12.657c25.307 13.834 56.505 10.009 77.701-9.421l19.423-17.952c29.72-27.374 76.524-22.365 99.779 10.598l15.305 21.483c16.776 23.542 46.496 33.551 73.869 25.307l25.307-7.649c38.553-11.775 78.576 12.951 85.357 52.681l4.413 25.895c5.001 28.256 27.366 50.334 55.622 54.747l25.881 4.126zM735.677 223.591c-123.909-123.916-324.924-123.916-448.826 0-123.902 123.902-123.902 324.916 0 448.826 123.909 123.909 324.924 123.909 448.826 0 123.909-124.203 123.909-324.931 0-448.826z" />
<glyph unicode="&#xe90f;" glyph-name="flashsale" d="M849.273 673.238l40.544 40.606 12.059-11.997c11.197-11.197 29.347-11.197 40.421 0 11.259 11.136 11.259 29.285 0 40.483l-60.662 60.724c-11.197 11.197-29.347 11.197-40.483 0-11.197-11.259-11.197-29.347 0-40.544l13.412-13.289-39.867-39.867c-69.46 64.169-159.223 106.497-258.584 116.28v37.222h28.855c26.824 0 48.542 21.779 48.542 48.542 0 26.824-21.779 48.604-48.542 48.604h-145.688c-26.824 0-48.604-21.779-48.604-48.604s21.779-48.542 48.604-48.542h31.992v-37.037h-1.784c-105.144-10.028-199.644-56.417-270.704-126.616l-24.794-26.763c-67.122-78.074-107.974-179.342-107.974-290.453 0-246.279 199.706-445.985 445.985-445.985 246.402 0 445.985 199.706 445.985 445.985 0.062 111.481-41.159 213.118-108.712 291.253zM511.446 12.289c-204.628 0-370.496 165.868-370.496 370.496s165.929 370.496 370.496 370.496 370.496-165.868 370.496-370.496c0-204.628-165.929-370.496-370.496-370.496zM540.793 415.946v233.482l-26.947 43.19-30.639-43.19v-233.482c-16.796-9.905-28.178-27.993-28.178-48.911 0-31.439 25.532-56.909 56.909-56.909s56.971 25.471 56.971 56.909c0.062 20.918-11.259 39.006-28.116 48.911z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,56 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div id="custom_price_form" style="display:none">
<div class="bootstrap">
<div class="form-horizontal">
<div class="form-group">
<div class="col-lg-12">
<div id="custom_price_errors"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="reduction">{l s='Apply a discount of' mod='flashsales'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-6">
<input type="text" name="custom_reduction" id="custom_reduction" value="{$currentTab->getFieldValue($currentObject, 'reduction')|floatval}"/>
</div>
<div class="col-lg-6">
<select name="custom_reduction_type" id="custom_reduction_type">
<option value="amount" {if $currentTab->getFieldValue($currentObject, 'reduction_type')|escape:'quotes':'UTF-8' == 'amount'} selected="selected"{/if}>{l s='Currency Units' mod='flashsales'}</option>
<option value="percentage" {if $currentTab->getFieldValue($currentObject, 'reduction_type')|escape:'quotes':'UTF-8' == 'percentage'} selected="selected"{/if}>{l s='Percent' mod='flashsales'}</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="button" id="validate_custom_price" class="btn btn-default" />
<i class="icon-check"></i> {l s='Done' mod='flashsales'}
</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,484 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<script type="text/javascript">
var Card = new Object();
var Customer = new Object();
var default_language = {$default_language|intval};
var selectedProducts = new Array();
{if isset($selected_products) && $selected_products}
{foreach from=$selected_products key=item_name item=items}
{foreach from=$items key=id_item item=ids_product}
var selectedItem = new Array();
selectedItem['item'] = "{$item_name|escape:'quotes':'UTF-8'}";
selectedItem['id_item'] = "{$id_item|intval}";
selectedItem['ids_product'] = new Array();
{foreach from=$ids_product item=id_product}
selectedItem['ids_product'].push("{$id_product|intval}");
{/foreach}
selectedProducts.push(selectedItem);
{/foreach}
{/foreach}
{/if}
var priceDisplayPrecision = 2;
var currencySign = "{$currencySign|escape:'quotes':'UTF-8'}"
var period = "{l s='From' mod='flashsales'} 0000-00-00 00:00:00 <br/>{l s='to' mod='flashsales'} 0000-00-00 00:00:00";
var impact = "{l s='Undefined' mod='flashsales'}";
var allCustomers = "{l s='All customers' mod='flashsales'}";
var choose = "{l s='Choose' mod='flashsales'}";
var remove = "{l s='Remove' mod='flashsales'}";
var noCustomersFound = "{l s='No customers found' mod='flashsales'}";
var customerControllerLink = "{$link->getAdminLink('AdminCustomers')|escape:'quotes':'UTF-8'}";
var flashsalesControllerLink = "{$link->getAdminLink('AdminFlashSales')|escape:'quotes':'UTF-8'}";
var errorsCustomPrice = "{l s='Please select a valid integer reduction and a reduction type' mod='flashsales'}";
var currentIndex = "{$currentIndex|escape:'quotes':'UTF-8'}";
var iso = "{$iso|escape:'html':'UTF-8'}";
var pathCSS = "{$path_css|escape:'html':'UTF-8'}";
var ad = "{$ad|escape:'html':'UTF-8'}";
</script>
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
<div id="flashsale-content" class="bootstrap">
{/if}
<form id="flashsale-form" class="form-horizontal" enctype="multipart/form-data" action="{$link->getAdminLink('AdminFlashSales')|escape:'quotes':'UTF-8'}&submitAdd{$table|escape:'html':'UTF-8'}=1" method="post" autocomplete="off">
<ul id="progressbar" class="nav" role="tablist">
<li role="presentation" class="active"><a href="#general-settings" role="tab" data-toggle="tab">{l s='General settings' mod='flashsales'}</a></li>
<li role="presentation"><a href="#communication" role="tab" data-toggle="tab">{l s='Communication' mod='flashsales'}</li></a>
<li role="presentation"><a href="#review" role="tab" data-toggle="tab">{l s='Review & confirm' mod='flashsales'}</li></a>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="general-settings">
<div class="panel" id="specific_price_rule">
<h3>
<i class="icon-align-justify"></i>
{l s='Flash sale rule' mod='flashsales'}
</h3>
<div class="well clearfix">
<div class="col-lg-12">
<div class="form-group">
<label class="control-label col-lg-2" for="id_currency">{l s='For' mod='flashsales'}</label>
<div class="col-lg-9">
<div class="row">
{if ($shops && count($shops) > 1)}
<div class="col-lg-3">
<select name="id_shop" id="shop">
{foreach from=$shops item=shop}
<option value="{$shop.id_shop|intval}" {if $currentTab->getFieldValue($currentObject, 'id_shop')|intval == $shop.id_shop} selected="selected"{/if}>{$shop.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
{else}
<input type="hidden" name="id_shop" value="1" />
{/if}
<div class="col-lg-3">
<select name="id_currency" id="currency">
<option value="0">{l s='All currencies' mod='flashsales'}</option>
{foreach from=$currencies item=curr}
<option value="{$curr.id_currency|intval}" {if $currentTab->getFieldValue($currentObject, 'id_currency')|intval == $curr.id_currency} selected="selected"{/if}>{$curr.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<select name="id_country" id="country">
<option value="0">{l s='All countries' mod='flashsales'}</option>
{foreach from=$countries item=country}
<option value="{$country.id_country|intval}" {if $currentTab->getFieldValue($currentObject, 'id_country')|intval == $country.id_country} selected="selected"{/if}>{$country.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<select name="id_group" id="group">
<option value="0">{l s='All groups' mod='flashsales'}</option>
{foreach from=$groups item=group}
<option value="{$group.id_group|intval}" {if $currentTab->getFieldValue($currentObject, 'id_group')|intval == $group.id_group} selected="selected"{/if}>{$group.name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-2" for="customer">{l s='Customer' mod='flashsales'}</label>
<div class="col-lg-4">
<input type="hidden" name="id_customer" id="id_customer" value="{$currentTab->getFieldValue($currentObject, 'id_customer')|intval}" />
<div class="input-group">
<input type="text" name="customer" value="{$customer_name|escape:'quotes':'UTF-8'}" id="customer" autocomplete="off" />
<span class="input-group-addon"><i id="customerLoader" class="icon-refresh icon-spin" style="display: none;"></i> <i class="icon-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<div id="customers"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-2" for="from">{l s='Available' mod='flashsales'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-4">
<div class="input-group">
<span class="input-group-addon">{l s='from' mod='flashsales'}</span>
<input class="datepicker" type="text" name="from" value="{$currentTab->getFieldValue($currentObject, 'from')|escape:'html':'UTF-8'}" style="text-align: center" id="from" />
<span class="input-group-addon"><i class="icon-calendar-empty"></i></span>
</div>
</div>
<div class="col-lg-4">
<div class="input-group">
<span class="input-group-addon">{l s='to' mod='flashsales'}</span>
<input class="datepicker" type="text" name="to" value="{$currentTab->getFieldValue($currentObject, 'to')|escape:'html':'UTF-8'}" style="text-align: center" id="to" />
<span class="input-group-addon"><i class="icon-calendar-empty"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-2" for="reduction">{l s='Apply a discount of' mod='flashsales'}</label>
<div class="col-lg-4">
<div class="row">
<div class="col-lg-6">
<input type="text" name="reduction" id="reduction" value="{$currentTab->getFieldValue($currentObject, 'reduction')|floatval}"/>
</div>
<div class="col-lg-6">
<select name="reduction_type" id="reduction_type">
<option selected="selected" value="percentage" {if $currentTab->getFieldValue($currentObject, 'reduction_type')|escape:'quotes':'UTF-8' == 'percentage'} selected="selected"{/if}>{l s='Percent' mod='flashsales'}</option>
<option value="amount" {if $currentTab->getFieldValue($currentObject, 'reduction_type')|escape:'quotes':'UTF-8' == 'amount'} selected="selected"{/if}>{l s='Currency Units' mod='flashsales'}</option>
</select>
</div>
<input type="hidden" name="reduction_tax" value="1" />
</div>
</div>
<p class="help-block">{l s='The discount is applied after the tax' mod='flashsales'}</p>
</div>
<div class="form-group">
<label class="control-label col-lg-2" for="active">{l s='Status' mod='flashsales'}</label>
<div class="col-lg-4">
<span class="switch prestashop-switch fixed-width-lg">
<input id="active_on" type="radio" value="1" name="active" {if $currentTab->getFieldValue($currentObject, 'active')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="active_on">{l s='Enabled' mod='flashsales'}</label>
<input id="active_off" type="radio" value="0" name="active" {if !$currentTab->getFieldValue($currentObject, 'active')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="active_off">{l s='Disabled' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</div>
</div>
</div>
</div>
</div>
<div class="panel" id="product_part">
<h3>
<i class="icon-align-justify"></i>
{l s='Product selection' mod='flashsales'}
</h3>
<div id="search-product-form-group" class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span data-bind="label">{l s='Product' mod='flashsales'}</span>&nbsp;<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li data-item="product"><a href="javascript:void(0);">{l s='Product' mod='flashsales'}</a></li>
<li data-item="category"><a href="javascript:void(0);">{l s='Category' mod='flashsales'}</a></li>
<li data-item="manufacturer"><a href="javascript:void(0);">{l s='Manufacturer' mod='flashsales'}</a></li>
</ul>
</div><!-- /btn-group -->
<input type="text" id="product" value="" />
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
</div>
</div>
<div class="col-lg-3">
<input type="hidden" id="search_action" value="product" />
</div>
</div>
<div class="row cards" id="search_result"></div>
<div class="row">
{foreach from=$item_propreties key=item_name item=properties}
<div class="panel" {if !isset($properties) || !count($properties)}style="display:none"{/if}>
<h3>
{if $item_name == 'product'}{l s='Selected products' mod='flashsales'}
{elseif $item_name == 'category'}{l s='Selected categories' mod='flashsales'}
{elseif $item_name == 'manufacturer'}{l s='Selected manufacturers' mod='flashsales'}
{/if}
</h3>
<div class="row cards" id="selected_{$item_name|escape:'html':'UTF-8'}">
{if isset($properties) && count($properties)}
{include file="$item_card" key=$item_name items=$properties}
{/if}
</div>
{if $item_name != 'product'}
<div class="row cards products_detail" id="{$item_name|escape:'html':'UTF-8'}_products_detail" data-parent-panel="{$item_name|escape:'html':'UTF-8'}" data-id-item="" style="display:none">
<h4 class='col-lg-12'>{l s='Product list detail' mod='flashsales'} > <span></span></h4>
<div class="content"></div>
</div>
{/if}
</div>
{/foreach}
</div>
{include file="$custom_price"}
</div>
</div>
<div role="tabpanel" class="tab-pane" id="communication">
<div class="panel" id="front_office_features">
<h3>
<i class="icon-align-justify"></i>
{l s='Front office features' mod='flashsales'}
</h3>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label class="control-label col-lg-3 required">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Invalid characters:' mod='flashsales'} &lt;&gt;;=#{}">
{l s='Name' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
{foreach from=$languages item=language}
{if $languages|count > 1}
<div class="row">
<div class="translatable-field lang-{$language.id_lang|intval}" {if $language.id_lang != $default_language}style="display:none"{/if}>
<div class="col-lg-9">
{/if}
<input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:'quotes':'UTF-8'}">
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{$language.iso_code|escape:'html':'UTF-8'}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="javascript:hideOtherLanguage({$language.id_lang|intval});" tabindex="-1">{$language.name|escape:'html':'UTF-8'}</a></li>
{/foreach}
</ul>
</div>
</div>
</div>
{/if}
{/foreach}
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="description">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Invalid characters:' mod='flashsales'} &lt;&gt;;=#{}">
{l s='Description' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
{foreach from=$languages item=language}
{if $languages|count > 1}
<div class="translatable-field row lang-{$language.id_lang|intval}">
<div class="col-lg-9">
{/if}
<textarea id="description_{$language.id_lang|intval}" name="description_{$language.id_lang|intval}" class="autoload_rte">{$currentTab->getFieldValue($currentObject, 'description', $language.id_lang|intval)|htmlentitiesUTF8}</textarea>
<span class="counter" data-max="{if isset($max)}{$max|escape:'html':'UTF-8'}{else}none{/if}"></span>
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{$language.iso_code|escape:'html':'UTF-8'}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="javascript:hideOtherLanguage({$language.id_lang|intval});">{$language.name|escape:'html':'UTF-8'}</a></li>
{/foreach}
</ul>
</div>
</div>
{/if}
{/foreach}
<script type="text/javascript">
$(".textarea-autosize").autosize();
</script>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Upload a banner image from your computer.' mod='flashsales'}">
{l s='Image' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
{$uploader}{* HTML, cannot escape *}
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable to display banner in the home page.' mod='flashsales'}">
{l s='Display in home page' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="display_home" id="display_home_on" value="1" {if $currentTab->getFieldValue($currentObject, 'display_home')|boolval}checked="checked"{/if} />
<label class="t" for="display_home_on">{l s='Yes' mod='flashsales'}</label>
<input type="radio" name="display_home" id="display_home_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'display_home')|boolval}checked="checked"{/if} />
<label class="t" for="display_home_off">{l s='No' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
{if version_compare($smarty.const._PS_VERSION_, '1.6', '>=')}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable to display flash sale products in the home tab content.' mod='flashsales'}">
{l s='Display in home tab content' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="display_home_tab" id="display_home_tab_on" value="1" {if $currentTab->getFieldValue($currentObject, 'display_home_tab')|boolval}checked="checked"{/if} />
<label class="t" for="display_home_tab_on">{l s='Yes' mod='flashsales'}</label>
<input type="radio" name="display_home_tab" id="display_home_tab_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'display_home_tab')|boolval}checked="checked"{/if} />
<label class="t" for="display_home_tab_off">{l s='No' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
{else}
<input type="hidden" name="display_home_tab" value="1" />
{/if}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable to display flash sale products in the left/right column.' mod='flashsales'}">
{l s='Display in column' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="display_column" id="display_column_on" value="1" {if $currentTab->getFieldValue($currentObject, 'display_column')|boolval}checked="checked"{/if} />
<label class="t" for="display_column_on">{l s='Yes' mod='flashsales'}</label>
<input type="radio" name="display_column" id="display_column_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'display_column')|boolval}checked="checked"{/if} />
<label class="t" for="display_column_off">{l s='No' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable to display flash sales products in the related page.' mod='flashsales'}">
{l s='Display in flash sale page' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="display_page" id="display_page_on" value="1" {if $currentTab->getFieldValue($currentObject, 'display_page')|boolval}checked="checked"{/if} />
<label class="t" for="display_page_on">{l s='Yes' mod='flashsales'}</label>
<input type="radio" name="display_page" id="display_page_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'display_page')|boolval}checked="checked"{/if} />
<label class="t" for="display_page_off">{l s='No' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="review">
<div class="panel" id="summary_part">
<h3>
<i class="icon-align-justify"></i>
{l s='Summary' mod='flashsales'}
</h3>
<div id="summary_products" style="display:none"></div>
<input type="hidden" name="id_flash_sale" value="{$currentTab->getFieldValue($currentObject, 'id')|intval}" />
<div class="row">
<div class="col-lg-12">
<div class="summary_group">
<ul>
<li>{l s='From' mod='flashsales'} : <span id="summary_from"></span> {l s='to' mod='flashsales'} : <span id="summary_to"></span></li>
<li>{l s='Currency restriction' mod='flashsales'} : <span id="summary_currency"></span></li>
<li>{l s='Country restriction' mod='flashsales'} : <span id="summary_country"></span></li>
<li>{l s='Group restriction' mod='flashsales'} : <span id="summary_group"></span></li>
<li>{l s='Customer' mod='flashsales'} : <span id="summary_customer"></span></li>
<li>{l s='Status' mod='flashsales'} : <span id="summary_active"></span></li>
</ul>
</div>
<div class="summary_group table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>{l s='Product ID' mod='flashsales'}</th>
<th>{l s='Product Image' mod='flashsales'}</th>
<th>{l s='Product Name' mod='flashsales'}</th>
<th>{l s='Reduction' mod='flashsales'}</th>
<th>{l s='Reduction type' mod='flashsales'}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="summary_group">
<div class="col-lg-9 col-lg-offset-3">
{if $currentObject->id}
<button type="submit" name="submitEditFlashSale" class="btn-save" />
<i class="icon-check"></i>
{l s='Update' mod='flashsales'}
</button>
{else}
<button type="submit" name="submitAddFlashSale" class="btn-save" />
<i class="icon-check"></i>
{l s='Create the flash sale' mod='flashsales'}
</button>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
</div>
{/if}

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,69 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if isset($items) && $items}
{foreach from=$items item=item}
{if $key == 'product'}
{$item.products}{* HTML, cannot escape *}
{else}
<div class="productCard col-lg-3 {if $selected}selected-product{/if}">
<div class="panel" data-panel="{$key|escape:'quotes':'UTF-8'}">
<div class="panel-heading">
<span class="pull-left">{$item.name|truncate:40:'...'|escape:'html':'UTF-8'}</span>
<span class ="pull-right">
<button type="button" class="add-custom-price btn btn-default">
<div class="btn-edit"><i class="icon-pencil"></i> {l s='Custom price' mod='flashsales'}</div>
</button>
</span>
</div>
<div class="row">
<div class="col-xs-4">
<img src="{$item.image_link|escape:'html':'UTF-8'}" title="{$item.name|escape:'html':'UTF-8'}" class="img-responsive" />
</div>
<div class="col-xs-8">
<div class="row nb_products_content"><div class="col-xs-12"><span class="text-muted">{l s='Products' mod='flashsales'} : <strong><span class="nb_products">{$item.nb_products|intval}</span></strong></span></div></div>
<div class="row custom_price_content">
<div class="col-xs-12">
<span class="text-muted">{l s='Reduction' mod='flashsales'} : <span class="formatted_reduction"></span> <span class="delete-custom-price"><i class="icon-remove"></i></span></span>
</div>
</div>
</div>
</div>
<div id="{$key|strval}_products_{$item.id_item|intval}" class="list_products" style="display:none;">
{$item.products}{* HTML, cannot escape *}
</div>
<div class="panel-footer" data-product="{$item.id_item|intval}">
<input type="hidden" name="id_{$key|strval}" value="{$item.id_item|intval}" />
<button type="button" class="expand-action btn btn-default pull-left">
<div class="btn-expand"><i class="icon-caret-down"></i> {l s='Expand' mod='flashsales'}</div>
<div class="btn-collapse"><i class="icon-caret-up"></i> {l s='Collapse' mod='flashsales'}</div>
</button>
<button type="button" class="card-action btn btn-default pull-right">
<div class="btn-remove"><i class="icon-refresh"></i> {l s='Remove' mod='flashsales'}</div>
<div class="btn-choose"><i class="icon-arrow-right"></i> {l s='Choose' mod='flashsales'}</div>
</button>
</div>
</div>
</div>
{/if}
{/foreach}
{/if}

View File

@ -0,0 +1,63 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if isset($products) && $products}
{foreach from=$products item=prod}
<div class="productCard col-lg-3 col-sm-6 {if $selected}selected-product{/if}">
<div class="panel" data-panel="product">
<div class="panel-heading">
<span class="pull-left">{$prod.name|truncate:40:'...'|escape:'html':'UTF-8'}</span>
<span class ="pull-right">
<button type="button" class="add-custom-price btn btn-default">
<div class="btn-edit"><i class="icon-pencil"></i> {l s='Custom price' mod='flashsales'}</div>
</button>
</span>
</div>
<div class="row">
<div class="col-xs-4">
<img src="{$prod.image_link|escape:'html':'UTF-8'}" title="{$prod.name|escape:'html':'UTF-8'}" class="img-responsive" />
</div>
<div class="col-xs-8">
<div class="row"><div class="col-xs-12"><span class="text-muted">{l s='Reference' mod='flashsales'} : <strong>{$prod.reference|escape:'html':'UTF-8'}</strong></span></div></div>
<div class="row"><div class="col-xs-12"><span class="text-muted">{l s='Stock' mod='flashsales'} : <strong>{$prod.stock[0]|intval}</strong></span></div></div>
<div class="row"><div class="col-xs-12"><span class="text-muted">{l s='Price' mod='flashsales'} : <strong>{$prod.formatted_price|escape:'html':'UTF-8'}</strong></span></div></div>
<div class="row custom_price_content">
<div class="col-xs-12">
<span class="text-muted">{l s='Reduction' mod='flashsales'} : <strong><span class="formatted_reduction"></span> <span class="delete-custom-price"><i class="icon-remove"></i></span></strong></span>
</div>
</div>
</div>
</div>
<div class="panel-footer" data-product="{$prod.id_product|intval}">
<input type="hidden" name="id_product" value="{$prod.id_product|intval}" />
<input type="hidden" class="custom_reduction_type" id="custom_reduction_type_{$prod.id_product|intval}" name="custom_reduction_type_{$prod.id_product|intval}" value="{if isset($prod.custom_reduction_type)}{$prod.custom_reduction_type|escape:'html':'UTF-8'}{/if}" />
<input type="hidden" class="custom_reduction" id="custom_reduction_{$prod.id_product|intval}" name="custom_reduction_{$prod.id_product|intval}" value="{if isset($prod.custom_reduction)}{$prod.custom_reduction|intval}{/if}" />
<a href="{Context::getContext()->link->getAdminLink('AdminProducts')|addslashes}&id_product={$prod.id_product|intval}&updateproduct" class="btn btn-default fancybox"><i class="icon-search"></i> {l s='Details' mod='flashsales'}</a>
<button type="button" class="card-action btn btn-default pull-right">
<div class="btn-remove"><i class="icon-refresh"></i> {l s='Remove' mod='flashsales'}</div>
<div class="btn-choose"><i class="icon-arrow-right"></i> {l s='Choose' mod='flashsales'}</div>
</button>
</div>
</div>
</div>
{/foreach}
{/if}

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,175 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown box' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Width' mod='flashsales'}</span>
<input type="text" data-class=".flashsale-countdown-box" data-property="width" name="box_width" value="{if isset($css_fields.box_width)}{$css_fields.box_width|intval}{/if}"/>
<span class="input-group-addon">{l s='%' mod='flashsales'}</span>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown icon' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-5">
<div class="input-group">
<span class="input-group-addon">{l s='Color' mod='flashsales'}</span>
<input type="color" data-class=".flashsale-countdown-box .content i.icon-clock-o" data-property="color" data-hex="true" class="color mColorPickerInput" name="icon_color" value="{if isset($css_fields.icon_color)}{$css_fields.icon_color|escape:'quotes':'UTF-8'}{/if}" />
</div>
</div>
<div class="col-sm-5">
<div class="input-group">
<span class="input-group-addon">{l s='Size' mod='flashsales'}</span>
<input type="text" data-class=".flashsale-countdown-box .content i.icon-clock-o" data-property="font-size" name="icon_font_size" value="{if isset($css_fields.icon_font_size)}{$css_fields.icon_font_size|intval}{/if}"/>
<span class="input-group-addon">{l s='px' mod='flashsales'}</span>
</div>
</div>
<div class="col-sm-2">
<span class="switch prestashop-switch">
<input id="icon_display_on" data-class=".flashsale-countdown-box .content i.icon-clock-o" data-property="display" type="radio" value="1" name="icon_display" {if isset($css_fields.icon_display) && $css_fields.icon_display}checked="checked"{/if}/>
<label class="radioCheck" for="icon_display_on">{l s='Show' mod='flashsales'}</label>
<input id="icon_display_off" data-class=".flashsale-countdown-box .content i.icon-clock-o" data-property="display" type="radio" value="0" name="icon_display" {if isset($css_fields.icon_display) && !$css_fields.icon_display}checked="checked"{/if}>
<label class="radioCheck" for="icon_display_off">{l s='Hide' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown string' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Color' mod='flashsales'}</span>
<input type="color" data-class=".flashsale-countdown-box .content span.title" data-property="color" data-hex="true" class="color mColorPickerInput" name="title_color" value="{if isset($css_fields.title_color)}{$css_fields.title_color|escape:'quotes':'UTF-8'}{/if}" />
</div>
</div>
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Size' mod='flashsales'}</span>
<input type="text" data-class=".flashsale-countdown-box .content span.title" data-property="font-size" name="title_font_size" value="{if isset($css_fields.title_font_size)}{$css_fields.title_font_size|intval}{/if}"/>
<span class="input-group-addon">{l s='px' mod='flashsales'}</span>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown time left' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Color' mod='flashsales'}</span>
<input type="color" data-class=".flashsale-countdown-box .content span.countdown" data-property="color" data-hex="true" class="color mColorPickerInput" name="countdown_color" value="{if isset($css_fields.countdown_color)}{$css_fields.countdown_color|escape:'quotes':'UTF-8'}{/if}" />
</div>
</div>
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Size' mod='flashsales'}</span>
<input type="text" data-class=".flashsale-countdown-box .content span.timer" data-property="font-size" name="countdown_font_size" value="{if isset($css_fields.countdown_font_size)}{$css_fields.countdown_font_size|intval}{/if}"/>
<span class="input-group-addon">{l s='px' mod='flashsales'}</span>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown background' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{l s='Color' mod='flashsales'}</span>
<input type="color" data-class=".flashsale-countdown-box" data-property="background-color" data-hex="true" class="color mColorPickerInput" name="box_background_color" value="{if isset($css_fields.box_background_color)}{$css_fields.box_background_color|escape:'quotes':'UTF-8'}{/if}" />
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Countdown border' mod='flashsales'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-sm-5">
<div class="input-group">
<span class="input-group-addon">{l s='Color' mod='flashsales'}</span>
<input type="color" data-class=".flashsale-countdown-box" data-property="border-color" data-hex="true" class="color mColorPickerInput" name="box_border_color" value="{if isset($css_fields.box_border_color)}{$css_fields.box_border_color|escape:'quotes':'UTF-8'}{/if}" />
</div>
</div>
<div class="col-sm-5">
<div class="input-group">
<span class="input-group-addon">{l s='Size' mod='flashsales'}</span>
<input type="text" data-class=".flashsale-countdown-box" data-property="border-width" name="box_border_width" value="{if isset($css_fields.box_border_width)}{$css_fields.box_border_width|intval}{/if}"/>
<span class="input-group-addon">{l s='px' mod='flashsales'}</span>
</div>
</div>
<div class="col-sm-2">
<span class="switch prestashop-switch">
<input id="box_border_style_on" data-class=".flashsale-countdown-box" data-property="border-style" type="radio" value="1" name="box_border_style" {if isset($css_fields.box_border_style) && $css_fields.box_border_style}checked="checked"{/if}/>
<label class="radioCheck" for="box_border_style_on">{l s='Show' mod='flashsales'}</label>
<input id="box_border_style_off" data-class=".flashsale-countdown-box" data-property="border-style" type="radio" value="0" name="box_border_style" {if isset($css_fields.box_border_style) && !$css_fields.box_border_style}checked="checked"{/if}/>
<label class="radioCheck" for="box_border_style_off">{l s='Hide' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Css file' mod='flashsales'}
</label>
<div class="col-lg-9">
<button type="button" class="expand-action btn btn-default">
<div class="btn-expand"><i class="icon-caret-down"></i> {l s='Expand' mod='flashsales'}</div>
<div class="btn-collapse" style="display:none"><i class="icon-caret-up"></i> {l s='Collapse' mod='flashsales'}</div>
</button>
<textarea id="css_file" name="css_file" class="textarea-autosize">{if isset($css_file)}{$css_file}{* HTML, cannot escape *}{/if}</textarea>
</div>
</div>

View File

@ -0,0 +1,124 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div class="form-group">
<label class="control-label col-lg-3 required">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Invalid characters:' mod='flashsales'} &lt;&gt;;=#{}">
{l s='Heading page title' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
{foreach from=$languages item=language}
{if $languages|count > 1}
<div class="row">
<div class="translatable-field lang-{$language.id_lang|intval}" {if $language.id_lang != $default_language}style="display:none"{/if}>
<div class="col-lg-9">
{/if}
<input type="text" id="flashsale_page_title_{$language.id_lang|intval}" name="flashsale_page_title_{$language.id_lang|intval}" value="{Configuration::get('FLASHSALE_PAGE_TITLE', $language.id_lang)|escape:'html':'UTF-8'}">
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{$language.iso_code|escape:'html':'UTF-8'}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="javascript:hideOtherLanguage({$language.id_lang|intval});" tabindex="-1">{$language.name|escape:'html':'UTF-8'}</a></li>
{/foreach}
</ul>
</div>
</div>
</div>
{/if}
{/foreach}
</div>
</div>
{if $topmenu}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable this option to display a top menu quick link to flashale page' mod='flashsales'}">
{l s='Top menu quick link' mod='flashsales'}
</span>
</label>
<div class="col-lg-4">
<span class="switch prestashop-switch fixed-width-lg">
<input id="flashsale_display_topmenu_on" type="radio" value="1" name="flashsale_display_topmenu" {if Configuration::get('FLASHSALE_DISPLAY_TOPMENU')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="flashsale_display_topmenu_on">{l s='Enabled' mod='flashsales'}</label>
<input id="flashsale_display_topmenu_off" type="radio" value="0" name="flashsale_display_topmenu" {if !Configuration::get('FLASHSALE_DISPLAY_TOPMENU')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="flashsale_display_topmenu_off">{l s='Disabled' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</div>
</div>
{/if}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Invalid characters:' mod='flashsales'} &lt;&gt;;=#{}">
{l s='Countdown string' mod='flashsales'}
</span>
</label>
<div class="col-lg-9">
{foreach from=$languages item=language}
{if $languages|count > 1}
<div class="row">
<div class="translatable-field lang-{$language.id_lang|intval}" {if $language.id_lang != $default_language}style="display:none"{/if}>
<div class="col-lg-9">
{/if}
<input type="text" id="flashsale_countdown_string_{$language.id_lang|intval}" name="flashsale_countdown_string_{$language.id_lang|intval}" value="{Configuration::get('FLASHSALE_COUNTDOWN_STRING', $language.id_lang)|escape:'html':'UTF-8'}">
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{$language.iso_code|escape:'html':'UTF-8'}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="javascript:hideOtherLanguage({$language.id_lang|intval});" tabindex="-1">{$language.name|escape:'html':'UTF-8'}</a></li>
{/foreach}
</ul>
</div>
</div>
</div>
{/if}
{/foreach}
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of products to display in the left/right column and the home tab content. Default value : 8' mod='flashsales'}">
{l s='Products to displayed' mod='flashsales'}
</span>
</label>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="input-group">
<input type="text" name="flashsale_products_nb" id="flashsale_products_nb" value="{Configuration::get('FLASHSALE_PRODUCTS_NB')|intval}"/>
<span class="input-group-addon">{l s='products' mod='flashsales'}</span>
</div>
</div>
</div>

View File

@ -0,0 +1,55 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<script type="text/javascript">
var default_language = {$default_language|intval};
</script>
<form id="flashsales_form" class="form-horizontal" action="{$currentIndex|escape:'html':'UTF-8'}" method="post" autocomplete="off" enctype="multipart/form-data">
<div class="panel">
<div class="panel-heading">
<i class="icon-cogs"></i> {l s='General' mod='flashsales'}
</div>
{include file="$tpl_general"}
<div class="panel-footer">
<button type="submit" name="submitFlashSales" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save' mod='flashsales'}</button>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<i class="icon-cogs"></i> {l s='Display' mod='flashsales'}
</div>
{include file="$tpl_display"}
<div class="panel-footer">
<button type="submit" name="submitFlashSales" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save' mod='flashsales'}</button>
</div>
</div>
<div class="panel" id="css_form">
<div class="panel-heading">
<i class="icon-cogs"></i> {l s='CSS' mod='flashsales'}
</div>
{include file="$tpl_css"}
<div class="panel-footer">
<button type="submit" name="submitFlashSales" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save' mod='flashsales'}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,38 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Enable this option to automatically override existing specific prices with flash sales custom prices' mod='flashsales'}">
{l s='Override specific prices' mod='flashsales'}
</span>
</label>
<div class="col-lg-4">
<span class="switch prestashop-switch fixed-width-lg">
<input id="flashsale_del_specificprice_on" type="radio" value="1" name="flashsale_del_specificprice" {if Configuration::get('FLASHSALE_DEL_SPECIFICPRICE')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="flashsale_del_specificprice_on">{l s='Enabled' mod='flashsales'}</label>
<input id="flashsale_del_specificprice_off" type="radio" value="0" name="flashsale_del_specificprice" {if !Configuration::get('FLASHSALE_DEL_SPECIFICPRICE')|boolval}checked="checked"{/if}>
<label class="radioCheck" for="flashsale_del_specificprice_off">{l s='Disabled' mod='flashsales'}</label>
<a class="slide-button btn"></a>
</div>
</div>

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,190 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div class="form-group">
<div class="col-lg-12">
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url|escape:'quotes':'UTF-8'}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
<button class="btn btn-default" data-style="expand-right" data-size="s" type="button" id="{$id|escape:'html':'UTF-8'}-add-button">
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files...' mod='flashsales'}{else}{l s='Add file...' mod='flashsales'}{/if}
</button>
</div>
</div>
<div class="well" style="display:none">
<div id="{$id|escape:'html':'UTF-8'}-files-list"></div>
<button class="ladda-button btn btn-primary" data-style="expand-right" type="button" id="{$id|escape:'html':'UTF-8'}-upload-button" style="display:none;">
<span class="ladda-label"><i class="icon-check"></i> {if isset($multiple) && $multiple}{l s='Upload files' mod='flashsales'}{else}{l s='Upload file' mod='flashsales'}{/if}</span>
</button>
</div>
<div class="row" style="display:none">
<div class="alert alert-success" id="{$id|escape:'html':'UTF-8'}-success"></div>
</div>
<div class="row" style="display:none">
<div class="alert alert-danger" id="{$id|escape:'html':'UTF-8'}-errors"></div>
</div>
<script type="text/javascript">
function humanizeSize(bytes)
{
if (typeof bytes !== 'number') {
return '';
}
if (bytes >= 1000000000) {
return (bytes / 1000000000).toFixed(2) + ' GB';
}
if (bytes >= 1000000) {
return (bytes / 1000000).toFixed(2) + ' MB';
}
return (bytes / 1000).toFixed(2) + ' KB';
}
$( document ).ready(function() {
{if isset($multiple) && isset($max_files)}
var {$id|escape:'html':'UTF-8'}_max_files = {$max_files - $files|count};
{/if}
{if isset($files) && $files}
$('#{$id|escape:'html':'UTF-8'}-images-thumbnails').parent().show();
{/if}
var {$id|escape:'html':'UTF-8'}_upload_button = Ladda.create( document.querySelector('#{$id|escape:'html':'UTF-8'}-upload-button' ));
var {$id|escape:'html':'UTF-8'}_total_files = 0;
$('#{$id|escape:'html':'UTF-8'}').fileupload({
dataType: 'json',
async: false,
autoUpload: false,
singleFileUploads: true,
maxFileSize: {$post_max_size|intval},
start: function (e) {
{$id|escape:'html':'UTF-8'}_upload_button.start();
$('#{$id|escape:'html':'UTF-8'}-upload-button').unbind('click'); //Important as we bind it for every elements in add function
},
fail: function (e, data) {
$('#{$id|escape:'html':'UTF-8'}-errors').html(data.errorThrown.message).parent().show();
$('#{$id|escape:'html':'UTF-8'}-files-list').html('').parent().hide();
},
done: function (e, data) {
if (data.result) {
if (typeof data.result.{$name|escape:'html':'UTF-8'} !== 'undefined') {
for (var i=0; i<data.result.{$name|escape:'html':'UTF-8'}.length; i++) {
if (typeof data.result.{$name|escape:'html':'UTF-8'}[i].error !== 'undefined' && data.result.{$name|escape:'html':'UTF-8'}[i].error != '') {
$('#{$id|escape:'html':'UTF-8'}-errors').html('<strong>'+data.result.{$name|escape:'html':'UTF-8'}[i].name+'</strong> : '+data.result.{$name|escape:'html':'UTF-8'}[i].error).parent().show();
$('#{$id|escape:'html':'UTF-8'}-files-list').html('').parent().hide();
}
else
{
$(data.context).appendTo($('#{$id|escape:'html':'UTF-8'}-success'));
$('#{$id|escape:'html':'UTF-8'}-success').parent().show();
if (data.result.{$name|escape:'html':'UTF-8'}[i] !== null && data.result.{$name|escape:'html':'UTF-8'}[i].status == 'ok')
{
var response = data.result.{$name|escape:'html':'UTF-8'}[i];
var cover = "icon-check-empty";
var legend = '';
if (response.cover == "1")
cover = "icon-check-sign";
if (typeof response.legend !== 'undefined' && response.legend != null)
legend = response.legend[{$default_language|intval}];
imageLine(response.id, response.path, response.position, cover, response.shops, legend);
$("#countImage").html(parseInt($("#countImage").html()) + 1);
$("#img" + id).remove();
$("#imageTable").tableDnDUpdate();
}
}
}
}
$(data.context).find('button').remove();
}
},
}).on('fileuploadalways', function (e, data) {
{$id|escape:'html':'UTF-8'}_total_files--;
if ({$id|escape:'html':'UTF-8'}_total_files == 0)
{
{$id|escape:'html':'UTF-8'}_upload_button.stop();
$('#{$id|escape:'html':'UTF-8'}-upload-button').unbind('click');
$('#{$id|escape:'html':'UTF-8'}-files-list').parent().hide();
}
}).on('fileuploadadd', function(e, data) {
if (typeof {$id|escape:'html':'UTF-8'}_max_files !== 'undefined') {
if ({$id|escape:'html':'UTF-8'}_total_files >= {$id|escape:'html':'UTF-8'}_max_files) {
e.preventDefault();
alert('{l s='You can upload a maximum of %s files'|sprintf:$max_files mod='flashsales'}');
return;
}
}
data.context = $('<div/>').addClass('form-group').appendTo($('#{$id|escape:'html':'UTF-8'}-files-list'));
var file_name = $('<span/>').append('<i class="icon-picture-o"></i> <strong>'+data.files[0].name+'</strong> ('+humanizeSize(data.files[0].size)+')').appendTo(data.context);
var button = $('<button/>').addClass('btn btn-default pull-right').prop('type', 'button').html('<i class="icon-trash"></i> {l s='Remove file' mod='flashsales'}').appendTo(data.context).on('click', function() {
{$id|escape:'html':'UTF-8'}_total_files--;
data.files = null;
var total_elements = $(this).parent().siblings('div.form-group').length;
$(this).parent().remove();
if (total_elements == 0) {
$('#{$id|escape:'html':'UTF-8'}-files-list').html('').parent().hide();
}
});
$('#{$id|escape:'html':'UTF-8'}-files-list').parent().show();
$('#{$id|escape:'html':'UTF-8'}-upload-button').show().bind('click', function () {
if (data.files != null)
data.submit();
});
{$id|escape:'html':'UTF-8'}_total_files++;
}).on('fileuploadprocessalways', function (e, data) {
var index = data.index, file = data.files[index];
if (file.error) {
$('#{$id|escape:'html':'UTF-8'}-errors').append('<div class="form-group"><i class="icon-picture-o"></i> <strong>'+file.name+'</strong> ('+humanizeSize(file.size)+') : '+file.error+'</div>').parent().show();
$('#{$id|escape:'html':'UTF-8'}-files-list').html('').parent().hide();
$(data.context).find('button').trigger('click');
}
}).on('fileuploadsubmit', function (e, data) {
var params = new Object();
$('input[id^="legend_"]').each(function()
{
id = $(this).prop("id").replace("legend_", "legend[") + "]";
params[id] = $(this).val();
});
data.formData = params;
});
$('#{$id|escape:'html':'UTF-8'}-add-button').on('click', function() {
$('#{$id|escape:'html':'UTF-8'}-success').html('').parent().hide();
$('#{$id|escape:'html':'UTF-8'}-errors').html('').parent().hide();
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
});
</script>

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,137 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if isset($files) && $files|count > 0}
{assign var='show_thumbnail' value=false}
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
{assign var='show_thumbnail' value=true}
{/if}
{/foreach}
{if $show_thumbnail}
<div class="form-group">
<div class="col-lg-12" id="{$id|escape:'html':'UTF-8'}-images-thumbnails">
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
<div>
{$file.image}{* HTML, cannot escape *}
{if isset($file.size)}<p>{l s='File size' mod='flashsales'} {$file.size|floatval}kb</p>{/if}
{if isset($file.delete_url)}
<p>
<a class="btn btn-default" href="{$file.delete_url|escape:'html':'UTF-8'}">
<i class="icon-trash"></i> {l s='Delete' mod='flashsales'}
</a>
</p>
{/if}
</div>
{/if}
{/foreach}
</div>
</div>
{/if}
{/if}
{if isset($max_files) && $files|count >= $max_files}
<div class="row">
<div class="alert alert-warning">{l s='You have reached the limit (%s) of files to upload, please remove files to continue uploading' sprintf=$max_files mod='flashsales'}</div>
</div>
{else}
<div class="form-group">
<div class="col-sm-6">
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}"{if isset($multiple) && $multiple} multiple="multiple"{/if} class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="{$id|escape:'html':'UTF-8'}-name" type="text" name="filename" readonly />
<span class="input-group-btn">
<button id="{$id|escape:'html':'UTF-8'}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files' mod='flashsales'}{else}{l s='Add file' mod='flashsales'}{/if}
</button>
{if (!isset($multiple) || !$multiple) && isset($files) && $files|count == 1 && isset($files[0].download_url)}
<a href="{$files[0].download_url|escape:'html':'UTF-8'}" class="btn btn-default">
<i class="icon-cloud-download"></i>
{if isset($size)}{l s='Download current file (%skb)' sprintf=$size mod='flashsales'}{else}{l s='Download current file' mod='flashsales'}{/if}
</a>
{/if}
</span>
</div>
</div>
</div>
<script type="text/javascript">
{if isset($multiple) && isset($max_files)}
var {$id|escape:'html':'UTF-8'}_max_files = {$max_files - $files|count};
{/if}
$(document).ready(function(){
$('#{$id|escape:'html':'UTF-8'}-selectbutton').click(function(e) {
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
$('#{$id|escape:'html':'UTF-8'}-name').click(function(e) {
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
$('#{$id|escape:'html':'UTF-8'}-name').on('dragenter', function(e) {
e.stopPropagation();
e.preventDefault();
});
$('#{$id|escape:'html':'UTF-8'}-name').on('dragover', function(e) {
e.stopPropagation();
e.preventDefault();
});
$('#{$id|escape:'html':'UTF-8'}-name').on('drop', function(e) {
e.preventDefault();
var files = e.originalEvent.dataTransfer.files;
$('#{$id|escape:'html':'UTF-8'}')[0].files = files;
$(this).val(files[0].name);
});
$('#{$id|escape:'html':'UTF-8'}').change(function(e) {
if ($(this)[0].files !== undefined)
{
var files = $(this)[0].files;
var name = '';
$.each(files, function(index, value) {
name += value.name+', ';
});
$('#{$id|escape:'html':'UTF-8'}-name').val(name.slice(0, -2));
}
else // Internet Explorer 9 Compatibility
{
var name = $(this).val().split(/[\\/]/);
$('#{$id|escape:'html':'UTF-8'}-name').val(name[name.length-1]);
}
});
if (typeof {$id|escape:'html':'UTF-8'}_max_files !== 'undefined')
{
$('#{$id|escape:'html':'UTF-8'}').closest('form').on('submit', function(e) {
if ($('#{$id|escape:'html':'UTF-8'}')[0].files.length > {$id|escape:'html':'UTF-8'}_max_files) {
e.preventDefault();
alert('{l s='You can upload a maximum of %s files'|sprintf:$max_files mod='flashsales'}');
}
});
}
});
</script>
{/if}

View File

@ -0,0 +1,53 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
<div id="flashsale-content" class="bootstrap">
{/if}
<div id="flashsale_dashboard">
<div class="row">
<div class="col-lg-12">
<div class="panel">
<div class="panel-heading">
<i class="icon-bars"></i> {l s='Dashboard' mod='flashsales'}
</div>
<div class="form-group">
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="#active" role="tab" data-toggle="tab">{l s='Active' mod='flashsales'}</a></li>
<li role="presentation"><a href="#pending" role="tab" data-toggle="tab">{l s='Pending' mod='flashsales'}</a></li>
<li role="presentation"><a href="#expired" role="tab" data-toggle="tab">{l s='Expired' mod='flashsales'}</a></li>
</ul>
</div>
<div class="tab-content">
{if isset($flash_sales) && count($flash_sales)}
{foreach from=$flash_sales key=id item=flash_sale}
{include file="$tpl_list" id=$id flash_sale=$flash_sale}
{/foreach}
{/if}
</div>
</div>
</div>
</div>
</div>
{if version_compare($smarty.const._PS_VERSION_, '1.6', '<')}
</div>
{/if}

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,30 @@
{*
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<div role="tabpanel" class="tab-pane {if $id=='active'}active{/if}" id="{$id|escape:'html':'UTF-8'}">
<div class="row">
<div class="col-lg-12">
{if isset($flash_sale.content) && count($flash_sale.content)}
{$flash_sale.content}{* HTML, cannot escape *}
{/if}
</div>
</div>
</div>

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,73 @@
{capture name=path}
{if $id_flash_sale}
<a href="{$link->getModuleLink('flashsales', 'page')|escape:'quotes':'UTF-8'}">{$pageTitle}<i class="icon"></i></a>
<span class="navigation_page">{$name|escape:'html':'UTF-8'}</span>
{else}
{$name|escape:'html':'UTF-8'}
{/if}
{/capture}
<main>
<section>
<header class="page-heading" >
<div id="breadcrumbs">
<div class="container">
{include file="$tpl_dir./breadcrumb.tpl"}
</div>
</div>
<div class="container">
<div>
<div
class="header clearfix"
style="
{if $imgFlashSale}
background-image: url('{$base_dir}modules/{$imgFlashSale}')
{else}
background-image: url('{$base_dir}modules/flashsales/views/img/banner/default.jpg')
{/if}
">
<div class="content">
<h1>{$name|escape:'html':'UTF-8'}</h1>
{if $description}
<div class="description">
{$description}
</div>
{/if}
<div class="listing-flashsales">
<select class="custom-input">
<option value="{$link->getModuleLink('flashsales', 'page')|escape:'quotes':'UTF-8'}">{l s='Selectionnez une vente flash' mod='flashsales'}</option>
{foreach from=$flash_sales item=flash_sale}
<option{if $flash_sale.id_flash_sale == $id_flash_sale} selected="selected"{/if} value="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}">
{$flash_sale.name|escape:'html':'UTF-8'}
</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
</div>
</header>
{if $products && count($products)}
<div class="products-list container">
<div class="row">
{include file="$tpl_dir./product-list-blocs.tpl" products=$products}
</div>
</div>
{include file="$tpl_dir./pagination.tpl"}
{else}
<p class="alert alert-warning">{l s='No flash sales at this time.' mod='flashsales'}</p>
{/if}
<script>
$(document).ready(function() {
$('.listing-flashsales select').on('change', function() {
window.location.href = $(this).val();
});
});
</script>
</section>
</main>

View File

@ -0,0 +1,67 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<!-- MODULE Block flash sales -->
<div class="flashsale flashsale-column block">
<h4 class="title_block">
<a href="{$link->getModuleLink('flashsales','page')|escape:'quotes':'UTF-8'}" title="{l s='View all flash sales products' mod='flashsales'}">{l s='Flash sales' mod='flashsales'}</a>
</h4>
<div class="content_block">
{if $flash_sales && $flash_sales|@count > 0}
<ul>
{foreach from=$flash_sales item=product name=myLoop}
<li class="clearfix">
<a href="{$product.link|escape:'quotes':'UTF-8'}" title="{$product.legend|escape:'html':'UTF-8'}" class="product-image clearfix">
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')|escape:'quotes':'UTF-8'}" alt="{$product.legend|escape:'html':'UTF-8'}" />
</a>
<div class="product-content">
<h5 class="product-name">
<a href="{$product.link|escape:'quotes':'UTF-8'}" title="{$product.legend|escape:'html':'UTF-8'}">
{$product.name|escape:'html':'UTF-8'}
</a>
</h5>
<p class="product-description">{$product.description_short|strip_tags:'UTF-8'|truncate:40:'...'|escape:'html':'UTF-8'}</p>
{if !$PS_CATALOG_MODE}
<div class="product-price">
<span class="price special-price">{if !$priceDisplay}{displayWtPrice p=$product.price|floatval}{else}{displayWtPrice p=$product.price_tax_exc|floatval}{/if}</span>
{if $product.specific_prices}
{assign var='specific_price' value=$product.specific_prices}
{if $specific_price.reduction_type == 'percentage' && ($specific_price.from == $specific_price.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_price.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_price.from))}
<span class="price-percent-reduction">-{$specific_price.reduction*100|floatval}%</span>
{/if}
{/if}
<span class="old-price">{displayWtPrice p=$product.price_without_reduction}</span>
</div>
{/if}
</div>
</li>
{/foreach}
</ul>
<div class="lnk">
<a href="{$link->getModuleLink('flashsales','page')|escape:'quotes':'UTF-8'}" title="{l s='All flash sales' mod='flashsales'}" class="btn btn-default button button-small"><span>{l s='All flash sales' mod='flashsales'}<i class="icon-chevron-right right"></i></span></a>
</div>
{else}
<p>{l s='No flash sales at this time.' mod='flashsales'}</p>
{/if}
</div>
</div>
<!-- /MODULE Block flashsales -->

View File

@ -0,0 +1,11 @@
<!-- MODULE Countdown Flash sale -->
<div class="flashsale-countdown-box">
<i class="icon icon-flashsale"></i>
<span class="countdown" data-to="{$to|intval}">
<span class="timerDay"><span class="timer TimerDay"></span>j </span>
<span class="timerHour"><span class="timer TimerHour"></span>h</span>
<span class="timerMin"><span class="timer TimerMin"></span>m</span>
<span class="timerSec"><span class="timer TimerSec"></span>s</span>
</span>
</div>
<!-- /MODULE Countdown Flash sale -->

View File

@ -0,0 +1,28 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2015 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if isset($flash_sales) && $flash_sales}
{include file="$tpl_dir./product-list.tpl" products=$flash_sales class='flashsales tab-pane' id='flashsales'}
{else}
<ul id="flashsales" class="tab-pane">
<li class="alert alert-info">{l s='No flash sales at this time.' mod='flashsales'}</li>
</ul>
{/if}

View File

@ -0,0 +1,22 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
<li><a data-toggle="tab" href="#flashsales">{l s='Flash Sales' mod='flashsales'}</a></li>

View File

@ -0,0 +1,68 @@
{*
* 2014 Agencya
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*}
{if isset($flash_sales) && count($flash_sales)}
<div class="flashsale flashsale-home">
{foreach from=$flash_sales item=flash_sale}
<div class="row">
<div class="col-lg-12">
<div class="content_block">
<div class="row">
<div class="col-md-9">
<div class="left_block">
<a href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}]|escape:'quotes':'UTF-8')}">
{if $flash_sale.banner}
<img class="img-responsive" src="{$link->getMediaLink("`$flash_sale.banner`")|escape:'quotes':'UTF-8'}" alt="{$flash_sale.name|escape:'html':'UTF-8'}"/>
{else}
<div class="banner_content">
<span class="banner_name">{$flash_sale.name|escape:'html':'UTF-8'}</span>
{if (isset($flash_sale.description) && !empty($flash_sale.description))}
<div class="banner_description">{$flash_sale.description}{* HTML, cannot escape *}</div>
{/if}
</div>
{/if}
</a>
</div>
</div>
<div class="col-md-3">
<div class="right_block">
<div class="row">
<div class="col-md-12">
{include file="{$tpl_countdown}" to=$flash_sale.to|strtotime|intval}
</div>
<div class="col-md-12 hidden-xs hidden-sm">
<button class="btn btn-primary">
<a href="{$link->getModuleLink('flashsales', 'page', ['id_flash_sale' => {$flash_sale.id_flash_sale|intval}])|escape:'quotes':'UTF-8'}">
{l s='Display the flash sale' mod='flashsales'}
</a>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/foreach}
</div>
{/if}

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -0,0 +1,32 @@
<?php
/**
* 2014 - Agencya SARL
*
* NOTICE OF LICENSE
*
* The source code of this module is under a commercial license.
* Each license is unique and can be installed and used on only one shop.
* Any reproduction or representation total or partial of the module, one or more of its components,
* by any means whatsoever, without express permission from us is prohibited.
* If you have not received this module from us, thank you for contacting us.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @author Agencya
* @copyright 2014 - Agencya SARL
* @license commercial
* International Registered Trademark & Property of Agencya SARL
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@ -42,7 +42,6 @@
</div>
<div class="col-md-4">
{if $product_relation}
<div >
<div class="pack">
@ -51,11 +50,17 @@
<div class="product_top">
{assign var='product' value=$product_relation.0}
{assign var='id_image' value=Product::getCover($product->id)}
{assign var=percentReduction value=0}
{if isset($product->price_without_reduction) && isset($product->price) && $product->price != round($product->price_without_reduction, 2)}
{math equation="round(100 - (price * 100 / price_without_reduction))" price=$product->price price_without_reduction=$product->price_without_reduction assign=percentReduction}
{/if}
<div class="clearfix">
<div class="col-md-4 col-xs-4 image">
{if $product->specific_prices.reduction_type == 'percentage'}
<span class="price-percent-reduction">-{$product->specific_prices.reduction * 100}%</span>
{if $percentReduction}
<span class="price-percent-reduction">
<span>-{$percentReduction}<sup>%</sup></span>
</span>
{/if}
<a href="{$link->getProductLink($product->id, $product->link_rewrite)}" title="{$product->name|escape:'html':'UTF-8'}">
<img class="img-responsive" src="{$link->getImageLink($product->link_rewrite, $id_image.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="{$product->name|escape:'html':'UTF-8'}" title="{$product->name|escape:'html':'UTF-8'}" itemprop="image" />
@ -63,15 +68,20 @@
</div>
<div class="col-md-8 col-xs-8 content_product">
<a class="link_name" href="{$link->getProductLink($product->id, $product->link_rewrite)}" title="{$product->name|escape:'html':'UTF-8'}">{$product->name}</a>
<div class="product-flashsale">
{hook h="displayProductListReviews" product=$product}
</div>
<div class="price">
{displayPrice price=$product->price}
</div>
{if isset($product->specific_prices) && $product->specific_prices && isset($product->specific_prices.reduction) && $product->specific_prices.reduction > 0}
<span class="old-price product-price">
{l s='au lieu de'} <span class="barre">{displayWtPrice p=$product->price_without_reduction}</span>
</span> <br />
{/if}
<a class="btn ajax_add_to_cart_button" data-text="{l s='J\'achete'}" data-id-product="{$product->id}" data-minimal_quantity="1" onclick="trackConversion(`{CMSCategory::getNameStatic($edito->id_category)}`, `Le produit qui me sauve`, `Ajout au panier depuis la page Astuce`);">
<i class="icon icon-shopping-cart"></i> <span>{l s='J\'achete'}</span>
@ -84,7 +94,6 @@
<div class="border bloc">
<span class="icon-logistics3"></span>{l s='Livraison express'}
</div>
</div>
</div>
</div>

View File

@ -17,9 +17,9 @@
<div class="product-container bloc col-sm-6 col-xs-6 col-xxs-6 {if (isset($column) && $column==true)}column{/if}" itemscope itemtype="http://schema.org/Product">
<div class="border {if isset($percentReduction) && $percentReduction > 0} discount{/if}">
{if $product.specific_prices.reduction_type == 'percentage'}
{if $percentReduction}
<span class="price-percent-reduction">
<span>-{$product.specific_prices.reduction * 100}<sup>%</sup></span>
<span>-{$percentReduction}<sup>%</sup></span>
</span>
{/if}
<!-- Image -->
@ -56,7 +56,11 @@
</div>
<!-- / reviews listing -->
<div class="short_desc">
{$product.description_short|strip_tags|truncate:90}
{$product.description_short|strip_tags|truncate:70}
</div>
<div class="product-flashsale">
{hook h="displayProductListReviews" product=$product}
</div>
<!-- Infos produits -->

View File

@ -17,9 +17,9 @@
<div class="product-container bloc col-sm-6 col-xs-6 col-xxs-12 {if (isset($column) && $column==true)}column{/if}" itemscope itemtype="http://schema.org/Product">
<div class="border {if isset($percentReduction) && $percentReduction > 0} discount{/if}">
{if $product.specific_prices.reduction_type == 'percentage'}
{if $percentReduction}
<span class="price-percent-reduction">
<span>-{$product.specific_prices.reduction * 100}<sup>%</sup></span>
<span>-{$percentReduction}<sup>%</sup></span>
</span>
{/if}
<!-- Image -->
@ -54,101 +54,99 @@
<div class="short_desc">
{$product.description_short|strip_tags|truncate:120}
</div>
<!-- Infos produits -->
<div class="product-flashsale">
{hook h="displayProductListReviews" product=$product}
</div>
<!-- Infos produits -->
</div>
</div>
<div class="{if !isset($column)}col-sm-8 {else} col-sm-12 {/if}product-actions">
<div class="row">
<!-- Microdata pour les stocks -->
{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="avail clearfix">
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
<div class="inner">
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
<link itemprop="price" content="{$product.price_without_reduction|number_format:2}">
{if (isset($product.allow_oosp) && $product.allow_oosp || $product.quantity > 0)}
<link itemprop="availability" href="http://schema.org/InStock" />
<span>
{if $product.quantity <= 0}
{if $product.allow_oosp}
{if isset($product.available_later) && $product.available_later}
<span class="label-warning rose valign-bottom"><i class="icon-logistics3"></i><span>{l s='En réassort'}</span></span>
<span class="shipping">{$product.available_later}</span>
{else}
<span class="label-warning rose valign-bottom"><i class="icon-logistics3"></i><span>{l s='En réassort'}</span></span>
<span class="shipping">Expédition sous 15 jours</span>
{/if}
{/if}
{else}
<span class="label-success valign-bottom"><i class="icon-logistics3"></i><span>{l s='En stock'}</span></span>
<span class="shipping">Expédition sous 48h</span>
{/if}
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
</span>
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
<link itemprop="availability" href="http://schema.org/LimitedAvailability" />
{l s='Product available with different options'}
<div class="row">
<!-- Microdata pour les stocks -->
{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="avail clearfix">
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
<div class="inner">
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
<link itemprop="price" content="{$product.price_without_reduction|number_format:2}">
{if (isset($product.allow_oosp) && $product.allow_oosp || $product.quantity > 0)}
<link itemprop="availability" href="http://schema.org/InStock" />
<span>
{if $product.quantity <= 0}
{if $product.allow_oosp}
{if isset($product.available_later) && $product.available_later}
<span class="label-warning rose valign-bottom"><i class="icon-logistics3"></i><span>{l s='En réassort'}</span></span>
<span class="shipping">{$product.available_later}</span>
{else}
<link itemprop="availability" href="http://schema.org/OutOfStock" />
<span class="label-warning">{l s='Out of stock'}</span>
<span class="label-warning rose valign-bottom"><i class="icon-logistics3"></i><span>{l s='En réassort'}</span></span>
<span class="shipping">Expédition sous 15 jours</span>
{/if}
</span>
</div>
{/if}
</div>
{/if}
<div class="{if !isset($column)}col-md-6 col-sm-12{else}col-sm-6 col-xs-12{/if} priceWrap">
<!-- Prix -->
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
<span class="price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
{hook h="displayProductPriceBlock" product=$product type="old_price"}
<span class="old-price product-price">
{l s='au lieu de'} <span class="barre">{displayWtPrice p=$product.price_without_reduction}</span>
</span>
{/if}
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
{else}
<span class="label-success valign-bottom"><i class="icon-logistics3"></i><span>{l s='En stock'}</span></span>
<span class="shipping">Expédition sous 48h</span>
{/if}
</div>
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
</span>
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
<link itemprop="availability" href="http://schema.org/LimitedAvailability" />
{l s='Product available with different options'}
{else}
<link itemprop="availability" href="http://schema.org/OutOfStock" />
<span class="label-warning">{l s='Out of stock'}</span>
{/if}
</div>
<div class="{if !isset($column)}col-md-6 col-sm-12{else}col-sm-6 col-xs-12{/if} btnWrap">
<!-- Ajout panier -->
<div class="add_to_cart_contain">
<a
class="btn ajax_add_to_cart_button"
data-id-product="{$product.id_product}"
data-minimal_quantity="1"
{if isset($tracked) && $tracked}
onclick="trackConversion(`{CMSCategory::getNameStatic($id_cms_category)}`, `Duo de produits liés à une astuce`, `Ajout au panier depuis la page Catégorie`);"
{/if}
>
<i class="icon icon-shopping-cart"></i> <span>{l s='J\'achete'}</span>
</a>
</div>
</div>
</div>
<div class="overlay"></div>
</span>
</div>
{/if}
</div>
{/if}
<div class="{if !isset($column)}col-md-6 col-sm-12{else}col-sm-6 col-xs-12{/if} priceWrap">
<!-- Prix -->
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
<span class="price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
{hook h="displayProductPriceBlock" product=$product type="old_price"}
<span class="old-price product-price">
{l s='au lieu de'} <span class="barre">{displayWtPrice p=$product.price_without_reduction}</span>
</span>
{/if}
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
{/if}
</div>
{/if}
</div>
</div>
<div class="{if !isset($column)}col-md-6 col-sm-12{else}col-sm-6 col-xs-12{/if} btnWrap">
<!-- Ajout panier -->
<div class="add_to_cart_contain">
<a
class="btn ajax_add_to_cart_button"
data-id-product="{$product.id_product}"
data-minimal_quantity="1"
{if isset($tracked) && $tracked}
onclick="trackConversion(`{CMSCategory::getNameStatic($id_cms_category)}`, `Duo de produits liés à une astuce`, `Ajout au panier depuis la page Catégorie`);"
{/if}
>
<i class="icon icon-shopping-cart"></i> <span>{l s='J\'achete'}</span>
</a>
</div>
</div>
</div>
<div class="overlay"></div>
</div>
</div>
</div>
</div>
{/if}
{/foreach}

View File

@ -158,14 +158,12 @@
<a href="#description" class="readmore">{l s='Lire la suite'}</a>
{/if}
</div>
{/if}
{/if}
{hook h='displayPictogrammesProduct' id_product=$product->id}
<div class="netReViewsWrap">
{$HOOK_EXTRA_RIGHT}
{$HOOK_EXTRA_RIGHT}
</div>
</div>