(lines beginning with '#####' tell you which file you should be in, '@@@' tell you which subroutine) ##### web_store.cgi ##### @@@ Main Body @@@ look for: $page = $form_data{'page'}; add to next line: $page_num = $form_data{'page_num'}; ------------------------------------------------------------------------------------------- @@@ Create_HTML_Page_From_Db @@@ look for: ($status, $total_row_count) = &submit_query(*database_rows); replace with: ($status, $total_row_count) = &submit_query(*database_rows, $form_data{'hits_seen'}); $hits_seen = $form_data{'hits_seen'} + $sc_db_max_rows_returned; ---------------------------------- look for: &product_page_footer($status, $total_rows_returned); replace with: &product_page_footer($status, $total_rows_returned, $hits_seen); ------------------------------------------------------------------------------------------- ##### web_store_db_lib.pl ##### @@@ Submit_Query @@@ look for: local (*database_rows) = @_; replace with: local (*database_rows, $hits_seen) = @_; ----------------------------------- look for: while (($line = ) && ($row_count < $sc_db_max_rows_returned + 1)) replace with: while (($line = ) && ($row_count > -1)) ----------------------------------- look for: if (($not_found == 0) && ($row_count <= $sc_db_max_rows_returned)) replace with: $adjusted_line_number = $sc_db_max_rows_returned + $hits_seen - 1; if (($not_found == 0) && ($row_count <= $adjusted_line_number) && $row_count >= $hits_seen) ---------------------------------------------------------------------------------------------- ##### web_store_html_lib.pl ##### @@@ Product_Page_Header @@@ look for: local($hidden_fields) = &make_hidden_fields; delete above line ------------------------------------------- look for: $hidden_fields delete above line ----------------------------------------------------------------------------------------------- @@@ Product_Page_Footer @@@ look for: local($db_status, $total_rows_returned); replace with: local($db_status, $total_rows_returned, $hits_seen); $page_num = $hits_seen; local($hidden_fields) = &make_hidden_fields; -------------------------------------------- look for: $warn_message = ""; replace with: $warn_message = qq!

1 - $total_rows_returned of $total_rows_returned

!; local($next_amount); $next_amount = $sc_db_max_rows_returned; --------------------------------------------- look for: if ($db_status ne "") { if ($db_status =~ /max.*row.*exceed.*/i) { $warn_message = qq!
Your query returned $total_rows_returned. This is more than the maximum we allow ($sc_db_max_rows_returned). You will need to restrict your query further.

!; } } replace with: if ($hits_seen > 0) { if ($hits_seen > $sc_db_max_rows_returned) { $hits_prev = $hits_seen - $sc_db_max_rows_returned - $sc_db_max_rows_returned; $hits_start = $hits_seen - $sc_db_max_rows_returned + 1; $warn_message = qq!

$hits_start - $total_rows_returned of $total_rows_returned
$hidden_fields
!; } if ($total_rows_returned >= $hits_seen) { $hits_prev = $hits_seen - $sc_db_max_rows_returned - $sc_db_max_rows_returned; $hits_start = $hits_seen - $sc_db_max_rows_returned + 1; if (($total_rows_returned - $hits_seen) < $sc_db_max_rows_returned) { $next_amount = $total_rows_returned - $hits_seen; } $warn_message = qq!
$hits_start - $hits_seen of $total_rows_returned
!; if ($hits_prev > -1) { if ($next_amount == 0) { $warn_message .= qq!
$hidden_fields
!; } else { $warn_message .= qq!
$hidden_fields
!; } # end if ($next_amount == 0) } # end if $hits_prev if ($next_amount != 0) { $warn_message .= qq!
$hidden_fields
!; } # end if ($next_amount != 0) } # end if $total_rows_returned } # end if ($hits_seen > 0) ------------------------------------------- look for: $warn_message move to: after tag if you want the 'x of xx' statement to be shown just above the Next/Prev buttons if you leave it where it is, it will be shown above all of the buttons ------------------------------------------- look for:
add to next line: $hidden_fields -------------------------------------------------------------------------------------------- @@@ Standard_Page_Header @@@ look for: local($hidden_fields) = &make_hidden_fields; and: $hidden_fields delete both above lines --------------------------------------------------------------------------------------------- @@@ Modify_Form_Footer @@@ look for: print qq! add to previous line: local($hidden_fields) = &make_hidden_fields; local($hits_seen) = $page_num - $sc_db_max_rows_returned; -------------------------------------------- look for:

add to next line: $hidden_fields -------------------------------------------- look for: replace with: --------------------------------------------------------------------------------------------- @@@ Delete_Form_Footer and Cart_Footer @@@ repeat the changes shown for @@@ Modify_Form_Footer@@@ note: in @@@ Cart_Footer@@@ there is a blank line where the

tag should be for the second change ---------------------------------------------------------------------------------------------- @@@ Make_Hidden_Fields @@@ look for: add to next line: -----------------------------------------------------------------------------------------------