Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disable Product Preview in Admin


thopunk

Recommended Posts

Posted

How can I disable the "preview" button when adding a new product on the admin side? I just want the button to say "update" or "insert" and not have to go through the stupid preview page. thanks!!!

  • 4 weeks later...
Posted
How can I disable the "preview" button when adding a new product on the admin side? I just want the button to say "update" or "insert" and not have to go through the stupid preview page. thanks!!!

 

I found this works, but it doesn't give you the option of update or preview, just update. Also, I have SPPC installed, so my line numbers may be different from yours... just search for your file for the correct line:

 

admin/categories.php

changed line 716 to change the Preview Button to the Update Button

 

from

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';?></td>

 

to

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';?></td>

 

 

admin/categories.php

changed line 512 to replace the new_product_preview option to the update_product option

 

from

<?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"'); ?>

 

to

<?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=update_product', 'post', 'enctype="multipart/form-data"'); ?>

Archived

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

×
×
  • Create New...