dodgebill Posted June 19, 2014 Share Posted June 19, 2014 I am trying to adapt the bootstrap theme to one of my stores and I would love to change the shopping cart image in the cart block at the top of the page. Is there a way to simply change this image? I can't find it anywhere. Thanks Bill Link to comment Share on other sites More sharing options...
vekia Posted June 20, 2014 Share Posted June 20, 2014 hello by "bootstrap theme" you mean default template in prestashop 1.6 ? Link to comment Share on other sites More sharing options...
csschopper.com Posted June 20, 2014 Share Posted June 20, 2014 Hi, Write css like this: .shopping_cart > a{background:url("../img/abc.png") left top no-repeat;} Thanks Alok Link to comment Share on other sites More sharing options...
dodgebill Posted June 20, 2014 Author Share Posted June 20, 2014 That doesn't actually work with that theme. I tried that but now I get the stock cart img over the top of the background image. The line that adds the image is this one content: "\f0d7"; or at least it's one of those kinds of lines. I commented out them all and the shopping cart goes away. The problem is that the text then shifts over on top of the background image. I can add more left margin to fix that BUT... is there a way to do it correctly? Plus the word "Cart" is still on there. I want to change that to "bag" Any ideas? Link to comment Share on other sites More sharing options...
csschopper.com Posted June 20, 2014 Share Posted June 20, 2014 try by writing bg image in css .shopping_cart > a:first-child:before {} blockcart.css line 45. Thanks Alok Link to comment Share on other sites More sharing options...
dodgebill Posted June 20, 2014 Author Share Posted June 20, 2014 .shopping_cart > a:first-child:before { content: "\f07a"; That is the line that adds the shopping cart icon BUT your code does not replace it. It just adds a background under it. If I quote out the content line the cart icon goes away and the text shifts over to the left. What I am trying to do is replace the icon with another icon. How do I do that? Link to comment Share on other sites More sharing options...
vekia Posted June 20, 2014 Share Posted June 20, 2014 still no answer about ps version and theme, the most important thing. Link to comment Share on other sites More sharing options...
dodgebill Posted June 20, 2014 Author Share Posted June 20, 2014 Sorry, it's 1.6.0.6 and the theme is bootstrap as I stated earlier. Yes, that is the default theme in 1.6 Link to comment Share on other sites More sharing options...
dioniz Posted June 20, 2014 Share Posted June 20, 2014 (edited) Remove content: "\f07a"; from .shopping_cart > a:first-child:before { Then in .shopping_cart > a:first-child{ change padding from padding: 7px 10px 14px 16px; to lets say padding: 7px 10px 14px 46px; to get space on left, and add background:url("../img/abc.png") 0 0 no-repeat #333; Edited June 20, 2014 by dioniz (see edit history) Link to comment Share on other sites More sharing options...
dodgebill Posted June 20, 2014 Author Share Posted June 20, 2014 That does get the job done. I was just hoping there was a way to add the new icon in place of the old one but in the end it looks the same so that's good enough. Thanks for all the help. Link to comment Share on other sites More sharing options...
ashvinitiwari Posted October 10, 2014 Share Posted October 10, 2014 I also Want to change cart logo ( Top cart block ) . Please help me , How I can change shopping cart logo . I am newly in prestashop plateform . Link to comment Share on other sites More sharing options...
Fred Fournier Posted September 16, 2016 Share Posted September 16, 2016 Hello, I don't know if it would be correct to start another topic, but I think that this conversation is quite related to what I wish to ask. Cart block: is there a way to add parenthesis at the sides of the product increment number, like it happens, for example, with the status "(empty)"? How it could be done? Thanks in advance, Fred Link to comment Share on other sites More sharing options...
Fred Fournier Posted September 26, 2016 Share Posted September 26, 2016 Up. Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2016 Share Posted September 26, 2016 im not sure what feature you expect. when and where you want to display "empty" ? i dont get this part Link to comment Share on other sites More sharing options...
Fred Fournier Posted September 27, 2016 Share Posted September 27, 2016 This is more an aesthetical issue but that it can be confusing as it is right now. In my chart block I changed a little the text quantity in order to make the page reading more straight. So I translated the value "(empty)" with "(0)" and the I deleted the values "product", which occurs when inside the cart there is only 1 product, and the word "products", which occurs when inside the cart there are 2 or more products. Therefore, my cart now displays only the increment values when is gradually filled. My question is: where can I add parenthesis at the sides of the increment values as it was for "(empty)" and now is for "(0)"? Thank you very much for your help! Link to comment Share on other sites More sharing options...
rocky Posted October 2, 2016 Share Posted October 2, 2016 I suggest hardcoding the ( and ) before and after the cart quantity in themes/default-bootstrap/modules/blockcart/blockcart.tpl and then translating (empty) as 0. 1 Link to comment Share on other sites More sharing options...
Fred Fournier Posted October 3, 2016 Share Posted October 3, 2016 Thank you for your reply. I already did the translation part, as wrote in the previous post, and that was the easy part of the work. Unfortunately, I can't find the right line to insert the parentheses in, unless I have to create it. Which is over my capabilities... Thought it would be easier. Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2016 Share Posted October 4, 2016 Now that I think about it, using CSS is probably easier. For example, add the following to themes/default-bootstrap/themes/blockcart/blockcart.css: .ajax_cart_quantity:before { content: '('; } .ajax_cart_quantity:after { content: ')'; } 1 Link to comment Share on other sites More sharing options...
Fred Fournier Posted October 4, 2016 Share Posted October 4, 2016 Thanks a lot for your help, it worked. That was exactly what I was looking for! 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