Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Auto Parent Categories for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • cassete
  • cassete's Avatar Topic Author
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

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.

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

  • cassete
  • cassete's Avatar Topic Author
THANK YOU Boss!!!

It works what you say. Perfect enormous!

Have a nice week.

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

  • cassete
  • cassete's Avatar Topic Author
Problem solved.
  • Page:
  • 1