I would like to hide some content in product description if the customer is not logged in (this is a Customer/Distributor website).
So I have created a user group for distributors. Basically I only want distributors to see certain content ie. download links when they login.
Is there a bit of code that I could use to let me hide content if not logged in. I only want a specific customer group to see the content/links in this case.
Opencart Templates, Modules, Themes & Custom Development | ShopThemer
I ended purchasing a custom page tabs extension for this but what I really wanted was to be able to wrap a section of content in the product description and wrap it in a div tag with a display:none if not logged in.Xyph3r wrote:There are a lot of extensions in the market. you can assign free downloads to any product..and only logegd customers can download them. Check the extension market
OPENCART MODULE :
Opencart Compare Link Link your compared product to forum/email
Frontend Link From Admin Dashboard Get link to product , category, manufacturer, information from admin backend.
Copy and DIRECTLY Edit Product the easy way.
Custom Product Sort Full control to product sorting options
Already Sold Product Module, shows total product sold
Code: Select all
<?php if ($this->customer->isLogged()) { ?>
Show this only for logged in users.
<?php } ?>
Opencart Options Pro, Reward Points For Review, DISQUS Comment Form,
Dolrich Fortich - Freelance web developer
Thanks dolrichfortich but this does not work inside the html editor for the category/products section on admin side.dolrichfortich wrote:You can just wrap the content with this code.
Code: Select all
<?php if ($this->customer->isLogged()) { ?> Show this only for logged in users. <?php } ?>
You can use the shortcode at information, product description editor etc
Code: Select all
Some text A
[login]Some text B[/login]
Here a module you can assign products and categories as well to selected customergroups:
Module Resellermode
The module will also introduce a new unit: packing unit (available for all products).
Useful for products shipped as package (definition is up to you and your business).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I like this and I downloaded the extension to test but unfortunately it is not compatible with Mijoshopqahar wrote:You can use OpenCart Shortcode to hide content manually until user is logged in.
You can use the shortcode at information, product description editor etc
Code: Select all
Some text A [login]Some text B[/login]

How can I hide certain product from listing on the store? I tried -1 but it's not working.
Thanks.
Users browsing this forum: No registered users and 18 guests