Jump to content
thirty bees forum
  • 0

How to have My Account Block and My Account Block Footer to only show up when you are logged in the website?


Question

Posted

Hello people

I noticed that "My Account Block" and "My Account Block Footer" is always showing up on the website even if a customer is not logged in the store.

(In Prestashop, it would only appear once you are logged in the website)

Is there a way to have those two modules only show up on the website when a customer is logged in?

(This should be considered as a bug and need to be looked at...)

I am on Thirtybees 1.5.0 Bleeding Edge and on PHP 8.1

Thanks!

Dan

4 answers to this question

Recommended Posts

  • 0
Posted

Hi!

You can just open those tpl files [for example blockmyaccount.tpl (modules/blockmyaccount)] and update code with this
 

{if $is_logged}  CODE  {else}  CODE {/if}  
And if You want to use group
{if (int)Group::getCurrent()->id == 1} CODE	{/if}
  • 0
Posted
7 minutes ago, MichaelEZ said:

Hi!

You can just open those tpl files [for example blockmyaccount.tpl (modules/blockmyaccount)] and update code with this
 

{if $is_logged}  CODE  {else}  CODE {/if}  
And if You want to use group
{if (int)Group::getCurrent()->id == 1} CODE	{/if}

Hi, thank you for your input.

However, I think that Thirtybees developers should make these changes, as changing core files will cause problems every time you do a "Core Updater" in the Backoffice of your store.

Cheers

  • 0
Posted

You can enable / disable modules per customer groups. You can have this disabled for visitors / guests, and enabled for customer or any other group you have.

  • Thanks 1
  • 0
Posted
35 minutes ago, datakick said:

You can enable / disable modules per customer groups. You can have this disabled for visitors / guests, and enabled for customer or any other group you have.

Hmmm! never thought of doing this as this must have been done automatically with Prestashop...

Simple when you know where to look.

Cheers

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...