mibcons
Newbie - One Blade
Joined: 29 Apr 2004
Posts: 11
|
Dan,
I do appreciate your help and do not want to held by the hand. Just set me on the road and let me putter around. I got to the page and found interestingly that all screens are on the one page.
I located the search button (deleted one of my clients products in the mean time...hope she's not too mad!) and was able to move the search box from the borrom to the top.
From there I copied the routine fromt he edit screen into the delete screen. made some mods here and there and each time the result was that the search box did not show up. My thoughts somewhere there must be an if condition that is followed before it reaches the search routine.
I will copy the hacked delete screen below, could you (or anybody else) give me some pointers where I went right and where I went wrong?
###############################################
sub delete_product_screen
{
local ($message,$my_script, $my_body_tag);
local ($message,@categories,$cat_str,$inx);
# I added these lines for teh search field
local ($helper,$helper_top,$helper_bot);
print &$manager_page_header("Edit Product","","","","");
if ($in{'skip_edit_screen'} ne "") {
$edit_error_message = "Record $in{'ProductEditSku'} Skipped.";
$in{'ProductEditSku'} = "";
if ($in{'save_category'} ne "") {
$in{'category'} = $in{'save_category'};
}
}
if ($in{'category'} ne "") {
$message = "Click an 'Item # to Edit' button to make changes to" .
" a product in your catalog. ";
$message .=' <a href="manager.cgi?edit_screen=yes&">' .
'Click here</a> to display the categories in your catalog.';
} else {
$message = "Click below to select the category to display.";
}
@categories = &get_prod_db_category_list;
$cat_str = '';
foreach $inx (@categories) {
$cat_str .= "<OPTION>$inx</OPTION>\n";
}
# this area was added
if (($mc_put_edit_helper_at_top =~ /yes/i) ||
($mc_put_edit_helper_at_bot =~ /yes/i)) {
$helper = qq~
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD WIDTH=40%>
<FORM METHOD="POST" ACTION="manager.cgi">
<CENTER>
<INPUT TYPE=SUBMIT NAME=Helper VALUE="Edit Item -->">
<input type=text name="EditWhichProduct" size=12>
<INPUT TYPE=HIDDEN NAME=category VALUE="$in{'category'}">
<INPUT TYPE=HIDDEN NAME=EditProduct VALUE="Edit">
</CENTER>
</FORM>
</TD>
<TD WIDTH=60%>
<FORM METHOD="POST" ACTION="manager.cgi">
<CENTER>
<INPUT TYPE=SUBMIT NAME="edit_screen"
VALUE="Show Category -->">
<SELECT NAME=category>$cat_str</SELECT>
</CENTER>
</FORM>
</TD>
</TR>
</TABLE>
~;
}
if ($mc_put_edit_helper_at_top =~ /yes/i) {
$helper_top = $helper;
}
if ($mc_put_edit_helper_at_bot =~ /yes/i) {
$helper_bot = $helper;
}
# this is the end of the added text
print <<ENDOFTEXT;
<CENTER>
<HR WIDTH=500>
</CENTER>
<CENTER>
<TABLE WIDTH=500>
<TR>
<TD WIDTH=500>
<FONT FACE=ARIAL COLOR=RED>
WARNING!</FONT>
<FONT FACE=ARIAL>Clicking an <b>'Item # to Delete'</b> button will
IMMEDIATELY remove that product from your catalog. You've been warned!
<br>$message</TD>
</TR>
</TABLE>
</CENTER>
<CENTER>
<HR WIDTH=500>
</CENTER>
ENDOFTEXT
if ($in{'DeleteWhichProduct'} ne "")
{
print <<ENDOFTEXT;
<CENTER>
<TABLE WIDTH=550 BORDER=0>
<CENTER>
<TR WIDTH=550 BORDER=0>
<TD WIDTH=550 BORDER=0>
<CENTER><FONT FACE=ARIAL SIZE=2 COLOR=RED>
Product ID \# $in{'DeleteWhichProduct'} successfully
deleted</FONT></CENTER>
</TD>
</TR>
</CENTER>
</TABLE>
</CENTER>
ENDOFTEXT
}
if ($in{'category'} ne "") {
&display_items_in_category(
"Delete",
"<B><FONT COLOR=RED>Item # to Delete</FONT></B>",
"Delete",
"delete_screen");
} else {
&display_categories("delete_screen");
}
print <<ENDOFTEXT;
<CENTER>
<TABLE WIDTH=550 BORDER=0 CELLPADDING=0>
<tr><td><HR></td></tr>
</table>
</center>
ENDOFTEXT
print &$manager_page_footer;
}
############################################
|