Author Topic: [SOLVED] Extra Tab On Products -- Administrator  (Read 518 times)

tom@rocketcert.com

  • Beginner
  • *
  • Posts: 3
  • A beginner
[SOLVED] Extra Tab On Products -- Administrator
« 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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3487
  • VirtueMart Version: 3.8.9
Re: Extra Tab On Products -- Administrator
« Reply #1 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
Regards
A

Joomla 3.9.27
php 7.4

tom@rocketcert.com

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: [SOLVED] Extra Tab On Products -- Administrator
« Reply #2 on: September 12, 2021, 22:14:44 pm »
Thanks!

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3487
  • VirtueMart Version: 3.8.9
Re: [SOLVED] Extra Tab On Products -- Administrator
« Reply #3 on: September 13, 2021, 10:14:56 am »
You are very welcome  :)
Regards
A

Joomla 3.9.27
php 7.4

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4486
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: [SOLVED] Extra Tab On Products -- Administrator
« Reply #4 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