News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

custom fields in category manager.

Started by chetanmadaan, August 24, 2012, 23:37:57 PM

Previous topic - Next topic

chetanmadaan

Hi -

i sucessfully created two custom fields in the category manager by editing the file.

/administrator/components/com_virtuemart/views/category/tmpl/edit_categoryform.php and adding the code
<?php echo VmHTML::row('editor','Tab 1 Description','tab1description',$this->category->tab1description); ?>

This brought up a nice html... i also added a column in table #__virtuemart_categories named tab1description.

all of this is working fine... the data is being saved and everything if working great... only one problem... when virtuemart saves the data to db... it strips the html code off!
i checked by saving directly to phpmyadmin and it worked... and when i added into VM. it strips all html off.

i checked the category.php in tables and it uses the function bindChecknStore to store the data... does it have something to do with this?

Thanks

gabrielcatalin

Hi there,

I'm trying to do the same thing as you did, with less luck though...:)

I copied the code you provided and created the field in DB.

The new field is rendered but I cannot save any data in it. What's strange is that if I use phpMyAdmin to input data in the field, I can see it then in the backend (so this means the field name and location are right). I'm assuming that you did something more than just writing this single line of code...?!

You mentioned that the tags were striped when data was saved. Could this be part of the problem?

I'm using VM 2.0.8e.

Thanks


chetanmadaan

Well... you have to add it to the category.php in the tables folder for it to work properly.