ricky11 Posted January 23, 2013 Share Posted January 23, 2013 I want to hide the following blocks if the user is not logged in 1)Cart Block 2) User Info Block 3) Add to Cart Block If the user is not logged in, it will hide them altogether, if the user is logged in, it can display them. I think it can use the islogged code, but not sure where to place them. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted January 23, 2013 Share Posted January 23, 2013 the code depends on if you are using 1.5 or earlier version. there is a module that does this for you http://www.etiendas.co/en/etiendas-prestashop-modules/22-prestashop-registered-clients-only-shopping-module.html Link to comment Share on other sites More sharing options...
ricky11 Posted January 23, 2013 Author Share Posted January 23, 2013 Thanks. I have privateshop module already, and i have also tried the module you suggested. But they do not hide the ADDTOCART or the CART itself if the user is not logged in. Using version 1.5 yes. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted January 23, 2013 Share Posted January 23, 2013 Thanks. I have privateshop module already, and i have also tried the module you suggested. But they do not hide the ADDTOCART or the CART itself if the user is not logged in. Using version 1.5 yes. Thanks. the module I suggested I personally wrote. If your shop still displays the add to cart with this module loaded then your theme is not PS compliant. I have helped many customers (free) to make their non-compliant theme compliant. Just contact me through our website or email me from the email you used to purchase and I'd be happy to help. Link to comment Share on other sites More sharing options...
ricky11 Posted January 23, 2013 Author Share Posted January 23, 2013 Oh sorry, i mean to say i have the PRIVATEshop MODULE INSTALLED from presto-chango. I dont think i have tried yours. But since i have already spent money on it, the developer told me it is custom programming required to hide the add to cart button and the cart block if the user is not logged in. To me they should not be displayed anyway since this is a wholesale plugin. So i came to this forum looking for some advice on how to code it myself, I am aware that it would be a simple if statement, but not sure which tpl file i would have to put it into. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted January 23, 2013 Share Posted January 23, 2013 jajajaja...it may seem simple...but before writing my module I counted over 24 different places the 'simple' if statement would need to go...and then you end up with a mess, and when/if you upgrade you end up with even a bigger mess.... best of luck and kind regards Fred Link to comment Share on other sites More sharing options...
ricky11 Posted January 23, 2013 Author Share Posted January 23, 2013 Thanks, i guess that is what the help forums are for. I will find a solution and post it when i have it. Link to comment Share on other sites More sharing options...
El Patron Posted January 23, 2013 Share Posted January 23, 2013 actually for me anyway...that is what google is for see if any of there help as this question has been asked many times https://www.google.com.co/search?q=prestashop+hide+cart+not+logged+in&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#hl=en&client=firefox-a&hs=8GL&tbo=d&rls=org.mozilla:en-US:official&q=+site:prestashop.com+prestashop+hide+cart+not+logged+in&sa=X&ei=e9T_UMLMG6fA2gXR94HYDg&ved=0CDYQrQIwAA&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.41248874,d.b2I&fp=7fce5e40bafaf83b&biw=1366&bih=621 Link to comment Share on other sites More sharing options...
Recommended Posts