Smijn1 Posted September 29, 2013 Share Posted September 29, 2013 (edited) Hi, I'm using prestashop 1.5.4.1 and a custom theme from leotheme (leotracy). The cart block displays (empty) when empty, but it doesn't disappear when somethings in the cart. The amount of products in the cart + order total is displayed and (empty) is still being displayed underneath.. so I need (empty) to be only displayed when cart is actually empty, can anyone help me with this? I think this is the piece of code in blockcart.tpl that should be changed: <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='(empty)' mod='blockcart'}</span> please click here to view the live site (it says "(leeg)", which is dutch for empty) thanks! Edited September 29, 2013 by Smijn1 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 this code looks well i suppose that problem is somewhere else, can you share url to your website? i will inspect code and scripts Link to comment Share on other sites More sharing options...
Smijn1 Posted September 29, 2013 Author Share Posted September 29, 2013 Thanks, Vekia. The URL was in my previous post as well: please click here to view the live site (it says "(leeg)", which is dutch for empty) Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 i missed it once again :| but i've got another problem im trying to add products to cart, but i cant. it's related to the quantities probably you've got some products available to order? Link to comment Share on other sites More sharing options...
Smijn1 Posted September 29, 2013 Author Share Posted September 29, 2013 in the category 'Koop je korting!' you can find products that are in stock. Sorry about that. Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 create somewhere in your css styles file .hidden { display:none!important; } and recompile theme (you've got option to minify CSS fies turned ON) Link to comment Share on other sites More sharing options...
Smijn1 Posted September 29, 2013 Author Share Posted September 29, 2013 thanks for your reply. I'm not so sure in which css file I should do this? Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 i also don't know mainly because you've got there CCC option for css files, it mean that all css files are minified to one file. please turn this option off, then I will be able to say you what you exactly have to hange and where Link to comment Share on other sites More sharing options...
Smijn1 Posted September 29, 2013 Author Share Posted September 29, 2013 oh sorry, didn't know that. I have turned it off (is it better to have it turned on or off on a running website?) thanks again Link to comment Share on other sites More sharing options...
PascalVG Posted September 29, 2013 Share Posted September 29, 2013 create somewhere in your css styles file .hidden { display:none!important; } and recompile theme (you've got option to minify CSS fies turned ON) No, unfortunately this also takes away the 'leeg' when it should be there, (when the cart is empty), as the display: block; in .ajax_cart_no_product (in file: /themes/leotrac/css/modules/blockuserinfo/blockuserinfo.css ) is then 'neglected'. What you can try is this: Edit file: /presta/themes/leotrac/css/global.css (line 92) .hidden { display: none; <-- take out text-indent: -9999px; <-- add } This moves the text off the screen when it should be hidden. Check if this has some consequences somewhere else, but I think this does the trick. pascal Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 i don't understand why not to just hide it with display:none; ? .hidden is a class for items which you want to hide, and this class is added to this element with jquery after adding something to cart Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 thanks for your reply. I'm not so sure in which css file I should do this? global.css line 92 you've got: .hidden { display: none; } modify it to dispaly:none!important; 1 Link to comment Share on other sites More sharing options...
Smijn1 Posted September 29, 2013 Author Share Posted September 29, 2013 global.css line 92 you've got: .hidden { display: none; } modify it to dispaly:none!important; Does the trick! also seems it doesn't mess up any other parts of the site so I'm really happy with it, thanks again for your help! Link to comment Share on other sites More sharing options...
vekia Posted September 29, 2013 Share Posted September 29, 2013 thank you for confirmation im convinced that it will work, this is also how the default theme works so no worries 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