Jump to content

order of tabs


keat

Recommended Posts

I've lots of price changes to make.

Is there any way I can re-order the tabs on a product admin side, so either a product opens on the pricing tab, or make the pricing tab the first tab in the list.

Whilst it may sound minimal, any time saved will add up and save me considerable time.

Link to comment
Share on other sites

You can try this:

Admin skin template products.index.php, near line 99:

Find:

<a href="{$product.link_edit}" title="{$LANG.common.edit}"><i class="fa fa-pencil-square-o" title="{$LANG.common.edit}"></i></a>

Change to:

<a href="{$product.link_edit}#pricing" title="{$LANG.common.edit}"><i class="fa fa-pencil-square-o" title="{$LANG.common.edit}"></i></a>

 

Link to comment
Share on other sites

I figured I can change the order of the tabs in sources\products.index.inc.php

around line 631 // Display product info

 

Whilst this moves the tabs around, the cart still opens on the General tab despite which order they are in.

Link to comment
Share on other sites

The edit changed the link of the table row's Edit icon. The admin can also click the link in the Product Name column, which will also get to the Edit Product screens. But the link here was not changed.

The default content panel that is shown - not the tab control for the respective panel - is the first that appears in the HTML. That panel gets the "tab-selected" CSS class from javascript:

admin.js, near line 571:

        } else {
            $("div.tab_content:not(:first)").hide();
            var t = $("div.tab_content:first").show().attr("id"),
                e = "#" + t;
            $("#tab_" + t).addClass("tab-selected")
        }

 

Link to comment
Share on other sites

In admin, Products, you are shown a table of inventory. In the Product Name column, the product's name is a link to the Edit screens. As well is the actual Edit Product icon in the right-most column. We only changed the edit icon.

Then, I am just mentioning why it seemed that changing the order of the actual tabs did not change the display of which content panel shows as default.

Link to comment
Share on other sites

I didn't understand what the java script reference was for.

Wasn't sure if this was a suggested edit, or just teaching me what controls the tab selection etc.

 

I never use the small icons to the right to edit a product, I always use the 'product name' link on the left, so this will explain why your original edit appeared to have no effect for me.

Looking in Templates/products.index.php I see two references at line 58 and at line 99

<a href="{$product.link_edit}

I added #pricing to both and now it works.

 

This will save me days worth of work.

 

Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...