Jump to content

Hide an image placed in the product short description


julian burbano

Recommended Posts

You can do this only by editing your template file, there is few way to do it. I think easy way is edit template by adding class to product description if user is not logged like:

{if $customer.is_logged}logged{else}notlogged{/if}

and in css add:

.notlogged img {display:none}

 

Link to comment
Share on other sites

2 minutes ago, endriu107 said:

You can do this only by editing your template file, there is few way to do it. I think easy way is edit template by adding class to product description if user is not logged like:


{if $customer.is_logged}logged{else}notlogged{/if}

and in css add:


.notlogged img {display:none}

 

Thank you for your reply! im not advanced user but I think you whant me to modify the product.tpl in the short descriiption area right? but exactly how the code should be placed? And when you say CSS do you mean custom css or the theme css? thank you !

Link to comment
Share on other sites

There should be code like:

class="product-description-short typo sm-bottom"

just change it by adding code from my previous post like:

class="product-description-short typo sm-bottom {if $customer.is_logged}logged{else}notlogged{/if}"

and css code add to custom.css after that force theme compilation and clear your cache.

Link to comment
Share on other sites

30 minutes ago, endriu107 said:

There should be code like:


class="product-description-short typo sm-bottom"

just change it by adding code from my previous post like:


class="product-description-short typo sm-bottom {if $customer.is_logged}logged{else}notlogged{/if}"

and css code add to custom.css after that force theme compilation and clear your cache.

Hello! Im not sure if the code should be something like this. Thank you!

Screen Shot 2020-12-15 at 12.36.09 PM.png

Link to comment
Share on other sites

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...