[docs] docs - danb modified 2 files

docs@icdevgroup.org docs@icdevgroup.org
Sun Sep 22 23:56:02 2002


User:      danb
Date:      2002-09-23 03:55:53 GMT
Modified:  .        icfaq.sdf ictags.sdf
Log:
Tag additions:

 * [filter 5] and [filter 5.] documentation.

FAQ additions:

 * Templates aren't showing, only the center content of the page itself
 * How do I delete an item from the cart in Perl?
 * How do I setup a new real time payment processor that isn't yet supporte=
d by Interchange?
 * How do I modify orders after tehy are placed, change items, shipping, et=
c.?
 * How do I make or get a certificate for SSL?
 * When I try to install the RPM, I get "failed dependencies" errors
 * How do I perform multi-table SQL queries and/or joins using dot notation?

Revision  Changes    Path
1.16      +96 -2     docs/icfaq.sdf


rev 1.16, prev_rev 1.15
Index: icfaq.sdf
=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/docs/icfaq.sdf,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- icfaq.sdf	5 Aug 2002 23:17:10 -0000	1.15
+++ icfaq.sdf	23 Sep 2002 03:55:52 -0000	1.16
@@ -1,10 +1,10 @@
 !init OPT_LOOK=3D"akopia"; OPT_STYLE=3D"manual"
-# $Id: icfaq.sdf,v 1.15 2002/08/05 23:17:10 kwalsh Exp $
+# $Id: icfaq.sdf,v 1.16 2002/09/23 03:55:52 danb Exp $
=20
 !define DOC_NAME "Frequently Asked Questions"
 !define DOC_TYPE ""
 !define DOC_CODE "icfaq"
-!define DOC_VERSION substr('$Revision: 1.15 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.16 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://interchange.redhat.com/doc/icfaq.html"
@@ -296,6 +296,45 @@
=20
 The error is caused when the system you are installing on does not have th=
e program called "make".  It is recommended that you install make as well a=
s a C compiler ("cc" or "gcc") for the installation of Interchange.  If you=
 are unsure of how to do this for your operating system, it may help to ask=
 a mailing list related to your operating system.
=20
+H2: Templates aren't showing, only the center content of the page itself
+
+Example question:  "All that's showing up is the center section of the tem=
plate.  This happened after ____:  (moving my site to a new host, or upload=
ing a new catalog.cfg or theme.cfg file, or restarting interchange)."
+
+This can happen if:
+
+ * The files were uploaded in binary instead of ASCII (when using FTP)
+
+ * Windows-style carriage returns were put in the file by a windows editor=
 or file transfer program
+
+From unix, do an octal dump on some of the files to see if you have cr cha=
rs:
+
+!block example
+od -a templates/foundation/theme.cfg | grep cr
+od -a catalog.cfg | grep cr
+!endblock
+
+If something appears on the screen, then your file needs to be cleaned.  A=
mong the other 10-million ways to clean it, here is one:
+
+!block example
+perl -pi -e 's/\r\n/\n/g' < old_file.cfg > new_file.cfg
+!endblock
+
+Also, if you are using FTP to transfer the files from a Windows machine, t=
ry using ASCII mode instead of binary mode.
+
+H2: When I try to install the RPM, I get "failed dependencies" errors
+
+There are two easy solutions to this problem:
+
+ * Install the modules manually, then use the --nodeps RPM option.
+
+!block example
+perl -MCPAN -e "install Bundle::Interchange"
+!endblock
+=20
+ * Install RPM modules to satisfy the dependencies.
+   Some modules are available from {{URL:http://ftp.interchange.redhat.com=
/perl/RHL-7.2/}}
+	While others can be found on rpmfind.net.
+
 H1: SSL problems
=20
 H2: Shopping cart is dropped when using SSL.
@@ -832,6 +871,14 @@
    [/perl]
 !endblock
=20
+H2: How do I delete an item from the cart in Perl?
+
+(Answered by Racke)
+
+!block example
+[calc] @$Items =3D grep {$_->{code} ne '123.456.789'} @$Items [/calc]
+!endblock
+
 H2: The demo doesn't do ... (pick one)
=20
 That is because it is a demo. It is not intended to be a finished catalog,=
 just
@@ -1040,8 +1087,55 @@
        </td>
 !endblock
=20
+H2:How do I do a random display of items?
+
+(Answered by Bill Carr)
+
+If you are using mysql (and others probably), you should be able to add "O=
RDER BY RAND()" to your SQL query.  For example:
+
+!block example
+[query
+   list=3D1
+   sql=3D|SELECT * FROM products ORDER BY RAND() LIMIT 3|
+]
+[list]
+        [sql-param description]<br>
+[/list]
+[/query]
+!endblock
+
+H2:How do I setup a new real time payment processor that isn't yet support=
ed by Interchange?
+
+If the payment processor that you would like to use isn't supported by Int=
erchange out of the box, then a new payment module would need to be develop=
ed for that processor before you could use them.
+
+If you are up to the task of programming a new payment processor module yo=
urself, the ICDEVGROUP would be happy to add your contribution to the growi=
ng list of Interchange-supported payment processors.  Feel free to take a l=
ook at the lib/Vend/Payment directory to see examples of current payment mo=
dules.
+
+If developing the module on your own isn't an option, you may engage a com=
petent Interchange developer to do it for you or use one of the already-sup=
ported payment modules.
+
+H2:How do I modify orders after tehy are placed, change items, shipping, e=
tc.?
+
+N:Example question:  "Occasionally, I need to modify orders... Add an Item=
, Change shipping, etc.   What is the best way or how can it be done?"
+
+The Foundation template does not have this functionality "out of the box".=
  While one can manually modify the tables via the Admin UI, it would not c=
ause IC to automatically recalculate subtotals, tax, shipping, etc. to acco=
unt for the  modifications.
+
+Until someone gets the "itch" to program that feature into the Admin UI, s=
ome users are solving the problem by handling all of these modifications in=
 a Back Office / Accounting / ERP software system.  For example, IC comes w=
ith "out of the box" support for integration with Quickbooks.  At that poin=
t, however, it becomes necessary to analyze what (if any) syncronization wi=
ll be performed between the two systems.
+
+H2:How do I make or get a certificate for SSL?
+
+This is handled separately and independantly from Interchange, and there a=
re lots of documentation on buying and installing certificates for your pla=
tform and http server, as well as generating certificate signing requests (=
CSR).  Companies such as GeoTrust and Thawte sell certificates, and often h=
ave some documentation on what the process entails.  The Apache, mod_ssl, a=
nd OpenSSL user groups may be of assistance as well.
+
+While it is technically feasible to generate your own self-signed certific=
ate, modern browsers will display a warning if the certificate is not signe=
d by a signing authority known to that browser.
+
+H2: How do I perform multi-table SQL queries and/or joins using dot notati=
on?
+
+(Answered by Mike Heins)
+
+Example question: "How come I can't use [sql-param tablename.fieldname] no=
tation when I do a multi-table query?"
=20
+DBI simply does not support tablename.fieldname in the return value.
=20
+You can just refer to them by the fieldname. In the case of field names th=
at are the same but need to be selected from different tables, you can use =
"SELECT orderline.quantity as o_quan,..." and refer to it as [sql-param o_q=
uan].
+=20
 H1: Errors
=20
 H2: Sorting doesn't work across multiple pages.



1.101     +25 -2     docs/ictags.sdf


rev 1.101, prev_rev 1.100
Index: ictags.sdf
=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/docs/ictags.sdf,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- ictags.sdf	4 Sep 2002 01:30:25 -0000	1.100
+++ ictags.sdf	23 Sep 2002 03:55:52 -0000	1.101
@@ -1,10 +1,10 @@
 !init OPT_LOOK=3D"akopia"; OPT_STYLE=3D"manual"=20
-# $Id: ictags.sdf,v 1.100 2002/09/04 01:30:25 kwalsh Exp $
+# $Id: ictags.sdf,v 1.101 2002/09/23 03:55:52 danb Exp $
=20
 !define DOC_NAME "Interchange Tags Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "ictags"
-!define DOC_VERSION substr('$Revision: 1.100 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.101 $', 11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://interchange.redhat.com/doc/ictags.html"
@@ -5632,6 +5632,29 @@
=20
 Filters available include:
=20
+H4: Length filter=20
+
+If you pass just a numeric argument, filter will return only first N chara=
cters.  For example:
+!block example
+[filter 5]Interchange[/filter]
+!endblock
+results in:
+
+"Inter"
+
+By appending a ".", you can direct Interchange to append an ellipsis:
+!block example
+[filter 5.]Interchange[/filter]
+!endblock
+results in:
+
+"Inter..."
+
+>		if (/^(\d+)(\.?)$/) {
+>			substr($value, $1) =3D $2 ? '...' : ''
+>				if length($value) > $1;
+>			next;
+>		}
=20
 H4: {{CMD[id=3D"filter_op_cgi"]cgi}}
=20