iheartwine Posted August 16, 2010 Share Posted August 16, 2010 i wanted to use only collapsed version - just a summary that says how many products + total price are in the basket. unfortunately when i click ADD TO CART, the little cart icon flies to the module but instead of e.g.1 product - 5$it gives only:productWhen i reload the page, everything goes fine. What could be the reason? Link to comment Share on other sites More sharing options...
iheartwine Posted August 24, 2010 Author Share Posted August 24, 2010 anybody? Link to comment Share on other sites More sharing options...
iheartwine Posted September 1, 2010 Author Share Posted September 1, 2010 please, could anyone help me with it? Link to comment Share on other sites More sharing options...
razaro Posted September 3, 2010 Share Posted September 3, 2010 All changes are in ajax-cart.js, have you looked in this topic Link to comment Share on other sites More sharing options...
allienato Posted March 9, 2011 Share Posted March 9, 2011 if you still have this problem maybe I could help you.in my case, I have this structure for my mini-cart collapsed, which I moved at the top of page:1 PRODUCT - TOT: 10 €in my modules/blockcart/blockart.tpl, at cart_block_summary div I have this: <!-- block summary --> {if $cart_qties > 0}{$cart_qties}{/if} {if $cart_qties == 0}{$cart_qties}{/if} {l s='products' mod='blockcart'} {l s='product' mod='blockcart'} {l s='- TOT:' mod='blockcart'} {if $cart_qties > 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false)}{else}{convertPrice price=$cart->getOrderTotal(true)}{/if}{/if} {if $cart_qties == 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false)}{else}{convertPrice price=$cart->getOrderTotal(true)}{/if}{/if} {if $cart_qties == 0}{if $cart_qties == 0}{l s='No Products' mod='blockcart'}{/if}{/if} {if $cart_qties > 0}{if $cart_qties > 0}{l s='No Products' mod='blockcart'}{/if}{/if} so I've added: {if $cart_qties == 0}{$cart_qties}{/if} {l s='- TOT:' mod='blockcart'} {if $cart_qties == 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false)}{else}{convertPrice price=$cart->getOrderTotal(true)}{/if}{/if} {if $cart_qties > 0}{if $cart_qties > 0}{l s='No Products' mod='blockcart'}{/if}{/if} (of course I have also some css defined to style #cart_block)then you need to modify modules/blockcart/ajax-cart.js to display - TOT: (or whatever) string correctlysearch for updateCartEverywhere function: //update general cart informations everywere in the page updateCartEverywhere : function(jsonData) { $('.ajax_cart_total').text(jsonData.productTotal); $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); $('.ajax_block_cart_total').text(jsonData.total); if(jsonData.nbTotalProducts > 0) { $('.ajax_cart_no_product:visible').hide(); $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); $('.ajax_cart_quantity:hidden').fadeIn('slow'); $('.ajax_cart_total:hidden').fadeIn('slow'); /*add*/ $('.ajax_cart_total_txt:hidden').fadeIn('slow'); if(jsonData.nbTotalProducts > 1) { $('.ajax_cart_product_txt:visible').hide(); $('.ajax_cart_product_txt_s:hidden').show(); } else { $('.ajax_cart_product_txt:hidden').fadeIn('slow'); $('.ajax_cart_product_txt_s:visible').fadeOut('slow'); } } else { /* added , .ajax_cart_total_txt:visible in the next jquery selector, before fadeOut */ $('.ajax_cart_quantity:visible, .ajax_cart_product_txt_s:visible, .ajax_cart_product_txt:visible, .ajax_cart_total:visible, .ajax_cart_total_txt:visible').fadeOut('slow', function(){ $('.ajax_cart_no_product:hidden').fadeIn('slow'); }); } } hope it helps Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now