[ic] Re: Interchange-users digest, Vol 1 #508 - 14 msgs

predrag interchange-users@lists.akopia.com
Mon May 14 14:26:45 2001


----- Original Message -----
From: <interchange-users-request@developer.akopia.com>
To: <interchange-users@developer.akopia.com>
Sent: Monday, May 14, 2001 10:01 AM
Subject: Interchange-users digest, Vol 1 #508 - 14 msgs


> Send Interchange-users mailing list submissions to
> interchange-users@lists.akopia.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.akopia.com/mailman/listinfo/interchange-users
> or, via email, send a message with subject or body 'help' to
> interchange-users-request@lists.akopia.com
>
> You can reach the person managing the list at
> interchange-users-admin@lists.akopia.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Interchange-users digest..."
>
>
> Today's Topics:
>
>    1. Interchange-users guidelines [semi-monthly posting] (Mike Heins)
>    2. Call for: Interchange Case Studies (Dave Jenkins)
>    3. Problem with slovenian language (admin@franconi.si)
>    4. R: R: [ic] help with locale please (Stefano Nota)
>    5. Re: R: R: [ic] help with locale please (Stefan Hornburg Racke
> )
>    6. SQL Query in UserTag (Ben Mirecki)
>    7. R: R: R: [ic] help with locale please (Stefano Nota)
>    8. Nested loop problem (Stefan Hornburg Racke
> )
>    9. Re: SQL Query in UserTag (David Totten)
>   10. Re: R: R: R: [ic] help with locale please (Stefan Hornburg Racke
> )
>   11. Re: SQL Query in UserTag (bill@worldwideimpact.com)
>
> --__--__--
>
> Message: 1
> Date: Mon, 14 May 2001 09:09:00 -0400
> From: Mike Heins <mheins@redhat.com>
> To: interchange-users@developer.akopia.com
> Subject: [ic] Interchange-users guidelines [semi-monthly posting]
> Reply-To: interchange-users@lists.akopia.com
>
> interchange-users@lists.akopia.com is a list for users who have questions
about
> configuring, setting up, and fine tuning Interchange catalogs.  Other
topics
> will include:
>
>   - announcements of Interchange releases and fixes
>   - notification and submission of Interchange bugs
>   - distributing pages which implement Interchange functions
>   - discussing the future development of Interchange
>   - any other topic relating *directly* to Interchange
>
> The list started January 5, 1997 as minivend-users.  For an archive of
past
> articles, see:
>
>     http://developer.akopia.com/archive/interchange-users/
>
> Also, because the list has high volume for one of its type, before
> posting to the list it is recommended that you use the search feature at:
>
>     http://developer.akopia.com/
>
> Many questions can be answered by trying some keywords at this
> facility. Try more than one combination.
>
> It is common courtesy when posting to a forum such as this to:
>
>   1. Include the version of software you are using, i.e.
>   Interchange 4.6.1. Bugs are fixed and deficiencies corrected
>   in each release of Interchange, as with almost any software.
>
>   2. Include relevant information where appropriate.
>   The operating system in question is often relevant, as
>   is the Perl version and database type in use.
>
>   3. When talking about tag problems, include a snippet of ITL
>   tags which illustrates the problem.
>
>   4. When posting about PGP, Glimpse, or anything else that
>   uses an external command, you need to state what happens
>   when you run the same thing from the command line.
>
>   5. Include error log entries or a statement that there
>   are none.
>
> If a post to this list doesn't include the relevant information, not only
> are you unlikely to get a reasonable answer, you will add to the volume of
> the list and make it less likely that reasonable questions are answered.
>
> All entries are archived and available via a web gateway.  The
> "X-No-Archive: Yes" header is honored if you choose to use it.
>
> List etiquette issues:
>
>  -- No HTML mail is allowed. Besides being improper email netiquette,
>     it destroys the digest.
>
>  -- Please try to keep your line size less than 80 characters.
>
>  -- No PGP signatures should be used. This is not a legal record.
>
>  -- No flame wars are tolerated.
>
>  -- No "courtesy copies" unless specifically requested. It
>     can be annoying to some people to receive two copies of
>     the same message.
>
>  -- If you must munge, make sure you mention this in the
>     BODY of the message and not buried incomprehensibly in
>     the header or in a cluttered signature attachment.
>
>  -- The list changes the Reply-To: header to point to the
>     list. While this is by popular demand, it is recognized that it
>     is not always the best mode of operation. You should reply by email
>     directly to the sender if the post will not be of general use.
>
> For more information see the Netiquette RFC:
>
> http://www.faqs.org/rfcs/rfc1855.html
>
> Thanks for your cooperation. We believe we have one of the best user
> lists going, and we would like to keep it useful and pleasant to use.
>
>
> --__--__--
>
> Message: 2
> Date: Mon, 14 May 2001 09:12:55 -0400
> From: Dave Jenkins <djenkins@redhat.com>
> Organization: Red Hat Professional Services Group
> To: Interchange List <interchange-users@developer.akopia.com>
> Subject: [ic] Call for: Interchange Case Studies
> Reply-To: interchange-users@lists.akopia.com
>
> Red Hat Interchange Site Developer Training Course
> Calling for Developer's Case Studies: Questionnaire
> --------------------------
>
> Red Hat will soon be launching the Interchange site developers course.
> Course descriptions and class dates will be posted on the Red Hat site
> soon.
>
> As part of the course, We would like to showcase sites developed on
> Interchange.  We thought what better way to show students the vast
> possibilities of Interchange then by showcasing the work of talented
> developers in the Interchange community as well as sites built by Red
> Hat Professional Services Group.
>
> Rest assured that your work will receive recognition and credit as we
> discuss your project.  In order to submit a site for consideration,
> please provide the following information:
>
> 1. Site Name
>
> 2. Site URL
>
> 3. Brief description of business (60 words or less)
>
> 4. Hardware and OS architectures (dedicated, virtual host, Linux
> platform)
>
> 5. Database platform
>
> 6. Site highlights: what functionality marks this site as a shining
> example of Interchange functionality?  i.e. inventory control, customer
> personalization, order tracking, fulfillment reporting
>
> 7. What scripts have you modified/customized to reach your development
> goals for this site?
>
> 8. If you have written specific scripts for this site, may we show the
> code for those scripts?
>
> 9. Do you have any documentation (flowcharts, technical requirements)
> that you produced for this site?  Would you allow us to share those with
>
> the class?
>
> NOTES:
> - Not every case study that is submitted will be used.  We are looking
> for solid interchange implementations that will provide good fodder for
> discussion.
>
> - Please keep it short.  We are not looking for incredible 5-page perl
> scripts (no matter how genius) yet.  If you spend more than 15 minutes
> writing the case study, it may be too long . . .
>
> - PLEASE SEND THESE DIRECTLY TO djenkins@redhat.com SO WE DON'T CROWD
> THE LIST.
>
> Thanks!
>
> Dave
>
> --
> -----------------------
> Dave Jenkins
> Project Manager - Professional Services Group
> Red Hat, Inc. http://www.redhat.com
> djenkins@redhat.com
> TEL: 703-456-2944
> -----------------------
>
>
>
> --__--__--
>
> Message: 3
> Date: Mon, 14 May 2001 11:51:16 +0200 (CEST)
> From: <admin@franconi.si>
> To: <interchange-users@developer.akopia.com>
> Subject: [ic] Problem with slovenian language
> Reply-To: interchange-users@lists.akopia.com
>
> just read this :
>
> Hello from Athens - Greece.
>  We had successfuly installed the akopia software in our web server with
> postgresql 7. But there is a problem with the admin interface. When I am
> adding
> new items with Greek Description it acceps that successfuly but when I am
> edditing that item in order to add some quantity it changes the Greek
> characters of the greek description with the "?" symbol.
>  Why it is happening ?? Is there any solution for that ??
>  The internationalization is has been done and in the e-shop interface I
> have
> not any problem with the Greek characters.
>  Best regards from Greece
>    Stamatis Kekes
>    Technical Director of Kosmoslink LTD.
>
> "
>
> and now I realise that akopia made a product entirely based on the
> iso-8859-1 charset.I tried getting help months ago but you just claimed
> that this had to be an installation problem or a perl problem.But since I
> can see that a lot of people from Europe who would like to use this
> product because it is very good can't do so since it is totally useles
> when used with europian languages such as greek slovenian serbian
> croatian.So if its not 2 much trouble could one of the developers take the
> time and make a small page explaining how to use the TAGS and make
> interchange change out characters to a format that it and perl can
> understand and display correctly(in our language).
> The only was we've been able to use interchange is by using the import
> interface and importing files that had the characters in question changed
> to a format that interchange will use and find when searching for it.But
> still we are unable to use the admin interface.We have a few companies
> that would love to have the same shop but we can't say that they should
> use it and we can't host them since we have absolutely no way to promis
> them a working product if they in fact try to use our language.
> Since I've seen plenty of perl products that work just fine with non
> iso-8859-1 charsets I'm asking one more time.Can somebody help us?
>
>
>
> --__--__--
>
> Message: 4
> From: "Stefano Nota" <stefano@register.it>
> To: <interchange-users@developer.akopia.com>
> Subject: R: R: [ic] help with locale please
> Date: Mon, 14 May 2001 15:56:49 +0200
> Reply-To: interchange-users@lists.akopia.com
>
> I think that your explanation is rigth.
> But i'm new in using IC so i have some difficulties.
>
> The code you wrote i complete?
> Sholud i change anything?Maybe like field with commen_it.
>
>
> And, it could be used with all fields?
>
> Thanks a lot stefano
>
>
>
>
>
> -----Messaggio originale-----
> Da: interchange-users-admin@developer.akopia.com
> [mailto:interchange-users-admin@developer.akopia.com]Per conto di Stefan
> Hornburg (Racke)
> Inviato: luned́ 14 maggio 2001 14.35
> A: interchange-users@developer.akopia.com
> Oggetto: Re: R: [ic] help with locale please
>
>
> "Stefano Nota" <stefano@register.it> writes:
>
> > Thanks but i can't uderstand what [loc][item-field comment][/loc] do
> > I should manage to make appear a comment of the article in italian if
the
> > langauge is italian and in another language if it is in english
>
> ?? I don't understand your setup. Please explain more thoroughly.
> Maybe you need sth like that.
>
> UserTag language-field Order field code
> UserTag language-field Routine <<EOF
> sub {
> my ($field, $code) = @_;
> my $data;
> my $locale = $Scratch->{mv_locale};
>
> if ($locale) {
> $data = $Tag->data('products',"${field}_$locale",$code);
> return $data if $data =~ /\S/;
> }
> $Tag->data('products',$field,$code);
> }
> EOF
>
> You call this with [language-field comment [item-code]].
>
> Explanation: The language is set to it_IT, so if there is a field
> comment_it_IT with a text for this product, it display this,
> otherwise the contents of the field comment.
>
> Bye
>         Racke
>
> --
> Master of Swiss Web 2001: http://www.zweifel.ch/
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
> --__--__--
>
> Message: 5
> To: interchange-users@developer.akopia.com
> Subject: Re: R: R: [ic] help with locale please
> From: racke@linuxia.de (Stefan Hornburg (Racke))
> Date: 14 May 2001 16:05:12 +0200
> Reply-To: interchange-users@lists.akopia.com
>
> "Stefano Nota" <stefano@register.it> writes:
>
> > I think that your explanation is rigth.
> > But i'm new in using IC so i have some difficulties.
>
> That's naturally.
>
> >
> > The code you wrote i complete?
>
> ??
>
> > Sholud i change anything?Maybe like field with commen_it.
>
> The field names should be comment, comment_it_IT, comment_de_DE
> etc., otherwise the code wouldn't work.
>
> >
> >
> > And, it could be used with all fields?
>
> Yes.
>
> Bye
>         Racke
>
> --
> Master of Swiss Web 2001: http://www.zweifel.ch/
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
>
> --__--__--
>
> Message: 6
> From: "Ben Mirecki" <ben@quadrantfive.com>
> To: <interchange-users@developer.akopia.com>
> Date: Mon, 14 May 2001 10:21:40 -0400
> Subject: [ic] SQL Query in UserTag
> Reply-To: interchange-users@lists.akopia.com
>
> Hi!
>
> I'm trying to create a UserTag that does a field value lookup from an
> arbitrary table. The UserTag will be called from CommonAdjust as part of
the
> pricing method.
>
> Here's the code I have.
>
> UserTag calc_price Order
> UserTag calc_price Routine <<EOR
> sub {
>   my $dbh = $Sql{framestyles};
>   my $sql_query = "SELECT price FROM framestyles WHERE sku = 9848";
>   my $sth = $dbh->prepare($sql_query) or return error_message("Error...");
>   my $rc = $sth->execute() or return HTML("Error...");
>
>   return 0;
> }
> EOR
>
>
> Ignore the return value for now. Simply trying to execute the query, I get
> the following error message:
>
> Runtime error: Can't call method "prepare" on an undefined value at (eval
> 227) line 5.
>
> Any idea why is this happening?
>
> Thanks,
> Ben
>
>
> --__--__--
>
> Message: 7
> From: "Stefano Nota" <stefano@register.it>
> To: <interchange-users@developer.akopia.com>
> Subject: R: R: R: [ic] help with locale please
> Date: Mon, 14 May 2001 16:27:44 +0200
> Reply-To: interchange-users@lists.akopia.com
>
> Something like this is rigth?
>
> UserTag language-field Order field code
> UserTag language-field Routine <<EOF
> sub {
> my ($comment_it_IT, $code) = @_;
> my $data;
> my $locale = $Scratch->{mv_locale};
>
> if ($locale) {
> $data = $Tag->data('products',"${comment_it_IT}_$locale",$code);
> return $data if $data =~ /\S/;
> }
> $Tag->data('products',$comment_it_IT,$code);
> }
> EOF
>
> If i've done errors, could you correct it please?
> It's not so simple, i'm not so expert.
>
> Thanks stefano
>
> -----Messaggio originale-----
> Da: interchange-users-admin@developer.akopia.com
> [mailto:interchange-users-admin@developer.akopia.com]Per conto di Stefan
> Hornburg (Racke)
> Inviato: luned́ 14 maggio 2001 16.05
> A: interchange-users@developer.akopia.com
> Oggetto: Re: R: R: [ic] help with locale please
>
>
> "Stefano Nota" <stefano@register.it> writes:
>
> > I think that your explanation is rigth.
> > But i'm new in using IC so i have some difficulties.
>
> That's naturally.
>
> >
> > The code you wrote i complete?
>
> ??
>
> > Sholud i change anything?Maybe like field with commen_it.
>
> The field names should be comment, comment_it_IT, comment_de_DE
> etc., otherwise the code wouldn't work.
>
> >
> >
> > And, it could be used with all fields?
>
> Yes.
>
> Bye
>         Racke
>
> --
> Master of Swiss Web 2001: http://www.zweifel.ch/
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
> --__--__--
>
> Message: 8
> To: interchange-users@minivend.com
> From: racke@linuxia.de (Stefan Hornburg (Racke))
> Date: 14 May 2001 16:37:57 +0200
> Subject: [ic] Nested loop problem
> Reply-To: interchange-users@lists.akopia.com
>
>
> I have the following code:
>
> [loop prefix=cat
search="st=db/fi=merchandising/tf=featured/rf=featured,sku/un=1/ra=yes"]
> [cat-param featured]<br>
> [loop prefix=comp search="st=db
> fi=merchandising
> sf=featured
> se=[cat-param featured]
> rf=sku"]
> <a href="[comp-param sku]" class="navigationrechts">[field partnumber
[comp-param sku]]</a></br>
> [/loop]
> [/loop]
>
> It works fine but in one the case. If [cat-param featured] contains ",
> the inner loop broke and [loop ...] gets displayed itself.
>
> Anything I can do about it (this is 4.7.latest)
>
> Ciao
>         Racke
>
> --
> Master of Swiss Web 2001: http://www.zweifel.ch/
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
>
> --__--__--
>
> Message: 9
> Date: Mon, 14 May 2001 10:30:51 -0400
> From: David Totten <dstotten@davetotten.com>
> To: interchange-users@developer.akopia.com
> Subject: Re: [ic] SQL Query in UserTag
> Reply-To: interchange-users@lists.akopia.com
>
>
> --V88s5gaDVPzZ0KCq
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Mon, May 14, 2001 at 10:21:40AM -0400, Ben Mirecki wrote:
> > Hi!
> >=20
> > I'm trying to create a UserTag that does a field value lookup from an
> > arbitrary table. The UserTag will be called from CommonAdjust as part of
=
> the
> > pricing method.
>
> I just did this, so perhaps I can help :)
>
> >=20
> > Here's the code I have.
> >=20
> > UserTag calc_price Order
> > UserTag calc_price Routine <<EOR
> > sub {
> >   my $dbh =3D $Sql{framestyles};
> >   my $sql_query =3D "SELECT price FROM framestyles WHERE sku =3D 9848";
> >   my $sth =3D $dbh->prepare($sql_query) or return
error_message("Error...=
> ");
> >   my $rc =3D $sth->execute() or return HTML("Error...");
> >=20
> >   return 0;
> > }
> > EOR
> >=20
>
> You can't access %Sql like that from a usertag. I wrote a small
sub-routine
> to get me a database handle.
>
> my $get_dbh =3D sub {
>       my ($table_name) =3D @_;
>       my $db =3D Vend::Data::database_exists_ref($table_name);
>       return $db->[$Vend::Table::DBI::DBI];
>    };
>
> I define this at the top of my user tag, and then I use it like this:
>
> my $dbh =3D $get_dbh->('database_name');
>
>
> You should now be able to replace your line
>
> my $dbh =3D $Sql{framestyles};
>
> with my line
>
> my $dbh =3D $get_dbh->('framestyles');
>
> and it should work the way you think it will.
>
> --=20
> Start random buzzword text:
> Thus, the product configuration baseline adds overriding performance
constr=
> aints to gain the full benefts of the client-server archetecture.=20
>
> --V88s5gaDVPzZ0KCq
> Content-Type: application/pgp-signature
> Content-Disposition: inline
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE6/+wb6NZLqYh7hkwRAqNpAJ42DH+nQ3CneWVcemzlfGw+4YqUDACghlnb
> K3ayEnwlV/p7xAcuX/1UxMc=
> =K7jM
> -----END PGP SIGNATURE-----
>
> --V88s5gaDVPzZ0KCq--
>
> --__--__--
>
> Message: 10
> To: interchange-users@developer.akopia.com
> Subject: Re: R: R: R: [ic] help with locale please
> From: racke@linuxia.de (Stefan Hornburg (Racke))
> Date: 14 May 2001 16:49:15 +0200
> Reply-To: interchange-users@lists.akopia.com
>
> "Stefano Nota" <stefano@register.it> writes:
>
> > Something like this is rigth?
> >
> > UserTag language-field Order field code
> > UserTag language-field Routine <<EOF
> > sub {
> > my ($comment_it_IT, $code) = @_;
> > my $data;
> > my $locale = $Scratch->{mv_locale};
> >
> > if ($locale) {
> > $data = $Tag->data('products',"${comment_it_IT}_$locale",$code);
> > return $data if $data =~ /\S/;
> > }
> > $Tag->data('products',$comment_it_IT,$code);
> > }
> > EOF
> >
> > If i've done errors, could you correct it please?
> > It's not so simple, i'm not so expert.
>
> No, I think this leads into the wrong direction. Lets start with the
> database setup, then we talk about applying this function.
>
> I assume you have something like that as products database:
>
> sku    comment          comment_it_IT           whatever whatever_it_IT
> 11111  English Comment  Commentare Italiano     Bye      Ciao
>
> Now, if you use my original function and
>
> [language-field comment [item-code]]
>
> resp.
>
> [language-field whatever [item-code]]
>
> You get the text of comment_it_IT resp. whatever_it_IT if the selected
> language is it_IT, otherwise the text from comment resp. whatever.
>
> Bye
>         Racke
>
> --
> Master of Swiss Web 2001: http://www.zweifel.ch/
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
>
> --__--__--
>
> Message: 11
> To: interchange-users@developer.akopia.com
> Subject: Re: [ic] SQL Query in UserTag
> From: bill@worldwideimpact.com
> Date: Mon, 14 May 2001 11:02:09 -0400
> Reply-To: interchange-users@lists.akopia.com
>
> Try this to get a handle on your database:
>
>         my $db = &Vend::Data::database_exists_ref('framestyles');
>         my $dbh = $db->[$Vend::Table::DBI::DBI];
>         unless ($dbh) {
>           &Log("Unable to get DB handle framestyles: $!\n");
>           return;
>         }
>
>
> Bill Carr
> Worldwide Impact
> bill@worldwideimpact.com
> 413.253.6700
>
>
>
>
> "Ben Mirecki" <ben@quadrantfive.com>
> Sent by: interchange-users-admin@developer.akopia.com
> 05/14/2001 10:21 AM
> Please respond to interchange-users
>
>
>         To:     <interchange-users@developer.akopia.com>
>         cc:
>         Subject:        [ic] SQL Query in UserTag
>
>
> Hi!
>
> I'm trying to create a UserTag that does a field value lookup from an
> arbitrary table. The UserTag will be called from CommonAdjust as part of
> the
> pricing method.
>
> Here's the code I have.
>
> UserTag calc_price Order
> UserTag calc_price Routine <<EOR
> sub {
>   my $dbh = $Sql{framestyles};
>   my $sql_query = "SELECT price FROM framestyles WHERE sku = 9848";
>   my $sth = $dbh->prepare($sql_query) or return error_message("Error...");
>   my $rc = $sth->execute() or return HTML("Error...");
>
>   return 0;
> }
> EOR
>
>
> Ignore the return value for now. Simply trying to execute the query, I get
> the following error message:
>
> Runtime error: Can't call method "prepare" on an undefined value at (eval
> 227) line 5.
>
> Any idea why is this happening?
>
> Thanks,
> Ben
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
>
>
>
> --__--__--
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
> End of Interchange-users Digest
>