The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
Adding search to delete product page
Author Message
Reply with quote
Post Adding search to delete product page 
Maybe this is covered already. please help me out...

At the bottom of the product edit page there is a search button and this is very helpful since my client has over 3000 different products.
www.countrybooknook.com

Since her books are second hand there is only one item of each product. When she wants to delete a book she has to do a search in the store to find which product it is before she goes to the delete product page in the admin area and takes it out.

She ( and I) are wondering which pages to edit to make a search button at the bottom of the delete page just like there is at the bottom of the edit product page.

Thanks

Michel

View user's profile Send private message
Reply with quote
Post RE: Adding search to delete product page 
hell-o
you'll have to look through the files in the store/protected sub directory and find the search routine used in the product edit screen. then apply it to the delete screen. all the files you need are in the protected sub directory.
regards,
dan

Reply with quote
Post  
Thanks I will try that!

Michel

View user's profile Send private message
Reply with quote
Post  
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 .='&nbsp;&nbsp;<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. &nbsp;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;

}

############################################

View user's profile Send private message
Reply with quote
Post  
hell-o
oh man! back up the dB! if you corrupt the database with malfromed code while testing you could lose the entire thing. download via ftp in ascii to your pc. also make a sub directory in the store/data_files folder and copy the file to there. i like to add a date to the name so it wont get over written and the version is the date in the name...
021105data.file
on a side note it maybe a good time to backup the entire site and download the file for safe keeping.

look in your manager >error log to see if any errors are being written.
regards,
dan

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum