Как сделать так, чтобы корзина выводилась при наведении?

Автор Ivan, 02 декабря 2013, 11:48:22

« назад - далее »

Ivan

У меня, чтобы выдвинулась корзина нужно на нее нажать, а что надо прописать, чтобы она выдвигалась при наведении?


Виктор Демидов

Смотрите пример как это сделано в стандарной теме prestashop.
/modules/blockcart/...

Ivan

Цитата: Виктор Демидов от 02 декабря 2013, 11:53:01
Смотрите пример как это сделано в стандарной теме prestashop.
/modules/blockcart/...

Blockcart.tpl

Это оно?
<p class="title_block">
<a href="{$link->getPageLink("$order_process", true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">{l s='Cart' mod='blockcart'}
{if $ajax_allowed}
<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}>&nbsp;</span>
{/if}</a>
</p>

coder

#3
Файл ajax-cart.js
Функции
// try to expand the cart
expand : function(){

// try to collapse the cart
collapse : function(){

//when document is loaded...
$(document).ready(function(){
// expand/collapse management
$('#block_cart_collapse').click(function(){
ajaxCart.collapse();
});
$('#block_cart_expand').click(function(){
ajaxCart.expand();
});

В шаблоне

<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}>&nbsp;</span>

Ivan