LMadsen Posted March 28, 2021 Share Posted March 28, 2021 (edited) Hello Forum, I have a webshop in Danish and I have recently translated the product texts into English. However there are a few categories that makes no sense to translate, because they contain e-products in Danish that are not translated into English(e-books etc.). Is it possible to hide/disable these categories in English and still have them visible in Danish? (PS version 1.6.1.23) Best regards Lars Edited March 28, 2021 by LMadsen (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted March 28, 2021 Share Posted March 28, 2021 You can add a condition to: ./controllers/front/CategoryController.php function: public function initContent() rg: public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); // prohibited id languages $disable_languages = array('1', '2'); // prohibited id categories $disable_categories = array('4', '5', '6'); // hide specific category for specific language if (!in_array($this->context->language->id, $disable_languages) && !in_array($this->category->id, $disable_categories)){ return; } .. .. .. .. 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