Jump to content

next & previous order button need changed to image


virtualadz

Recommended Posts

below you will see the full php code to display next and previous order buttons in PHP, i doubt you will understand this. i hope you do. what i want is to replace text Next order and previous order with two images, at the bottom you will see a comment saying "BEGIN NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN" i think there you need to define images instead of text. below here you see this code "PREV_ORDER" no need to change this it can be made images alt text. is ther anyone who can help me. please do reply even if you need explanation/***************** NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN ************************************/Easy steps to install:1.- Add this lines to /catalog/admin/includes/languages/english.php before the last ?> tag //BEGIN NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN define('PREV_ORDER', '<b><<Previous Order</b>'); define('NEXT_ORDER', '<b>Next Order>></b>'); //END NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN2. Add this lines to /catalog/admin/includes/functions/general.php before the last ?> tag//BEGIN NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN function get_order_id($orderid,$mode='next'){ if ($mode=='prev') $op = '<'; elseif ($mode=='next') $op = '>'; if($op == '<' or $op == '>') $nextprev_resource = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id $op '" . (int)$orderid . "' order by orders_id"); if($mode == 'prev'){ while($nextprev_values = tep_db_fetch_array($nextprev_resource)){ $nextprev_value = $nextprev_values; } }else if($mode == 'next') $nextprev_value = tep_db_fetch_array($nextprev_resource); if(!empty($nextprev_value[orders_id])) return $nextprev_value[orders_id]; else return false; }//END NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN3. Open /catalog/admin/orders.phpAdd this lines:<!-- BEGIN NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN //--> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php if( $nextid = get_order_id($oID,'prev')) { echo '<a href="' .tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $nextid . '&action=edit') . '">' . PREV_ORDER . '</a>'; } ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td class="pageHeading" align="right"><?php if( $previd = get_order_id($oID)) echo '<a href="' .tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $previd . '&action=edit') . '">' . NEXT_ORDER . '</a>'; ?></td> </tr> </table></td> </tr><!-- END NEXT AND PREVIOUS ORDERS DISPLAY IN ADMIN //-->Just after:<?php if (($action == 'edit') && ($order_exists == true)) { $order = new order($oID);?>4- Open your web browser and go to the admin section for select one order then edit you can see next_order and previous_order links top right and left(if more than one orders in admin).that's it :)

Link to comment
Share on other sites

I don't really understand what the problem is. If you only want to change the links' texts with images, then replace the lines:define('PREV_ORDER', '<b><<Previous Order</b>');define('NEXT_ORDER', '<b>Next Order>></b>');with:define('PREV_ORDER', '<img src="imageyouwantforprevious.gif">');define('NEXT_ORDER', '<img src="imageyouwantfornext.gif">');

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...