Hack to send user to a catalog page when "Continue Shopping" button is clicked instead of back where they came from. If 'continue_shopping_button.x' has any value then we will call a new subroutine entitled &output_catalogpage . 1. Include this 'elsif' as the third statement from the end of the main program body of web_store.cgi: -------------------------------------------------------------------------- elsif ($form_data{'continue_shopping_button.x'}) # ############ { # &output_catalogpage; # insert this exit; # } # ############ elsif (($page ne "" || $form_data{'search_request_button'} ne "" # notice we can now comment out or remove the line that was here: # ||($form_data{'continue_shopping_button.x'}) # comment out this line || $are_any_query_fields_filled_in =~ /yes/i) && ($form_data{'return_to_frontpage_button.x'} eq "")) { &display_products_for_sale; exit; } else { &output_frontpage; exit; } # end of main program body # That's it! etc. ------------------------------------------------------------------------------------------------------------ 2. Now add the sub "Output Catalog Page" right after the "Output Frontpage" subroutine: ---------------------------------------------------------------------------------------------------------- ####################################################################### # Output Catalog Page. # ####################################################################### # output_catalogpage is similar to output_frontpage but is # used to display the catalog page of the # store. It takes no arguments and is accessed with the # following syntax: # # &output_catalogpage; # # The subroutine simply utilizes the display_page # subroutine which is discussed later to output the # catalogpage file, the location of which, is defined # in web_store.setup. display_page takes four arguments: # the cart path, the routine calling it, the current # filename and the current line number. sub output_catalogpage { &display_page("$sc_catalogpage_path", "Output Catalogpage", __FILE__, __LINE__); } ------------------------------------------------------------------------------------------------------------------- 3. Finally, declare the path to your catalog page, whatever you've called it, in web_store.setup.html to keep it consistent with the other output routines: ----------------------------------------------------------------------------------------------------------- $sc_catalogpage_path = "./Html/Products/catalog1.html"; ------------------------------------------------------------