На самом деле такой карусели нет)
Пока нет. Проще всего ее сделать через bootstrap однако Вас ждет пара сюрпризов, а именно:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
<div id="new-products_block_center" class="block products_block bs-example"> <h4>{l s='Новые товары' mod='blocknewproducts'}</h4> <div data-ride="carousel" class="carousel slide row" id="carousel-example-captions"> <ol class="carousel-indicators"> <li class="" data-slide-to="0" data-target="#carousel-example-captions"></li> <li data-slide-to="1" data-target="#carousel-example-captions" class=""></li> <li data-slide-to="2" data-target="#carousel-example-captions" class="active"></li> </ol> <div class="carousel-inner"> <div class="item"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 3} <div class="col-lg-4 col-md-4 col-xs-4 ajax_block_product"> <div class="cont"> <h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}">{$product.name}</a> </h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /> </a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> {else}<div style="height:21px;"></div> {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='blocknewproducts'}">{l s='View' mod='blocknewproducts'}</a> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='blocknewproducts'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='blocknewproducts'}</span> {/if} {/if} </div> </div> {/if} {/foreach} </div> <div class="item"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 3} <div class="col-lg-4 col-md-4 col-xs-4 ajax_block_product"> <div class="cont"> <h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}">{$product.name}</a> </h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /> </a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> {else}<div style="height:21px;"></div> {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='blocknewproducts'}">{l s='View' mod='blocknewproducts'}</a> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='blocknewproducts'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='blocknewproducts'}</span> {/if} {/if} </div> </div> {/if} {/foreach} </div> <div class="item active"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 3} <div class="col-lg-4 col-md-4 col-xs-4 ajax_block_product"> <div class="cont"> <h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}">{$product.name}</a> </h5> <a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /> </a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> {else}<div style="height:21px;"></div> {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='blocknewproducts'}">{l s='View' mod='blocknewproducts'}</a> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='blocknewproducts'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='blocknewproducts'}</span> {/if} {/if} </div> </div> {/if} {/foreach} </div> </div> <a data-slide="prev" href="#carousel-example-captions" class="left carousel-control"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a data-slide="next" href="#carousel-example-captions" class="right carousel-control"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div> </div> <script type="text/javascript"> {literal} $('.carousel').carousel({ interval: 5000 }); {/literal} </script> |
Пришлось даже спалить свой код.
Проблема в том, что нужно вызвать по 3 элемента в цикле. Однако в одном из шаблонов 1.5 или нескольких это точно реализовано, бьемся об лед дальше)
Пример на главной, блок новинки: http://prestapro.ru/
Знаете решение?
Прошу в обсуждения)
Коментарии0 новых