VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Remove categories from product description.

Remove categories from product description. 16 Apr 2013 13:13 #1

First of all, thank you very much for your plugin. it's just amazing!

On the other hand, I have a question regarding why when you click in one item from the parent category then the whole sub categories appear in the item description.

See it in your demo page:

If you go to virtuemart 2> Downloads>Product with a free and paid download. You will see at the description box that there is the subcategory "Demo" (and if you have more than one subcategory they will appear there as well)

Is there any chance to hide this subcategories of appearing in the item description place?

THANK YOU FOR YOUR JOB
The administrator has disabled public write access.

Remove categories from product description. 16 Apr 2013 19:17 #2

That's a VirtueMart setting. By default, all subcategories will be displayed both in the category's overview page, as well as in all product pages.
In the Virtuemart configuration ("Configuration" -> Tab "Templates") there is a setting "Show Children Category" to hide child categories, but unfortunately this hides the subcategories not only from the product pages (where I agree they don't belong), but also from the category pages, where you proably want to see the child categories...

The only way I see is to use a template override to modify the product page so that it no longer displays these links:
  1. Copy the file components/com_virtuemart/views/productdetails/tmpl/default.php to the directory templates/[YOURTEMPLATENAME]/html/com_virtuemart/productdetails/ (if it doesn't exist there yet).
  2. Open that file in the templates subdirectory with a text editor and search for "loadTemplate('showcategory')" (somewhere around lines 303-305 of the default.php file)
  3. Comment out or remove the three lines:
    if (VmConfig::get('showCategory', 1)) {
	echo $this->loadTemplate('showcategory');
    }


Now the child categories will no longer be shown on the product pages, but they will be shown on the category pages.
The administrator has disabled public write access.

Remove categories from product description. 22 Apr 2013 11:39 #3

THANK YOU Boss!!!

It works what you say. Perfect enormous!

Have a nice week.
The administrator has disabled public write access.

[SOLVED] Remove categories from product description. 22 Apr 2013 11:39 #4

Problem solved.
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular