Jump to content



Latest News: (loading..)

- - - - -

tep_image_button - jquery issue


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#-19   surrfman

surrfman
  • Members
  • 354 posts

Posted 22 March 2012 - 02:18 PM

Have a problem with this chunk of code.

When set-up like this I get the correct return to previous page, but uses the non-jquery drawn button; .gif button doesn't match the jquery drawn button:

<td class="main"><?php echo '<a onclick=history.go(-1)>' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?>
   </td>



When I change the line shwon below to draw a button, for what ever I am not understanding, clicking the "back" button always goes back to the shopping cart page; doesn't matter if I put the tep_draw_button before or after the <a> link stuff:

<td class="main"><?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w') . '<a onclick=history.go(-1)></a>'; ?>
   </td>

Is there a way to fix this? I've tried about 50 different lines, all get the same response; change to draw a button from using the stock .gif image only weants to go back to the shopping cart page, not the previous viewed page.

    PLEASE HELP????

    Timmy C

#-18   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,073 posts

Posted 23 March 2012 - 09:37 AM

This may be no help to you at all, but i added a continue shopping button to the checkout page.  When clicked this button takes the customer back to the page they were on.

The code is

<div class="buttonSet">
    <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span>
    <?php    $back = sizeof($navigation->path)-2;    if (isset($navigation->path[$back])) {
  echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']));    }    ?>
  </div>

I hope this help you sort your problem
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#-17   surrfman

surrfman
  • Members
  • 354 posts

Posted 26 March 2012 - 03:44 PM

Steve... Thanks a bunch, gonna try yer code,  see what happens!   Ran across some reading on a different forum, seems the product info page is a form page. somehow it is set up to always go back to the shopping cart page, or at least that is how I understood it; have to investigate that angle a bit deeper.

I'll let ya know,

Timmy C

#-16   surrfman

surrfman
  • Members
  • 354 posts

Posted 28 March 2012 - 01:57 AM

Steve... your code suggestion worked perfectly!!!  I changed the continue shopping to back.. reads exactly what i was hoping for!!!!

Thanks a bunch,

   Timmy C