dinopacha Posted March 1, 2016 Posted March 1, 2016 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>
♥14steve14 Posted March 1, 2016 Posted March 1, 2016 There was a topic about this not so long ago as far as I can remember. Have you tried searching these forums using google. Try searching for continue shopping button. http://lmgtfy.com/?q=oscommerce+continue+shopping+button There may be something there to help you. REMEMBER BACKUP, BACKUP AND BACKUP
dinopacha Posted March 1, 2016 Author Posted March 1, 2016 @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.
dinopacha Posted March 1, 2016 Author Posted March 1, 2016 I think I got it. thanks to a topic of @kymation http://www.oscommerce.com/forums/topic/392491-back-button-in-the-product-info-in-233-to-return-to-category-root/
PiLLaO Posted March 1, 2016 Posted March 1, 2016 In this topic burt put the solution: Add continue shopping button into shopping_cart page But you must to upgrade to boostrap version ;)
dinopacha Posted March 2, 2016 Author Posted March 2, 2016 @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.
♥raiwa Posted March 10, 2016 Posted March 10, 2016 @@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 About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
Guest Posted March 10, 2016 Posted March 10, 2016 @@raiwa Hi Rainer Just an idea how about having the continue button returning to the index page. Cheers Grandpa
♥raiwa Posted March 10, 2016 Posted March 10, 2016 @@grandpaj, He (Dinopacha) specifically asked for a solution to go back to the last visited category. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
dinopacha Posted March 10, 2016 Author Posted March 10, 2016 @@raiwa Thank you Rainer, tommorow I will put it in. I am curiuos if it really goes to the last product categorie.
Guest Posted March 10, 2016 Posted March 10, 2016 @@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
♥raiwa Posted March 11, 2016 Posted March 11, 2016 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 About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
♥raiwa Posted March 11, 2016 Posted March 11, 2016 @@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> About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
♥14steve14 Posted October 10, 2016 Posted October 10, 2016 @@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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.