Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

hi,

I want to have an continue shopping button in my shoppingcart.

Now I have the following, and it works great :lol: but when you click on it, it goes back to the last article page. <_<

Now I want it to go to the last categorie page.

I hope someone can help me with it.

<div class="buttonSet">
    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?></div>

<?php $urlfrom = $_SERVER['HTTP_REFERER']; ?>
<?php echo tep_draw_button('Continue Shopping', 'triangle-1-w', $urlfrom, 'primary'); ?>

  </div>
Posted

@14steve14

 

Hi Steve,

I actually searched on the Internet, but the only thing I encountered was a back button,

and I need to have an continue button to the last categorie page, so that the visitor can go back further, into the category where he has remained.

Posted

@PiLLaO

I have bootstrap version, but when I use the solution from Burt it goes back to the last article page, and not the categorie page.

  • 2 weeks later...
Posted

@@dinopacha,

 

Here is the version I'm using for going back to the categoy of the last added product:

  <div class="buttonSet row">
  	<?php
    $back = sizeof($navigation->path)-2;
    // BOF FWR Mod category based continue button
    $count = count($products);
    if( isset($products[$count-1]['id']) ) {
      $continueButtonId = tep_get_product_path(str_replace(strstr($products[$count-1]['id'], '{'), '', $products[$count-1]['id']));
    }
    if( isset($continueButtonId) ) {
    	echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT, 'cPath=' . $continueButtonId)) . '</div>'; 
    } elseif (isset($navigation->path[$back])) {
    	// EOF FWR Mod category based continue button
    	echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT)) . '</div>'; 
    }
    echo '<div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success') . '</div>'; ?>
  </div>

regards

Rainer

Posted

@@raiwa

 

Hi Rainer

 

Just an idea how about having the continue button returning to the index page.

 

Cheers

 

Grandpa

Posted

@@grandpaj,

 

He (Dinopacha) specifically asked for a solution to go back to the last visited category.

Posted

@@raiwa

Hi Rainer

 

Sorry, hadn't realized that.

 

What do I need to change so as the "continue "button takes you back to the index page, please

Many thanks

 

Grandpa

Posted

Hello John @@grandpaj,

 

You have this button in the given code. Just strip off all the lines for the category button and leave this line:

    	echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT)) . '</div>'; 

regards

Rainer

Posted

@@grandpaj,

 

For any case the complete snippet:

  <div class="buttonSet row">
    <?php
    echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT)) . '</div>'; 
    echo '<div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success') . '</div>';
    ?>
  </div>
  • 6 months later...
Posted

@@dinopacha,

 

Here is the version I'm using for going back to the categoy of the last added product:

  <div class="buttonSet row">
  	<?php
    $back = sizeof($navigation->path)-2;
    // BOF FWR Mod category based continue button
    $count = count($products);
    if( isset($products[$count-1]['id']) ) {
      $continueButtonId = tep_get_product_path(str_replace(strstr($products[$count-1]['id'], '{'), '', $products[$count-1]['id']));
    }
    if( isset($continueButtonId) ) {
    	echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT, 'cPath=' . $continueButtonId)) . '</div>'; 
    } elseif (isset($navigation->path[$back])) {
    	// EOF FWR Mod category based continue button
    	echo '<div class="col-xs-6">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_DEFAULT)) . '</div>'; 
    }
    echo '<div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success') . '</div>'; ?>
  </div>

regards

Rainer

 

 

Just tried this and it seems to work as I would expect it to. Thanks for the code snippet.

REMEMBER BACKUP, BACKUP AND BACKUP

Archived

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

×
×
  • Create New...