Jump to content

How to hide blocks if not logged in


Recommended Posts

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

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

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

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

×
×
  • Create New...