Juzzyman Posted March 25, 2011 Share Posted March 25, 2011 How do I add a "Continue Shopping" button to the shopping cart? Once an item has been added to the shopping cart you end up on that page with an option to remove but to go back to the catalog is a little bit of process. I would like to add a "Continue Shopping" button that takes you back to the catalog. Thanks for your help! Link to comment Share on other sites More sharing options...
♥14steve14 Posted March 25, 2011 Share Posted March 25, 2011 I though standard oscommerce had a continue shopping button, my site does. Its should be in your shopping_cart.php file and look something like <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <?php //$back = sizeof($navigation->path)-2; //if (isset($navigation->path[$back])) {?> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td><?php //}?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
blr044 Posted March 25, 2011 Share Posted March 25, 2011 How do I add a "Continue Shopping" button to the shopping cart? I would like to add a "Continue Shopping" button that takes you back to the catalog. depends on what version osc you using! Link to comment Share on other sites More sharing options...
Juzzyman Posted March 25, 2011 Author Share Posted March 25, 2011 depends on what version osc you using! Sorry, version 2.3.1 Link to comment Share on other sites More sharing options...
Juzzyman Posted March 27, 2011 Author Share Posted March 27, 2011 For some reason I do not have a continue shopping button. I am using Vers 2.3.1 Link to comment Share on other sites More sharing options...
Juzzyman Posted March 28, 2011 Author Share Posted March 28, 2011 I though standard oscommerce had a continue shopping button, my site does. Its should be in your shopping_cart.php file and look something like <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <?php //$back = sizeof($navigation->path)-2; //if (isset($navigation->path[$back])) {?> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td><?php //}?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> I don't have this on my site! Where would I add the code? Link to comment Share on other sites More sharing options...
wildvettes Posted March 28, 2011 Share Posted March 28, 2011 I don't have this on my site! Where would I add the code? There is no need to touch that code line above, below is much easier. catalog/shopping_cart.php Find: <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> </div> Replace with: <div class="buttonSet" align="right"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link(FILENAME_REDIRECT)); ?> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span> </div> You'll be pleasantly surprised. :D Link to comment Share on other sites More sharing options...
Juzzyman Posted March 28, 2011 Author Share Posted March 28, 2011 There is no need to touch that code line above, below is much easier. catalog/shopping_cart.php Find: <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> </div> Replace with: <div class="buttonSet" align="right"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link(FILENAME_REDIRECT)); ?> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span> </div> You'll be pleasantly surprised. :D wildvettes. YOU ROCK!! Thanks again. Your stuff always just works! Link to comment Share on other sites More sharing options...
wildvettes Posted March 28, 2011 Share Posted March 28, 2011 wildvettes. YOU ROCK!! Thanks again. Your stuff always just works! lol just learning the hard way I guess, at least this stuff is starting to make more sense to me. Also on the code above I didn't factor that you may have a different redirect path at some point. Change FILENAME_REDIRECT to FILENAME_DEFAULT and you'll never have to worry about it, probably should have just coded it that way the first time. :thumbsup: Link to comment Share on other sites More sharing options...
Juzzyman Posted March 28, 2011 Author Share Posted March 28, 2011 lol just learning the hard way I guess, at least this stuff is starting to make more sense to me. Also on the code above I didn't factor that you may have a different redirect path at some point. Change FILENAME_REDIRECT to FILENAME_DEFAULT and you'll never have to worry about it, probably should have just coded it that way the first time. :thumbsup: Made the change. Thanks! Link to comment Share on other sites More sharing options...
wildvettes Posted March 28, 2011 Share Posted March 28, 2011 Made the change. Thanks! Yup Link to comment Share on other sites More sharing options...
rdub Posted October 1, 2011 Share Posted October 1, 2011 This was great, thanks. Now, how do I change the name on the button and the font? Link to comment Share on other sites More sharing options...
MagicalT Posted October 2, 2011 Share Posted October 2, 2011 To change the name on the button /includes/languages/english.php to change the font stylesheet.css Link to comment Share on other sites More sharing options...
Forestshopkeeper Posted October 4, 2011 Share Posted October 4, 2011 I though standard oscommerce had a continue shopping button, my site does. Its should be in your shopping_cart.php file and look something like <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <?php //$back = sizeof($navigation->path)-2; //if (isset($navigation->path[$back])) {?> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td><?php //}?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> I have most of this on my ms2rc2 site except that the tep_href_link(FILENAME_DEFAULT) . '"> says tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '"> When I click on a product and then add to cart and then try to continue shopping, it goes to people who bought this also bought. How do I go back to continue shopping from where I left off? Link to comment Share on other sites More sharing options...
rdub Posted October 15, 2011 Share Posted October 15, 2011 The font and colors on the continue shopping button are different than the other buttons. I don't see this in the stylesheet.css Link to comment Share on other sites More sharing options...
lamocch Posted May 22, 2012 Share Posted May 22, 2012 There is no need to touch that code line above, below is much easier. catalog/shopping_cart.php Find: <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> </div> Replace with: <div class="buttonSet" align="right"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link(FILENAME_REDIRECT)); ?> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span> </div> You'll be pleasantly surprised. Thanks, this works great for me. But to improve this solution can the link send us not to main page but al least the category of that product ($current_category_id?) - or if its possible to the category page cause thats a lot of sites with many pages per category.. Thanks in advance, i'll continue looking for a solution and past hehe... Link to comment Share on other sites More sharing options...
lamocch Posted May 22, 2012 Share Posted May 22, 2012 Like this send you back to product you chose(oscommerce 2.3.1): <div class="buttonSet" align="right"> <?php $urlfrom = $_SERVER['HTTP_REFERER']; ?> <?php echo tep_draw_button('Continuar às compras', 'triangle-1-w', $urlfrom, 'primary'); ?> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span> </div> Continue looking for solution that sends the costumer back to category of the product he choses... ;-) Link to comment Share on other sites More sharing options...
lamocch Posted May 22, 2012 Share Posted May 22, 2012 (can't edit) That solucion sends u back to where u click "Buy", to product info page or product listing etc.. This works for me till i find better.. :-D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.