[interchange-cvs] interchange - heins modified 2 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Wed Aug 14 14:48:01 2002


User:      heins
Date:      2002-08-14 18:47:56 GMT
Modified:  dist/lib/UI ichelp.txt
Modified:  dist/lib/UI/pages/admin customer_mailing.html
Log:
* Add a bit of online help for mailing function.

* Enhance so that large lists need not be displayed.

Revision  Changes    Path
2.3       +1 -0      interchange/dist/lib/UI/ichelp.txt


rev 2.3, prev_rev 2.2
Index: ichelp.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/ichelp.txt,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- ichelp.txt	3 Feb 2002 04:27:55 -0000	2.2
+++ ichelp.txt	14 Aug 2002 18:47:56 -0000	2.3
@@ -1,6 +1,7 @@
 code	title	helptext
 gentable	Direct Table Edit	<p>=0DThe <b>Direct Table Edit</b> page allows =
you to edit any of Interchange's internal tables. Select a table=0Dto edit,=
 or search a table and select rows to edit.=0D</p>
 table.searchreplace	Database: Search and Replace	This feature allows you t=
o mass-change a field in the database.=0D=0D<P>=0DSelect the table to opera=
te on, then the column, from the dropdowns. (This page requires JavaScript =
enabled.) Enter the string to be searched for, and the string to replace it=
 Click <b>Search and Replace</b>.=0D<P>=0DThe search string is a regular e=
xpression. If the string is a partial match for the field, only the matchin=
g text will be replaced. You may parenthesize one part of the search expres=
sion, in which case only the parenthesized part will be replaced and the re=
st of the matching text will be kept in place.=0D<P>=0DThe replacement stri=
ng is the literal text that will be inserted instead of the search text.=0D=
<P>=0DIf the regular expression is incorrect, you will be returned to the p=
age and the message "Error: Compiling regex" will be displayed.=0D<P>=0DIf =
the operation is successful, you will be sent to the edit select list for t=
he table you operated on, and a message indicating how many rows (if any) w=
ere changed.
+customer.mailing	Customer Mailing	 <p> This facility is intended to email =
a limited number of users a templated message.  </p> <p> Records are substi=
tuted with the values from the <b>userdb</b> table.  Each field is in {curl=
y brackets}. For example, the first name column <i>fname</i> would be templ=
ated as {FNAME}.  </p> <p> The full range of templating available with the =
Interchange ITL tag <b>[attr-list]</b> are available, so you can do tests a=
nd conditional substitutions. See the IC documentation of <a href=3D"http:/=
/www.icdevgroup.org/cgi-bin/ic/search.html?mv_coordinate=3D1&mv_searchtype=
=3Ddb&from_search=3D1&mv_value=3Dlink_banner%3DSearch+results&mv_search_pag=
e=3Ddocresults&mv_search_file=3Ddocumentation&mv_searchspec=3Dattr_list">at=
tr_list</A> for help with that.  </p> <p> You can choose any list that curr=
ently has subscribers. Formulate your message in the textarea, set the Subj=
ect:, the From:, and To: settings. Some reasonable defaults are supplied ex=
cept for Subject. If you want the reply to go to a different address than t=
he From:, set that too.  </P> <p> By default, each user's box is checked fo=
r mailing. If there are users you don't want the mailing to go to, uncheck =
them. If you want to send in more than one batch, the system will remember =
which users you have mailed to as long as you remain logged in.  </p> <p> I=
t is a good idea to do the <b>Email Preview</b> to check the messages befor=
e you send.  </p> <P> If you have a very large list, you cannot <b>Send Now=
</b>. Use the <b>Download Batch</b> button to download a shell script that =
will use <tt>sendmail</tt> to send it via the UNIX command line.</p>
 shipping.data	Shipping: Edit Data Table	<p>=0DOnce you've created a shippi=
ng method, you can fine tune the calculation=0Dbased on the weight of the o=
rder. Use the "+" button to add new ranges=0Dand specify which ranges will =
apply to which calculations. Choose a type=0Dof calculation to perform for =
each weight range, such as a number (flat charge),=0Dformula (arbitrary cal=
culation based on the weight), UPS lookup (internal=0Dor via their Web site=
), multiply by (simple rate), or select <b>Message</b> to=0Dgenerate an err=
or message. If you specify a formula, you can include the=0Dstring "@@TOTAL=
@@" to represent the total weight of the order. For example,=0D"8 + @@TOTAL=
@@ + 2.50".=0D</p>
 shipping.main	Shipping Options	<p>=0DThe <b>Shipping Options</b> page allo=
ws you to specify and configure the shipping methods and costs for your onl=
ine store. Before you begin here, you need to decide how you want to charge=
 for shipping. We support all the most common shipping options:=0D</p>=0D=
=0D<p>=0D<a href=3D"shipping.price.html">By Price:</a> shipping total based=
 on the total price of the order. This can also be used to calculate a flat=
 shipping price ($0 - infinity =3D $4.95) or a flat rate with big orders sh=
ipped free ($0 - 500 =3D $4.95 and $500 - infinity =3D free). The shipping =
charge can either be a flat charge or a percentage.=0D</p>=0D=0D<p>=0D<a hr=
ef=3D"shipping.weight.html">Standard by Weight: </a> calculates shipping by=
 total weight with no regard to zones. To use this method, you must enter a=
 weight for each item in your inventory. You can use any unit of measure yo=
u wish as long as you are consistent. If you enter your item prices in gram=
s, then configure shipping with pounds, your customers will not be happy wh=
en they are quoted huge shipping rates.=0D</p>=0D=0D<p>=0D<a href=3D"shippi=
ng.quantity.html">Standard by Quantity:</a> this is identical to shipping b=
y price, but the shipping charge will be multiplied by the total number of =
items ordered.=0D</p>=0D=0D<p>=0D<a href=3D"shipping.ups.html">UPS Zones-Ba=
sed:</a> Interchange is pre-configured with UPS zones tables for ground, th=
ree day select, second day air, and next day air.=0D</p>=0D=0D<p>=0DIf you =
require zones support for Fedex, DHL, or USPS, please <a href=3D"mailto:inf=
o@akopia.com">contact Akopia</a>.=0D</p>=0D=0D<p>=0DKeep in mind that you c=
an choose a variety of these shipping methods, giving the customer a choice=
 Many companies use flat shipping for ground orders and use UPS zones ship=
ping for second day and next day orders.=0D</p>=0D=0D<p>=0D<b>Create New Me=
thod</b><br>=0DOnce you've decided what shipping options you are going to o=
ffer your customers, click the "Create New Method" button and configure eac=
h option. You will be able to name and configure each option from the "Crea=
te New Method" screen. See the next topic, <b>Edit Method</b>, for details.=
=0D</p>=0D=0D<p>=0D<b><a href=3D"shipping.edit.html">Edit Method</a></b><br=
>=0DSelect one of the currently existing shipping methods from the list and=
 click "edit method" to change its name, enable or disable it, change the c=
alculation method, or set a minimum charge. The "edit method" button takes =
you to the same screen as "create new method" button, but already filled ou=
t. To edit the individual charges for different prices or weights, use the =
"edit data table" function.=0D</p>=0D=0D<p><b><a href=3D"shipping.data.html=
">Edit Data Table</a></b><br>=0DThe process of creating a new method is usu=
ally a two-step process. In the first step, you name the shipping method an=
d devide on a calculation algorithm (by price, by weight/zone, etc). The se=
cond stage involves configuring your chosen method. The "edit data table" f=
unction allows you to change the particular settings for an already-created=
 method.=0D</p>=0D=0D<p>=0D<b>Delete Method</b><br>=0DSelect a method from =
the list and click on this button to delete it. You will be asked to confir=
m your choice. If you choose yes, it will be deleted permanently. If you me=
rely want to temporarily disable a particular shipping method and remove it=
 from the list your customers see, edit the method and un-check the box nex=
t to "enable this method." That way, if you want to enable it later, you wo=
n't have to re-configure it.=0D</p>
 order.main.pending	Pending Orders	The <b>Pending Orders</b> page displays =
all current orders in the system. This page works in real-time, but if you =
leave this page open or your Web browser has cached the page's contents, it=
 is recommended that you re-load the page periodically to see the most rece=
nt orders.=0D<h2>Functions</h2>=0D<b>Start at Order Number</b><br>=0DType t=
he order number to be displayed first. Following this number, all other ord=
er numbers will be displayed in numerical order.=0D<p>=0D<b>Limit with Sear=
ch</b><br>=0DType the parameter by which you want to search. For example, t=
ype <b>CA</b> to search for all orders originating in the state of Californ=
ia. Only the orders containing the search parameter will be displayed.=0D<p=
>=0D<b>Delete Checked Orders</b><br>=0DClick this button after checking the=
 order(s) you want to delete. A warning is displayed. Click <b>OK</b> to de=
lete. The deleted order(s) are removed from the <b>Orders</b> page, but rem=
ain in the system. <i><b>Hint:</b> To delete an individual order, click the=
 <b>X</b> in the red square beside the order number.</i>=0D<p>=0D<b>Archive=
 Checked Orders</b><br>=0DClick this button after checking the order(s) you=
 want to archive. The order(s) are moved to the <A HREF=3D"order.main.archi=
ved.html">Archived Orders</a> section. <i><b>Hint:</b> To archive an indivi=
dual order, click the black arrow beside the order checkbox.</i>=0D<p>=0D<h=
2>Features</h2>=0DYou can sort the order list by clicking the heading of th=
e column by which you want to sort. For instance, to sort by total price, c=
lick the <b>Total</b> heading. This displays the orders by amount in ascend=
ing or descending order. To sort in reverse order, click the <b>Total</b> h=
eading again.=0D<p>=0DYou can view the details of a specific order by click=
ing the <b>Order Number</b>, <b>User</b>, or <b>Status</b> of that order.<b=
r>=0DClick the <b>Order Number</b> to access the <a href=3D"order.view.html=
">View Order</a> page.<br>=0DClick the <b>User</b> to access the <a href=3D=
"customer.view.html">View Customer</a> page.<br>=0DClick the <b>Status</b> =
to access the <a href=3D"item.edit.html">Order Status</a> page.=0D<p>=0D=0D=
=0D=0D<!-- commented out=0D<p>=0D<b>Delete False Order</b><br>=0DPeriodical=
ly, either through fraud or because an order fell through after it was plac=
ed due to product availability problems, an order will need to be deleted a=
nd not reported in the order statistics. Select the false order from the li=
st and click on the delete false order button. You will be asked for confir=
mation to delete this order, because once an order is deleted, it is irretr=
ievable.=0D</p>=0D-->



1.4       +43 -17    interchange/dist/lib/UI/pages/admin/customer_mailing.h=
tml


rev 1.4, prev_rev 1.3
Index: customer_mailing.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/customer_mailing.htm=
l,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- customer_mailing.html	14 Aug 2002 17:56:41 -0000	1.3
+++ customer_mailing.html	14 Aug 2002 18:47:56 -0000	1.4
@@ -8,6 +8,7 @@
 [/if-mm]
=20
 [set ui_class]Customers[/set]
+[set help_name]customer.mailing[/set]
 [set page_perm]mailing[/set]
=20
 @_UI_STD_HEAD_@
@@ -151,7 +152,7 @@
 			type=3Dtext
 			size=3D50
 			maxlength=3D"70"
-			value=3D"[value name=3Dmail_from filter=3Dentities]"
+			value=3D"[value name=3Dmail_from filter=3Dentities keep=3D1]"
 			>
 	</td>
 </tr>
@@ -165,7 +166,7 @@
 			type=3Dtext
 			size=3D40
 			maxlength=3D"70"
-			value=3D"[value name=3Dmail_to filter=3Dentities]"
+			value=3D"[value name=3Dmail_to filter=3Dentities keep=3D1]"
 			>
 	</td>
 </tr>
@@ -179,7 +180,7 @@
 			type=3Dtext
 			size=3D50
 			maxlength=3D"70"
-			value=3D"[value name=3Dmail_subject filter=3Dentities]"
+			value=3D"[value name=3Dmail_subject filter=3Dentities keep=3D1]"
 			>
 	</td>
 </tr>
@@ -193,22 +194,21 @@
 			type=3Dtext
 			size=3D40
 			maxlength=3D"70"
-			value=3D"[value name=3Dmail_reply filter=3Dentities]"
+			value=3D"[value name=3Dmail_reply filter=3Dentities keep=3D1]"
 			> <I>(blank is same as From)</i>
 	</td>
 </tr>
 <tr>
 <td colspan=3D2>
-<TEXTAREA name=3Dmail_template cols=3D80 rows=3D15>[value name=3Dmail_temp=
late filter=3Dentities]</textarea>
+<TEXTAREA name=3Dmail_template cols=3D80 rows=3D15>[value name=3Dmail_temp=
late filter=3Dentities keep=3D1]</textarea>
 <br>
 		<b><u>Mailing List</u>:</b><br>
 [display default=3D"[cgi target_list]" name=3Dtarget_list type=3Dselect op=
tions=3D"[scratch mail_list_options]"]
=20
 		<input
 			type=3Dsubmit
-			name=3Dshow_members
-			onClick=3D"selfit(this.form)"
-			value=3D"Show list members and select"
+			onClick=3D"checkAll(this.form, 'produce', 1); this.form.produce.value =
=3D ''; selfit(this.form)"
+			value=3D"Select list"
 		>
 		&nbsp;&nbsp;&nbsp;
 		<input
@@ -216,6 +216,10 @@
 			onClick=3D"confirm('Reset to defaults?') && clearform(this.form) && thi=
s.form.submit()"
 			value=3D"Clear form"
 		>
+		<select name=3Dshow_members>
+			<option value=3D0> Don't show list
+			<option value=3D1 [selected show_members 1]> Show list members
+		</select>
 	</td>
 </tr>
 </table>
@@ -227,15 +231,17 @@
 <br>
 [if cgi mail_template]<!-- update: [update values]-->[/if]
=20
-[if cgi show_members]
+[if !cgi produce]
 <div style=3D"
 			Margin-left: 5%;
 			Width: 600px;
-			[if !scratch ui_old_browser]
+			[if type=3Dexplicit
+				compare=3D`$CGI->{show_members} && ! $Scratch->{ui_old_browser}`
+			]
 			Height: 100px;
 			Overflow: auto;
 			[/if]
-		">[tmpn tmp_seen][/tmpn]
+		">[tmpn tmp_seen][/tmpn][tmpn tmp_users][/tmpn]
 [loop search=3D"
 		fi=3Duserdb
 		st=3Ddb
@@ -262,12 +268,22 @@
 		 return if $s =3D~ /\s$list\s/;
 	}
 	$Scratch->{tmp_seen}++;
+	if(! $CGI->{show_members}) {
+		$uary =3D $Scratch->{tmp_users} ||=3D [];
+		push @$uary, $user;
+		return;
+	}
 	my $url =3D $tmp_url . '&' . "customer=3D$user";
 	$stuff =3D~ s/HREF=3D""/href=3D"$url"/;
 	return $stuff;
 [/loop-sub][loop-exec sent_check]
 <input type=3Dcheckbox name=3Dproduce value=3D"[loop-code]" CHECKED><A hre=
f=3D"mailto:[loop-param email]">[loop-param email]</A> -- [loop-param fname=
] [loop-param lname][if-loop-param company], [loop-param company][/if-loop-=
param] (<A HREF=3D"">[loop-code]</A>)<br>
 [/loop-exec][/loop]
+[if scratch tmp_users]
+    <input name=3Dproduce
+           value=3D"[calc] return join ",", @{$Scratch->{tmp_users}}; [/ca=
lc]"
+           type=3Dhidden>
+[/if]
 [if !scratch tmp_seen]
 <blockquote style=3D"font-size: larger">
 You have already sent email to all users on this list. You should not send=
 more
@@ -280,15 +296,25 @@
 [/if]
 </div>
 <div style=3D"margin-left: 5%">
-<P>
-<A HREF=3D"javascript:checkAll(document.mailform, 'produce', 0)"><img src=
=3D"__UI_IMG__box_checked.gif" border=3D0>Check all</A>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;
-<A HREF=3D"javascript:checkAll(document.mailform, 'produce', 1)"><img src=
=3D"__UI_IMG__box_empty.gif" border=3D0>Uncheck all</A>
-</p>
+	[if value show_members]
+	<P>
+	<A HREF=3D"javascript:checkAll(document.mailform, 'produce', 0)"><img src=
=3D"__UI_IMG__box_checked.gif" border=3D0>Check all</A>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;
+	<A HREF=3D"javascript:checkAll(document.mailform, 'produce', 1)"><img src=
=3D"__UI_IMG__box_empty.gif" border=3D0>Uncheck all</A>
+	</p>
+	[else]
+		<b>[scratch tmp_seen] users selected.</b>
+	[/else]
+	[/if]
 <p>
 <input type=3Dsubmit name=3Dshow onClick=3D"blanktarg(this.form)" value=3D=
"Preview email">
 <input type=3Dsubmit name=3Ddownload_batch onClick=3D"selfit(this.form, 1)=
" value=3D"Download Mail Batch">
-[if value mv_search_match_count > 50]
-(too many matches to send directly)
+
+[if
+	type=3Dvalue
+	term=3Dmv_search_match_count
+	op=3D">"
+	compare=3D"[either]__MAILING_MAX_DIRECT__[or]50[/either]"
+](too many matches to send directly)
 [else]
 <input type=3Dsubmit name=3D"direct_send" onClick=3D"selfit(this.form, 1)"=
 value=3D"Send now">
 [/else]