Andrejkov Posted March 21, 2023 Share Posted March 21, 2023 Hello, I need to add some modifications to my theme and i need to use "IF CODE", something like this: {if CUSTOMER GROUP ID == '1'} DO SOMETHING {else} CODE {/if} But I don't know what variable returns Customer group id. Does anyone know what variable to refer to in this condition? Regards. Link to comment Share on other sites More sharing options...
ps8modules Posted March 21, 2023 Share Posted March 21, 2023 Hi, {if $customer.is_logged} {if Customer::getDefaultGroupId((int)$customer.id) == '1'} customer group = 1 {elseif Customer::getDefaultGroupId((int)$customer.id) == '2'} customer group = 2 {else} customer in another group: {Customer::getDefaultGroupId((int)$customer.id)} {/if} {else} guest ID: {Context::getContext()->cookie->id_guest} {/if} 1 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