Jump to content
lulzkiller

Hide free product from client view when active

Recommended Posts

Hi

Our clients automatically gets assigned a free DNS product, so they can use our DNS service. Is it possibel to hide this product, so its not visible for anyone in the client area when active ?

Share this post


Link to post
Share on other sites
20 hours ago, lulzkiller said:

Is it possible to hide this product, so its not visible for anyone in the client area when active ?

not from settings - you'd probably have to remove it from the relevant variable & arrays on the pages where it's mentioned. via hooks (or template changes).

3 minutes ago, Remitur said:

Yes: just mark it as "hidden" in products management

to hide it from the cart, but I took the question to be for a client who already has this product.... one of us will be right. 😎

Share this post


Link to post
Share on other sites
On 6/24/2021 at 3:26 PM, brian! said:

not from settings - you'd probably have to remove it from the relevant variable & arrays on the pages where it's mentioned. via hooks (or template changes).

to hide it from the cart, but I took the question to be for a client who already has this product.... one of us will be right. 😎

You are correct - Its a free dns product, all clients have, so its no need for them to see it it can't do anything anyways. So i guess i have to hide it via templating ?

Share this post


Link to post
Share on other sites
22 hours ago, lulzkiller said:

You are correct - Its a free dns product, all clients have, so its no need for them to see it it can't do anything anyways. So i guess i have to hide it via templating ?

Can be done via the ClientAreaPageCart hook, checking the $vars['products'] array against the client's active products and then unsetting products found and returning $vars or just $vars['products'] to do an override .  No template editing is needed and doing so would add logic that should not be in templates.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated