// fix product live preview and duplication

This commit is contained in:
tDidierjean
2011-11-23 18:33:11 +00:00
parent 472fbc4628
commit d529b8a9ed
6 changed files with 16 additions and 17 deletions
+3 -3
View File
@@ -432,9 +432,9 @@ if (Tools::getValue('submitPublishProduct'))
if (Tools::getIsset('id_product'))
{
$id_product = (int)(Tools::getValue('id_product'));
$id_tab_catalog = (int)(Tab::getIdFromClassName('AdminCatalog'));
$token = Tools::getAdminToken('AdminCatalog'.(int)($id_tab_catalog).(int)$context->employee->id);
$bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCatalog&id_product='.$id_product.'&updateproduct&token='.$token;
$id_tab_catalog = (int)(Tab::getIdFromClassName('AdminProducts'));
$token = Tools::getAdminToken('AdminProducts'.(int)($id_tab_catalog).(int)$context->employee->id);
$bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminProducts&id_product='.$id_product.'&updateproduct&token='.$token;
if (Tools::getValue('redirect'))
die($bo_product_url);
+1 -1
View File
@@ -268,7 +268,7 @@ $(document).ready(function(){
<div class="warn draft" >
<p>
<span style="float: left">
<img src="../img/admin/warn2.png" />{l s='Your product will be saved as draft'}</span>
{l s='Your product will be saved as draft'}</span>
<span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >{l s='Save and preview'}</a></span>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
<br />
@@ -138,7 +138,7 @@
{l s='Enabled'}</label>
<br class="clear" />
<input style="float:left;" onclick="toggleDraftWarning(true);showOptions(false);" type="radio" name="active" id="active_off" value="0" {if !$product->active}checked="checked"{/if} />
<label for="active_off" class="t"><img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="float:left; padding:0px 5px 0px 5px" />{l s='Disabled'} {if !$product->active} (<a href="{$preview_url}" alt="" target="_blank">{l s='View product in shop'}</a>){/if}</label>
<label for="active_off" class="t"><img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="float:left; padding:0px 5px 0px 5px" />{l s='Disabled'} </label>
</td>
</tr>
{if $feature_shop_active}