VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: tom@rocketcert.com on September 11, 2021, 22:27:15 pm

Title: [SOLVED] Extra Tab On Products -- Administrator
Post by: tom@rocketcert.com on September 11, 2021, 22:27:15 pm
How can I add an extra tab on the products page (admin side)?  Ideally this tab will load a specific section of Joomla.   This tab will not have anything to do with front end -- it's just a spot that I need to remember to do something extra with the product for our admin reasons.
Title: Re: Extra Tab On Products -- Administrator
Post by: AH on September 12, 2021, 11:06:00 am
You can do this by creating your own override for the:

product_edit.php

look for this area which shows you the tabs the product edit will create

Code: [Select]
<?php // Loading Templates in Tabs
$tabarray = array();
$tabarray['information'] = 'COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_INFO_LBL';
$tabarray['YOURNEWSTUF'] = 'YOURNEWTABNAMETODISPLAY'//added by ME
$tabarray['description'] = 'COM_VIRTUEMART_PRODUCT_FORM_DESCRIPTION';
$tabarray['status'] = 'COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_STATUS_LBL';
$tabarray['dimensions'] = 'COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_DIM_WEIGHT_LBL';
$tabarray['images'] = 'COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_IMAGES_LBL';


Then create your "YOURNEWSTUFF" with whatever it needs to display

product_edit_yournewstuff.php
Title: Re: [SOLVED] Extra Tab On Products -- Administrator
Post by: tom@rocketcert.com on September 12, 2021, 22:14:44 pm
Thanks!
Title: Re: [SOLVED] Extra Tab On Products -- Administrator
Post by: AH on September 13, 2021, 10:14:56 am
You are very welcome  :)
Title: Re: [SOLVED] Extra Tab On Products -- Administrator
Post by: Studio 42 on September 17, 2021, 15:53:22 pm
And do not forget to override in your admin template else you loose all changes on virtuemart update