Jump to content

hookDisplayAdminProductsExtra not showing Save Button


Recommended Posts

Hello ive a Problem i have used the hook hookDisplayAdminProductsExtra.

And my code is this:

 

public function hookDisplayAdminProductsExtra($params)
{
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
{
$this->prepareNewTab();
return $this->display(__FILE__, 'portalbruecke.tpl');
}
}
 
and this is my tplfile:
 
<h4>{l s='any desc' mod='portalbruecke'}</h4>
<div class="separation"></div>
<table>
    <tr>
        <td class="col-left">
            <label>{l s='Our New Field:'}</label>
        </td>
        <td>
            {include file="controllers/products/input_text_lang.tpl"
                languages=$languages
                input_name='custom_field'
                input_value=$custom_field}
            <p class="preference_description">{l s='Simply a new custom field'}. <strong>{l s='ie: something here as a hint'}</strong></p>
        </td>
    </tr>
</table>
 
 
But it doesnt show me a save button a cancel button or a white background only the control is shown. 
What is wrong?

 

Link to comment
Share on other sites

You should build your tab tpl as the standard ones (e.g. /adminXXX/themes/default/template/controllers/products/informations.tpl):

<div id="xxx" class="panel product-tab">
    <!-- your specific content -->
    <div class="panel-footer">
        <a href="{$link->getAdminLink('YourController')|escape:'html':'UTF-8'}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel' mod='yourmodule'}</a>
        <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save' mod='yourmodule'}</button>
        <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay' mod='yourmodule'}</button>
    </div>
</div>
Edited by erouvier29 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...