add module 'privatesales_similarproduct'
In product detail page : - show slider with product associated accessories if any, above the best selling products slider - show product's family best selling instead of the accessories, if any - show no slider if no accessories nor family best selling present Cache slider templates for : - associated accessories for each product for every language, if any - family best selling for each family of the product for every language, if any Fixes in javascript : - missing globals variables in module expresscart would the express cart fail when out of stock - change the express cart displaying when clicking on the cart icon in any footer sliders. Css : duplicate all css styles 'best-sellers_block_product' in 'privatesales_similarproduct' so that the latter slider can be adapted if required.
This commit is contained in:
parent
a7198f0fea
commit
9ecf2491c6
@ -1,4 +1,5 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
{literal}
|
||||
|
||||
function hideExpressCart(event){
|
||||
@ -15,18 +16,21 @@ function hideExpressCart(event){
|
||||
|
||||
function showExpressCart(event) {
|
||||
var m = $(event.target);
|
||||
var expresscart_frame_visible = m.parents('.slider_sales_product_footer').next('.expresscart_frame:visible');
|
||||
var expresscart_frame = m.parents('.slider_sales_product_footer').next('.expresscart_frame');
|
||||
|
||||
m.toggleClass('active');
|
||||
|
||||
if($(".expresscart_frame:visible").length > 0) {
|
||||
if(expresscart_frame_visible.length > 0) {
|
||||
m.removeClass('active');
|
||||
hideFooterExpressCart();
|
||||
} else {
|
||||
$(".expresscart_frame").slideDown(function() {
|
||||
if($(".expresscart_frame").children("p.loading").length > 0) {
|
||||
expresscart_frame.slideDown(function() {
|
||||
if(expresscart_frame.children("p.loading").length > 0) {
|
||||
var id_product = m.parent().children(".ajax_add_to_cart_product_footer_button").attr("rel");
|
||||
$(".expresscart_frame").append("<iframe src=\"{/literal}{$base_dir_ssl}{literal}modules/expresscart/ajax.php?page=1&id_product=" + id_product + "\" style=\"display: none;\" border=\"0\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" onload=\"$(this).show(); $(this).parent().children('p.loading').remove();\"></iframe>");
|
||||
expresscart_frame.append("<iframe src=\"{/literal}{$base_dir_ssl}{literal}modules/expresscart/ajax.php?page=1&id_product=" + id_product + "\" style=\"display: none;\" border=\"0\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" onload=\"$(this).show(); $(this).parent().children('p.loading').remove();\"></iframe>");
|
||||
}
|
||||
$(".expresscart_frame").append('<a href="#" class="close_popup_footer"></a>');
|
||||
expresscart_frame.append('<a href="#" class="close_popup_footer"></a>');
|
||||
|
||||
$('a.close_popup_footer').click(function() {
|
||||
$(this).remove();
|
||||
@ -38,6 +42,7 @@ function showExpressCart(event) {
|
||||
$("html").bind("click", {m: m}, hideExpressCart);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -388,6 +388,9 @@
|
||||
var uploading_in_progress = '{l s='Uploading in progress, please wait...' mod='expresscart' js=1}';
|
||||
var fieldRequired = '{l s='Please fill in all required fields, then save the customization.' mod='expresscart' js=1}';
|
||||
|
||||
var quantityAvailableSentence = '{l s='Warning: X items in stock!' mod='expresscart' js=1}';
|
||||
var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' mod='expresscart' js=1}';
|
||||
|
||||
{if isset($groups)}
|
||||
// Combinations
|
||||
{foreach from=$combinations key=idCombination item=combination}
|
||||
|
@ -441,6 +441,9 @@
|
||||
var uploading_in_progress = '{l s='Uploading in progress, please wait...' mod='expresscart' js=1}';
|
||||
var fieldRequired = '{l s='Please fill in all required fields, then save the customization.' mod='expresscart' js=1}';
|
||||
|
||||
var quantityAvailableSentence = '{l s='Warning: X items in stock!' mod='expresscart' js=1}';
|
||||
var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' mod='expresscart' js=1}';
|
||||
|
||||
{if isset($groups)}
|
||||
// Combinations
|
||||
{foreach from=$combinations key=idCombination item=combination}
|
||||
|
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* jQuery FlexSlider v2.2.0
|
||||
* http://www.woothemes.com/flexslider/
|
||||
*
|
||||
* Copyright 2012 WooThemes
|
||||
* Free to use under the GPLv2 license.
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributing author: Tyler Smith (@mbmufffin)
|
||||
*/
|
||||
|
||||
|
||||
/* Browser Resets
|
||||
*********************************/
|
||||
.flex-container a:active,
|
||||
.flexslider a:active,
|
||||
.flex-container a:focus,
|
||||
.flexslider a:focus {outline: none;}
|
||||
.slides,
|
||||
.flex-control-nav,
|
||||
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
|
||||
|
||||
/* Icon Fonts
|
||||
*********************************/
|
||||
/* Font-face Icons */
|
||||
@font-face {
|
||||
font-family: 'flexslider-icon';
|
||||
src:url('fonts/flexslider-icon.eot');
|
||||
src:url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'),
|
||||
url('fonts/flexslider-icon.woff') format('woff'),
|
||||
url('fonts/flexslider-icon.ttf') format('truetype'),
|
||||
url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* FlexSlider Necessary Styles
|
||||
*********************************/
|
||||
.flexslider {margin: 0; padding: 0;}
|
||||
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
|
||||
.flexslider .slides img {width: 100%; display: block;}
|
||||
.flex-pauseplay span {text-transform: capitalize;}
|
||||
|
||||
/* Clearfix for the .slides element */
|
||||
.slides:after {content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|
||||
html[xmlns] .slides {display: block;}
|
||||
* html .slides {height: 1%;}
|
||||
|
||||
/* No JavaScript Fallback */
|
||||
/* If you are not using another script, such as Modernizr, make sure you
|
||||
* include js that eliminates this class on page load */
|
||||
.no-js .slides > li:first-child {display: block;}
|
||||
|
||||
/* FlexSlider Default Theme
|
||||
*********************************/
|
||||
.flexslider { margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 4px; -moz-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 4px rgba(0,0,0,.2); -o-box-shadow: 0 1px 4px rgba(0,0,0,.2); box-shadow: 0 1px 4px rgba(0,0,0,.2); zoom: 1; }
|
||||
.flex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; }
|
||||
.loading .flex-viewport { max-height: 300px; }
|
||||
.flexslider .slides { zoom: 1; }
|
||||
.carousel li { margin-right: 5px; }
|
||||
|
||||
/* Direction Nav */
|
||||
.flex-direction-nav {*height: 0;}
|
||||
.flex-direction-nav a { display: block; width: 40px; height: 40px; margin: -20px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba(0,0,0,0.8); text-shadow: 1px 1px 0 rgba(255,255,255,0.3); -webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease; }
|
||||
.flex-direction-nav .flex-prev { left: -50px; }
|
||||
.flex-direction-nav .flex-next { right: -50px; text-align: right; }
|
||||
.flexslider:hover .flex-prev { opacity: 0.7; left: 10px; }
|
||||
.flexslider:hover .flex-next { opacity: 0.7; right: 10px; }
|
||||
.flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover { opacity: 1; }
|
||||
.flex-direction-nav .flex-disabled { opacity: 0!important; filter:alpha(opacity=0); cursor: default; }
|
||||
.flex-direction-nav a:before { font-family: "flexslider-icon"; font-size: 40px; display: inline-block; content: '\f001'; }
|
||||
.flex-direction-nav a.flex-next:before { content: '\f002'; }
|
||||
|
||||
/* Pause/Play */
|
||||
.flex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; }
|
||||
.flex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; }
|
||||
.flex-pauseplay a:hover { opacity: 1; }
|
||||
.flex-pauseplay a.flex-play:before { content: '\f003'; }
|
||||
|
||||
/* Control Nav */
|
||||
.flex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
|
||||
.flex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
|
||||
.flex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -o-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); box-shadow: inset 0 0 3px rgba(0,0,0,0.3); }
|
||||
.flex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
|
||||
.flex-control-paging li a.flex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
|
||||
|
||||
.flex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
|
||||
.flex-control-thumbs li {width: 25%; float: left; margin: 0;}
|
||||
.flex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
|
||||
.flex-control-thumbs img:hover {opacity: 1;}
|
||||
.flex-control-thumbs .flex-active {opacity: 1; cursor: default;}
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
.flex-direction-nav .flex-prev { opacity: 1; left: 10px;}
|
||||
.flex-direction-nav .flex-next { opacity: 1; right: 10px;}
|
||||
}
|
1128
modules/privatesales_similarproducts/assets/js/jquery.flexslider.js
Normal file
1128
modules/privatesales_similarproducts/assets/js/jquery.flexslider.js
Normal file
File diff suppressed because it is too large
Load Diff
75
modules/privatesales_similarproducts/cache/left_2.html
vendored
Executable file
75
modules/privatesales_similarproducts/cache/left_2.html
vendored
Executable file
@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
<!-- MODULE Block best sellers -->
|
||||
<div id="best-sellers_block_right" class="block products_block">
|
||||
<div class="text_block2">
|
||||
<h5>Les meilleures ventes</h5>
|
||||
<div class="block_content">
|
||||
<p></p>
|
||||
|
||||
<div class="first_item item">
|
||||
<div class="img_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94414-couverture-100-x-140-cm-bleu.html" title="Couverture 100 x 140 cm - Bleu"><img src="http://www.bebeboutik.com/138425-small/couverture-100-x-140-cm-bleu.jpg" alt="Couverture 100 x 140 cm - Bleu" /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94414-couverture-100-x-140-cm-bleu.html" title="Couverture 100 x 140 cm - Bleu" class="product_link_sellers">Couverture 100 x 140 cm -...</a>
|
||||
<span class="reduction">
|
||||
<span class="price">6,95 €</span>
|
||||
<span>(-82%)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" item">
|
||||
<div class="img_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94415-couverture-100-x-140-cm-rose.html" title="Couverture 100 x 140 cm - Rose"><img src="http://www.bebeboutik.com/138426-small/couverture-100-x-140-cm-rose.jpg" alt="Couverture 100 x 140 cm - Rose" /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94415-couverture-100-x-140-cm-rose.html" title="Couverture 100 x 140 cm - Rose" class="product_link_sellers">Couverture 100 x 140 cm -...</a>
|
||||
<span class="reduction">
|
||||
<span class="price">6,95 €</span>
|
||||
<span>(-82%)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" item">
|
||||
<div class="img_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94435-sac-a-sucettes-toadstool.html" title="Sac à sucettes Toadstool"><img src="http://www.bebeboutik.com/138446-small/sac-a-sucettes-toadstool.jpg" alt="Sac à sucettes Toadstool" /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94435-sac-a-sucettes-toadstool.html" title="Sac à sucettes Toadstool" class="product_link_sellers">Sac à sucettes Toadstool</a>
|
||||
<span class="reduction">
|
||||
<span class="price">4,95 €</span>
|
||||
<span>(-50%)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" item">
|
||||
<div class="img_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94416-couverture-100-x-140-cm-rouge.html" title="Couverture 100 x 140 cm - Rouge"><img src="http://www.bebeboutik.com/138427-small/couverture-100-x-140-cm-rouge.jpg" alt="Couverture 100 x 140 cm - Rouge" /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="http://www.bebeboutik.com/dushi/94416-couverture-100-x-140-cm-rouge.html" title="Couverture 100 x 140 cm - Rouge" class="product_link_sellers">Couverture 100 x 140 cm -...</a>
|
||||
<span class="reduction">
|
||||
<span class="price">6,95 €</span>
|
||||
<span>(-82%)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="last_item item">
|
||||
<div class="img_sellers">
|
||||
<a href="http://www.bebeboutik.com/buitenspeel/94895-lot-de-2-baguettes-pour-bulles-de-savon-xxl.html" title="Lot de 2 baguettes pour bulles de savon XXL "><img src="http://www.bebeboutik.com/139031-small/lot-de-2-baguettes-pour-bulles-de-savon-xxl.jpg" alt="Lot de 2 baguettes pour bulles de savon XXL " /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="http://www.bebeboutik.com/buitenspeel/94895-lot-de-2-baguettes-pour-bulles-de-savon-xxl.html" title="Lot de 2 baguettes pour bulles de savon XXL " class="product_link_sellers">Lot de 2 baguettes pour...</a>
|
||||
<span class="reduction">
|
||||
<span class="price">6,35 €</span>
|
||||
<span>(-36%)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /MODULE Block best sellers -->
|
24
modules/privatesales_similarproducts/de.php
Executable file
24
modules/privatesales_similarproducts/de.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_3cb29f0ccc5fd220a97df89dafe46290'] = 'Sonderangebote';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Mehr';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_4351cfebe4b61d8aa5efa1d020710005'] = 'Anzeigen';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_eae99cd6a931f3553123420b16383812'] = 'Alle Sonderangebote';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'Momentan keine Sonderangebote vorhanden';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_3cb29f0ccc5fd220a97df89dafe46290'] = 'Verkaufshits';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_eae99cd6a931f3553123420b16383812'] = 'Alle Verkaufshits';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f7be84d6809317a6eb0ff3823a936800'] = 'Momentan keine Verkaufshits vorhanden';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_6232eaff79c9ccb6c1a66e5a75a212d5'] = 'Block Bestsellers';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_95d17a0a1b5ea2de13a3565ed400ebbb'] = 'Block mit Bestellers Ihrem Shop hinzufügen';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Bestätigung';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert.';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_530c88f8210e022b39128e3f0409bbcf'] = 'Block immer anzeigen';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktiviert';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deaktiviert';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_a8a670d89a6d2f3fa59942fc591011ef'] = 'Block anzeigen, auch wenn kein Produkt verfügbar ist.';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
|
||||
?>
|
@ -0,0 +1,62 @@
|
||||
<div id="privatesales_similarproduct" class="block products_block">
|
||||
{if $is_accessories}
|
||||
<h1 class="">{l s='Autres produits associés' mod='privatesales_similarproducts'}</h1>
|
||||
{else}
|
||||
<h1 class="">{l s='Les meilleures ventes dans la même catégorie' mod='privatesales_similarproducts'}</h1>
|
||||
{/if}
|
||||
|
||||
{if $best_sellers|@count > 0}
|
||||
<div class="slider_sales_product_footer">
|
||||
<ul class="slides">
|
||||
{foreach from=$best_sellers item=product name=myLoop}
|
||||
<li class='slide-item'>
|
||||
<div class="hover-slide">
|
||||
<a onclick="showExpressCart(event); return false;" class="add-to-cart ajax_add_to_cart_product_footer_button" rel="{$product.id_product}" href="" title="{l s='Add to cart' mod='privatesales_similarproducts'}"></a>
|
||||
<a class="see-product" href="{$product.link}" title="{l s='See this product' mod='privatesales_similarproducts'}"></a>
|
||||
</div>
|
||||
<div class="product_added product_added_{$product.id_product}">
|
||||
<p>{l s='Product added to your cart' mod='privatesales_similarproducts'}</p>
|
||||
</div>
|
||||
<div class="img_sellers">
|
||||
<a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>
|
||||
</div>
|
||||
<div class="info_sellers">
|
||||
<a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}" class="product_link_sellers">{$product.name}</a>
|
||||
<p class="price">{$product.price}</p>
|
||||
<p class="price_info">
|
||||
<span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
|
||||
{if $product.specific_prices.reduction_type =='percentage'}
|
||||
{assign var="reduc_value" value=$product.specific_prices.reduction * 100}
|
||||
<span class="percentage">(-{$reduc_value|intval}%)</span>
|
||||
{elseif $product.specific_prices.reduction_type == 'amount'}
|
||||
<span class="amount">(-{$product.specific_prices.reduction|number_format:2:",":"."}€)</span>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{else}
|
||||
<p>{l s='No best sellers at this time' mod='privatesales_similarproducts'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="/modules/privatesales_similarproducts/assets/css/flexslider.css">
|
||||
<script type="text/javascript" src="/modules/privatesales_similarproducts/assets/js/jquery.flexslider.js"></script>
|
||||
|
||||
<script>
|
||||
{literal}
|
||||
$( document ).ready(function() {
|
||||
$('.slider_sales_product_footer').flexslider({
|
||||
animation: "slide",
|
||||
directionNav: true,
|
||||
itemWidth: (860/3),
|
||||
useCSS : false,
|
||||
pauseOnHover: true,
|
||||
});
|
||||
$('.slider_sales_product_footer .flex-direction-nav .flex-next').text('');
|
||||
$('.slider_sales_product_footer .flex-direction-nav .flex-prev').text('');
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
36
modules/privatesales_similarproducts/img/index.php
Executable file
36
modules/privatesales_similarproducts/img/index.php
Executable file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7233 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
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;
|
BIN
modules/privatesales_similarproducts/img/logo.gif
Executable file
BIN
modules/privatesales_similarproducts/img/logo.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 601 B |
36
modules/privatesales_similarproducts/index.php
Executable file
36
modules/privatesales_similarproducts/index.php
Executable file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7233 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
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;
|
24
modules/privatesales_similarproducts/it.php
Executable file
24
modules/privatesales_similarproducts/it.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_3cb29f0ccc5fd220a97df89dafe46290'] = 'Migliori vendite';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Più';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_4351cfebe4b61d8aa5efa1d020710005'] = 'Visualizza';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_eae99cd6a931f3553123420b16383812'] = 'Tutte le migliori vendite';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'Non ci sono migliori vendite in questo momento';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_3cb29f0ccc5fd220a97df89dafe46290'] = 'Migliori vendite';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_eae99cd6a931f3553123420b16383812'] = 'Tutte le migliori vendite';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f7be84d6809317a6eb0ff3823a936800'] = 'Non ci sono migliori vendite in questo momento';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_6232eaff79c9ccb6c1a66e5a75a212d5'] = 'Blocco migliori vendite';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_95d17a0a1b5ea2de13a3565ed400ebbb'] = 'Aggiungi un blocco che mostra le migliori vendite del negozio';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Conferma';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_530c88f8210e022b39128e3f0409bbcf'] = 'Visualizza sempre blocco';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Attivato';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disattivato';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_a8a670d89a6d2f3fa59942fc591011ef'] = 'Mostra il blocco anche se nessun prodotto è disponibile.';
|
||||
$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
|
||||
|
||||
?>
|
191
modules/privatesales_similarproducts/privatesales_similarproducts.php
Executable file
191
modules/privatesales_similarproducts/privatesales_similarproducts.php
Executable file
@ -0,0 +1,191 @@
|
||||
<?php
|
||||
//if (!defined('_PS_VERSION_'))
|
||||
// exit;
|
||||
|
||||
class Privatesales_similarproducts extends Module
|
||||
{
|
||||
private $_html = '';
|
||||
private $_postErrors = array();
|
||||
private $hooks = array(
|
||||
'similarProduct' => array('Accessories or similar products', 'Called on displaying similar product in product details'),
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'privatesales_similarproducts';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.0';
|
||||
$this->author = 'Antadis';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Produits complémentaires ou similaires');
|
||||
$this->description = $this->l('Ajoute un bloc affichant les produits complémentaires (accessoires) ou les meilleures ventes de la famille d\'un produit.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ModuleCore::install()
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
// Add custom hooks
|
||||
foreach($this->hooks as $k => $v) {
|
||||
if(count(Db::getInstance()->ExecuteS('
|
||||
SELECT `id_hook`
|
||||
FROM `'._DB_PREFIX_.'hook`
|
||||
WHERE `name` = "'.$k.'"
|
||||
LIMIT 1
|
||||
')) == 0) {
|
||||
Db::getInstance()->ExecuteS('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook`
|
||||
VALUES (DEFAULT, "'.$k.'", "'.$v[0].'", "'.$v[1].'", 0, 0)
|
||||
');
|
||||
}
|
||||
}
|
||||
|
||||
if (!parent::install() ||
|
||||
!$this->registerHook('similarProduct')) {
|
||||
$this->uninstall();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
// Remove custom hooks
|
||||
foreach($this->hooks as $k => $v) {
|
||||
Db::getInstance()->Execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'hook`
|
||||
WHERE `name` = "'.$k.'"
|
||||
');
|
||||
}
|
||||
parent::uninstall();
|
||||
}
|
||||
|
||||
public function hookSimilarProduct($params)
|
||||
{
|
||||
if(_PS_MOBILE_) {
|
||||
return false;
|
||||
}
|
||||
$result = $this->displayAccessories($params);
|
||||
if ($result=='') {
|
||||
return $this->displayBestVPSalesSameFamily($params);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
private function displayAccessories($params)
|
||||
{
|
||||
global $smarty;
|
||||
global $cookie;
|
||||
|
||||
$id_lang = $cookie->id_lang;
|
||||
|
||||
$cache_params = [
|
||||
'prefix_cache' => '1_'.$params['product']->id
|
||||
];
|
||||
if (!$this->isTemplateCached($cache_params)) {
|
||||
|
||||
$currency = new Currency((int)($params['cookie']->id_currency));
|
||||
|
||||
// get all accessories of this product
|
||||
$products = array();
|
||||
|
||||
$accessories = $params['product']->getAccessories($id_lang);
|
||||
if($accessories) {
|
||||
foreach ($accessories AS $accessory)
|
||||
{
|
||||
$accessory['price'] = Tools::displayPrice(Product::getPriceStatic((int)($accessory['id_product'])), $currency);
|
||||
$products[] = $accessory;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$products || count($products)==0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$smarty->assign(
|
||||
array(
|
||||
'is_accessories' => ($accessories !== FALSE && count($accessories)>0),
|
||||
'best_sellers' => $products,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $this->flushTemplateCache($cache_params);
|
||||
}
|
||||
|
||||
|
||||
private function displayBestVPSalesSameFamily($params)
|
||||
{
|
||||
global $smarty;
|
||||
global $cookie;
|
||||
|
||||
$id_lang = $cookie->id_lang;
|
||||
$cache_params = [
|
||||
'prefix_cache' => '2_'.$params['sale']->id,
|
||||
];
|
||||
|
||||
if (!$this->isTemplateCached($cache_params)) {
|
||||
$currency = new Currency((int)($params['cookie']->id_currency));
|
||||
|
||||
// get all best sales of the product family
|
||||
if (count($products)==0) {
|
||||
$bestsellers = ProductSale::getBestSalesVpForProductFamily($params['product']->id, (int)($params['cookie']->id_lang), 0, 6, NULL, NULL, 10);
|
||||
|
||||
if($bestsellers) {
|
||||
foreach ($bestsellers AS $bestseller) {
|
||||
$bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency);
|
||||
$products[] = $bestseller;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$products || count($products)==0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$smarty->assign(
|
||||
array(
|
||||
'is_accessories' => ($accessories !== FALSE && count($accessories)>0),
|
||||
'best_sellers' => $products,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $this->flushTemplateCache($cache_params);
|
||||
|
||||
}
|
||||
|
||||
private function isTemplateCached(&$cache_params)
|
||||
{
|
||||
global $smarty;
|
||||
global $cookie;
|
||||
|
||||
Tools::enableCache();
|
||||
$smarty->cache_lifetime = 3600;
|
||||
|
||||
$cache_params['compile_id'] = $cache_params['prefix_cache'].'_'.(int)$cookie->id_lang;
|
||||
$cache_params['cache_id'] = $cache_params['compile_id'].'_front_similarproducts';
|
||||
|
||||
return $this->isCached('front_similarproducts.tpl', $cache_id, $compile_id);
|
||||
}
|
||||
|
||||
private function flushTemplateCache($cache_params)
|
||||
{
|
||||
$display = $this->display(
|
||||
__FILE__,
|
||||
'front_similarproducts.tpl' ,
|
||||
$cache_params['cache_id'],
|
||||
$cache_params['compile_id']
|
||||
);
|
||||
Tools::restoreCacheSettings();
|
||||
$smarty->cache_lifetime = -1;
|
||||
return $display;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,45 @@
|
||||
<?php
|
||||
class ProductSale extends ProductSaleCore
|
||||
{
|
||||
public static function getBestSalesVpForProductFamily($id_product, $id_lang, $pageNumber = 0, $nbProducts = 10, $orderBy=NULL, $orderWay=NULL, $filterPrice=NULL)
|
||||
{
|
||||
return self::getBestSalesForCategories(
|
||||
array(
|
||||
'categories' => self::_getIdCategoryPrivateSalesOfProduct($id_product),
|
||||
'id_lang' => $id_lang,
|
||||
'page_number' => $pageNumber,
|
||||
'nb_products' => $nbProducts,
|
||||
'order_by' => $orderBy,
|
||||
'order_way' => $orderWay,
|
||||
'filter_price' => $filterPrice
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static function getBestSalesVp($id_lang, $pageNumber = 0, $nbProducts = 10, $orderBy=NULL, $orderWay=NULL, $filterPrice=NULL)
|
||||
{
|
||||
$id_category_vp = self::_getIdCategoryPrivateSales();
|
||||
return self::getBestSalesForCategories(
|
||||
array(
|
||||
'categories' => self::_getIdCategoryPrivateSales(),
|
||||
'id_lang' => $id_lang,
|
||||
'page_number' => $pageNumber,
|
||||
'nb_products' => $nbProducts,
|
||||
'order_by' => $orderBy,
|
||||
'order_way' => $orderWay,
|
||||
'filter_price' => $filterPrice
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private static function getBestSalesForCategories($params)
|
||||
{
|
||||
$id_category_vp = $params['categories'];
|
||||
$id_lang = $params['id_lang'];
|
||||
$pageNumber = $params['page_number'];
|
||||
$nbProducts = $params['nb_products'];
|
||||
$orderBy = $params['order_by'];
|
||||
$orderWay = $params['order_way'];
|
||||
$filterPrice = $params['filter_price'];
|
||||
// $id_category_vp = array_unique($id_category_vp);
|
||||
|
||||
if ($pageNumber < 0) $pageNumber = 0;
|
||||
@ -108,4 +144,20 @@ class ProductSale extends ProductSaleCore
|
||||
';
|
||||
return $sales = Db::getInstance()->ExecuteS($query);
|
||||
}
|
||||
|
||||
private static function _getIdCategoryPrivateSalesOfProduct($id_product)
|
||||
{
|
||||
global $site_version_front;
|
||||
$query = '
|
||||
SELECT p.`id_category`
|
||||
FROM `'._DB_PREFIX_.'privatesale` p
|
||||
INNER JOIN `'._DB_PREFIX_.'category_product` cp ON ( cp.`id_category` = p.`id_category` )
|
||||
LEFT JOIN `'._DB_PREFIX_.'privatesale_site_version` v ON v.`id_sale` = p.`id_sale`
|
||||
WHERE p.`date_start` <= NOW()
|
||||
AND p.`date_end` >= NOW()
|
||||
AND cp.`id_product` = '.pSql($id_product).'
|
||||
AND v.`version` = "'.pSql($site_version_front).'"
|
||||
';
|
||||
return $sales = Db::getInstance()->ExecuteS($query);
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ class ProductController extends ProductControllerCore {
|
||||
|
||||
self::$smarty->assign(array(
|
||||
'sale' => $sale,
|
||||
'HOOK_SIMILAR_PRODUCT' => Module::hookExec('similarProduct', array('product' => $this->product, 'sale' => $sale)),
|
||||
'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)),
|
||||
'is_sale_home' => ($sale? $sale->id_category == $id_category: FALSE),
|
||||
'is_thumb_vp' => (file_exists(_PS_ROOT_DIR_.'/img/c/'.$id_category_thumb.'_thumb_vp.jpg')),
|
||||
|
@ -6757,3 +6757,170 @@ table#carrierTable tbody td {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ticket 8048 - Product details - Other similar products / best sales for product family */
|
||||
/* Slider product footer (blockbestsellers)*/
|
||||
#product #privatesales_similarproduct {
|
||||
position: relative;
|
||||
}
|
||||
#product #privatesales_similarproduct h1 {
|
||||
background-size: 100% 100%;
|
||||
color: #4F4E9A;
|
||||
margin-right: 0px;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer {
|
||||
padding: 20px 60px;
|
||||
position: relative;
|
||||
-moz-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
-webkit-box-shadow: 0px 0px 5px 1px #CCC;
|
||||
-ms-box-shadow:: 0px 0px 5px 1px #cccccc;
|
||||
-o-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
box-shadow: 0px 0px 5px 1px #CCC;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-direction-nav {
|
||||
position: inherit;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-control-nav{
|
||||
display: none;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-prev,
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-next {
|
||||
top: -80px;
|
||||
border-radius: 50%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
content: '';
|
||||
background: #fff;
|
||||
color: transparent;
|
||||
opacity: 1;
|
||||
-moz-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
-webkit-box-shadow: 0px 0px 5px 1px #CCC;
|
||||
-ms-box-shadow:: 0px 0px 5px 1px #cccccc;
|
||||
-o-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
box-shadow: 0px 0px 5px 1px #CCC;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-prev{
|
||||
background: url("../img/arrow_blue_left.png") no-repeat center center #fff;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-next{
|
||||
background: url("../img/arrow_blue_right.png") no-repeat center center #fff;
|
||||
}
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-prev:before,
|
||||
#product #privatesales_similarproduct .flex-direction-nav .flex-next:before{
|
||||
display: none;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides {
|
||||
padding: 10px 0;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li{
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
max-height: 134px;
|
||||
|
||||
-moz-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
-webkit-box-shadow: 0px 0px 5px 1px #CCC;
|
||||
-ms-box-shadow:: 0px 0px 5px 1px #cccccc;
|
||||
-o-box-shadow: 0px 0px 5px 1px #cccccc;
|
||||
box-shadow: 0px 0px 5px 1px #CCC;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .hover-slide,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .product_added{
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background-color: rgba(0,0,0,0.7);
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .product_added{
|
||||
z-index: 999;
|
||||
padding: 45px 20px;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .product_added p{
|
||||
color: #fff;
|
||||
font-family: "georgia";
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li:hover div.hover-slide{
|
||||
display: block;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .hover-slide a{
|
||||
display: inline-block;
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .hover-slide a.add-to-cart {
|
||||
background: url("../img/panier2.png") no-repeat center center;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .hover-slide a.see-product {
|
||||
background: url("../img/loupe.png") no-repeat center center;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li:after{
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .img_sellers,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers {
|
||||
text-align: center;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .img_sellers{
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers {
|
||||
width: 60%;
|
||||
padding: 5px 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #E4E4EE;
|
||||
float: right;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .product_link_sellers,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers p.price,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .old_price,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .percentage,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .amount{
|
||||
font-family: "georgia";
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .product_link_sellers{
|
||||
display: block;
|
||||
display: -webkit-box;
|
||||
max-width: 110px;
|
||||
height: 44px;
|
||||
margin: 0 auto;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #4F4E9A;
|
||||
font-weight: 500;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .product_link_sellers:hover{
|
||||
text-decoration: none;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers p.price{
|
||||
border:0;
|
||||
color: #FB69AA;
|
||||
font-size: 16px;
|
||||
padding-top: 18px;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .old_price {
|
||||
color: #B0B0B0;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .percentage,
|
||||
#product #privatesales_similarproduct .slider_sales_product_footer .slides li .info_sellers .amount{
|
||||
color: #4F4E9A;
|
||||
}
|
||||
|
@ -546,38 +546,6 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{if isset($accessories) AND $accessories}
|
||||
<!-- accessories -->
|
||||
<ul id="idTab7" class="bullet">
|
||||
<div class="block products_block accessories_block clearfix">
|
||||
<div class="block_content">
|
||||
<ul>
|
||||
{foreach from=$accessories item=accessory name=accessories_list}
|
||||
{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
|
||||
<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">
|
||||
<h5><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:22:'...':true|escape:'htmlall':'UTF-8'}</a></h5>
|
||||
<div class="product_desc">
|
||||
<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a>
|
||||
<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:70:'...'}</a>
|
||||
</div>
|
||||
<p class="product_accessories_price">
|
||||
{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
|
||||
<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>
|
||||
{if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>
|
||||
{else}
|
||||
<span class="exclusive">{l s='Add to cart'}</span>
|
||||
<span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>
|
||||
{/if}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
{/if}
|
||||
{$HOOK_PRODUCT_TAB_CONTENT}
|
||||
</div>
|
||||
</div>
|
||||
@ -622,6 +590,10 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($HOOK_SIMILAR_PRODUCT)}
|
||||
{$HOOK_SIMILAR_PRODUCT}
|
||||
{/if}
|
||||
|
||||
{$HOOK_PRODUCT_FOOTER}
|
||||
|
||||
<!-- Customizable products -->
|
||||
|
Loading…
Reference in New Issue
Block a user