0

I want to add a new field in virtuemart new product form, how can i do that ?

I add:

var $is_act = 1; in "components\com_virtuemart\tables\products.php"

And

<?php echo  VmHTML::checkbox('is_act', $this->product->is_act); ?>

And in database but what is appear is a checkbox without a string behind it, what is the wrong ?!

Jobin
  • 8,238
  • 1
  • 33
  • 52
ahmad soliman
  • 141
  • 1
  • 2
  • 14

1 Answers1

1

The VMHTL::checkbox function just create a check box without strings.

If you want to add string behind it you have to do something like this.

<?php echo JText::_('COM_VIRTUEMART_PRODUCT_IS_ACT') ?>

<?php echo  VmHTML::checkbox('is_act', $this->product->is_act); ?>

And then COM_VIRTUEMART_PRODUCT_IS_ACT should be added inside language file too.

for more clearness just check VM default product_edit_information.php page inside

administrator/components/com_virtuemart/views/product/tmpl/

Hope its helps..

Jobin
  • 8,238
  • 1
  • 33
  • 52