Jump to content

[Solved] Take out the tabs for adding a product


Recommended Posts

Wondering if theirs a way to take out the tabs
3. Combinations
4. Features
5. Customization

When you are adding a new product.


EDIT: Figured it out

Find admin/tabs/ AdminProducts.PHP

Find /* Tabs */

Then heres my before and after code.

Before

/* Tabs */
       $this->displayFormInformations($obj, $currency, $languages, $defaultLanguage);
       $this->displayFormImages($obj, $languages, $defaultLanguage, $token);
       if ($obj->id)
           echo '
3. '.$this->l('Combinations').'
4. '.$this->l('Features').'
5. '.$this->l('Customization').'
6. '.$this->l('Discounts').'';
       echo '
           [removed]
               var toload = new Array();
               toload[3] = true;
               toload[4] = true;
               toload[5] = true;
               toload[6] = true;
               function loadTab(id)
               {';
       if ($obj->id)
           echo '
                   if (toload[id])
                   {
                       toload[id] = false;
                       $.get("'.dirname($currentIndex).'/ajax.php",{ajaxProductTab:id,id_product:'.$obj->id.',token:\''.Tools::getValue('token').'\'},
                           function(rep) {
                               getE("step" + id)[removed] = rep;
                               if (id == 3) populate_attrs();
                           }
                       )
                   }';
       echo '
               }
           [removed]
';



After

                /* Tabs */
       $this->displayFormInformations($obj, $currency, $languages, $defaultLanguage);
       $this->displayFormImages($obj, $languages, $defaultLanguage, $token);
       if ($obj->id)
           echo '
3. '.$this->l('Discounts').'';
       echo '
           [removed]
               var toload = new Array();
               toload[3a] = true;
               function loadTab(id)
               {';
       if ($obj->id)
           echo '
                   if (toload[id])
                   {
                       toload[id] = false;
                       $.get("'.dirname($currentIndex).'/ajax.php",{ajaxProductTab:id,id_product:'.$obj->id.',token:\''.Tools::getValue('token').'\'},
                           function(rep) {
                               getE("step" + id)[removed] = rep;
                               if (id == 3) populate_attrs();
                           }
                       )
                   }';
       echo '
               }
           [removed]
';

Link to comment
Share on other sites

×
×
  • Create New...