Jump to content

Open Ajax Drop Down cart preview


Recommended Posts

Hi experts,

 

I have on the top my cart preview, when I clicked appear the details of my cart with that code:

<div id="_desktop_cart" class="dropdown js-dropdown">
  <div class="blockcart cart-preview {if $cart.products_count > 0}active{else}inactive{/if}" data-refresh-url="{$refresh_url}" >
    <div class="header" data-toggle="dropdown">
        <i class="material-icons shopping-cart">shopping_basket</i>
		<div class="cart-detailes">
	{if $cart.products_count > 0}
        <span class="cart-products-count">{$cart.products_count}</span>
		<span class="count-items"> </span>
		<span class="value">{$cart.totals.total.value}</span>
	{/if}
		</div>
    </div>
  {if $cart.products_count > 0}
            <div class="cart-drop-contents dropdown-menu">
                <ul>
                    {foreach from=$cart.products item=product}
                        <li class="cart-wishlist-item">
                            {include 'module:ps_shoppingcart/ps_shoppingcart-product-line.tpl' product=$product}
                        </li>
                    {/foreach}
                </ul>
                <div class="cart-summary">
                    <div class="cart-subtotals">
                        {foreach from=$cart.subtotals item="subtotal"}
                            <div class="{$subtotal.type} box-content">
                                <span class="label">{$subtotal.label}</span>
                                <span class="value">{$subtotal.value}</span>
                            </div>
                        {/foreach}
                    </div>
                    <div class="cart-total box-content">
                        <span class="label">{$cart.totals.total.label}</span>
                        <span class="value">{$cart.totals.total.value}</span>
                    </div>
                </div>
                <div class="cart-wishlist-action">
                    <a class="btn btn-primary" href="{$cart_url}">{l s='View cart' d='Shop.Theme.Checkout'}</a>
                </div>
            </div> 
        {else}
           <div class="cart-drop-contents dropdown-menu">
                <span class="no-item">{l s='There is no item in your cart' d='Shop.Theme.Checkout'}</span>
            </div>
  {/if}
    </div>
</div>

 

My problem is, how can open it when I add some item into the cart?

 

Thanks in avdance,

Regards,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...