################################# # web_store_super_cart # By Thomas Steele # email: tsteele@flydepot.com # # Last Modified: 7-24-2000 ################################# This modification to web_store streamlines the users cart interface and provides the main cart functions of web_store.cgi on one simple-to-use screen. It also effects the order form because web_store displays the cart on the order form. In this situation we do NOT want to show editable or deleteable items in the cart, just the items in the cart. Please see the attached graphic to see what the new cart interface looks like (super_cart.gif) I do not show images in my cart, and your cart may look slightly different, but the functionality is the same. This modification includes the following: Delete item Modify item(s) quantity Continue shopping Checkout All on one, easy-to-use screen! In my opinion anything that makes it easier for the user will ultimately help increase sales. First let's modify the web_store_html_lib.pl In the cart_footer Subroutine, change this: $sc_no_frames_button To this: I have links to the main page on the html doc already, so I don't use the following, but your set-up may require it... if it does add after the above if needed. $sc_no_frames_button Now in the cart_table_header Subroutine Replace this: if ($modify_type ne "") { $modify_type = "$modify_type"; } With this: if (($modify_type ne "") && ($modify_type ne "orderform") && ($modify_type ne "process order")) { $modify_type = "$modify_type"; } if ($modify_type eq "") { $modify_type = ""; } if ($modify_type eq "orderform") { $modify_type = ""; } if ($modify_type eq "process order") { $modify_type = ""; } Now, in the display_cart_table Subroutine Replace this: if ($reason_to_display_cart =~ /change*quantity/i) { &cart_table_header("New Quantity"); } elsif ($reason_to_display_cart =~ /delete/i) { &cart_table_header("Delete Item"); } else { &cart_table_header(""); } With this: if ($reason_to_display_cart =~ /process order/i) { $alt_image = "process_order"; $reason_to_display_cart = "process order"; &cart_table_header($reason_to_display_cart, $alt_image); } elsif ($reason_to_display_cart =~ /orderform/i) { $reason_to_display_cart = "orderform"; &cart_table_header($reason_to_display_cart); } else { &cart_table_header("Delete"); } Further down in the routine, you find: elsif ($reason_to_display_cart =~ /delete/i) { print qq! !; } Replace with: elsif (($reason_to_display_cart =~ /orderform/i) || ($reason_to_display_cart =~ /process order/i)) { } else { print qq! Delete !; } Be sure to check your url to the web_store script dir. You will also need to add any special variables that you want to pass to the script because we do not have the option of including hidden input when providing a hard-coded link in the cart, as with the delete link. Now we need to change: print qq!$quantity $price !; To this: if (($reason_to_display_cart =~ /orderform/i) || ($reason_to_display_cart =~ /process.*order/i)){ print qq!$quantity!; } else { print qq!!; } print qq! $price !; That's it! You should now have a working Super Cart.