New field in category - virtuemart administration

Started by Vratislav Dlabaja, April 10, 2015, 13:05:03 PM

Previous topic - Next topic

Vratislav Dlabaja

Hi i created a virtuemart category field:

frontent read this data from DB correcty

But how I must config administrator?

Quote1.
#_virtuemart_categories_en_gb
I created column category_description_2 in MYSQL


Quote2.
In: /administrator/components/com_virtuemart/views/category/tmpl/edit_categoryform.php
I add this: <?php echo VmHTML::row('editor','COM_VIRTUEMART_DESCRIPTION_2','category_description_2',$this->category->category_description_2); ?>

But where I must go if i need select this data from DB and put it to this field in admin?
Which files? Thank you for answer.

Vratislav Dlabaja

#1
I have it ;-) If somebody need this solution there is:

You must go to: /administrator/components/com_virtuemart/tables/categories.php
in: class TableCategories extends VmTable {

add this line somewhere
var $category_description_2      = '';

AND:

$this->setTranslatable(array('category_name','category_description','metadesc','metakey','customtitle'));
replace:
$this->setTranslatable(array('category_name','category_description','metadesc','metakey','customtitle','category_description_2'));

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/