[ic] Weight Priceing

Ramana ramana@myweb.com.my
Thu, 15 Mar 2001 16:23:29 +0800


Hi,

Can any body help me out, how I can do "Weight Priceing" insted of quantity
priceing?

Txs in advance




----- Original Message -----
From: <interchange-users-admin@lists.akopia.com>
To: <interchange-users@lists.akopia.com>
Sent: Thursday, March 15, 2001 2:48 AM
Subject: Interchange-users digest, Vol 1 #361 - 18 msgs


>
> Send Interchange-users mailing list submissions to
> interchange-users@lists.akopia.com
>
> To subscribe or unsubscribe via the 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. connecting to sybase (Klaus Koch)
>   2. Delete row (Kohegyi Tamas (LMF))
>   3. Delete row (tamas.kohegyi@unforgettable.com)
>   4. Re: format array value (Mark Johnson)
>   5. Re: Basket content (Mark Johnson)
>   6. [repost] per item shipping cost schedule (Guido Sohne)
>   7. Re: connecting to sybase (Mark Johnson)
>   8. Re: Simple Question.... (Rick Lord)
>   9. PGP ... Implementation Documentation (Christopher VanOosterhout)
>   10. shipping voo-doo challenge question (Mark Stosberg)
>   11. need help with acl for soft goods purchasing (Mark Stosberg)
>   12. Re: Delete row (Ed LaFrance)
>   13. RE: connecting to sybase (Andreas, Scott)
>   14. Authorize Net... (Dan McFarland)
>   15. Re: Authorize Net... (Bill Shupp)
>   16. Quantities (Dylan Oliver)
>   17. Re: Quantities (Bob Puff@NLE)
>   18. Re: Quantities (Ed LaFrance)
>
> --__--__--
>
> Message: 1
> Date: Wed, 14 Mar 2001 15:13:28 +0100 (MET)
> Reply-To: kkoch@kxsu.de
> From: Klaus Koch <kkoch@kxsu.de>
> To: interchange-users@lists.akopia.com
> Subject: [ic] connecting to sybase
> Reply-To: interchange-users@lists.akopia.com
>
> hello!
>
> i have to switch a running shop from mysql to sybase anywhere studio.
> i installed the ASAny DBI driver and i am able to connect with a perl
> script and recieve data (i copied this script to the end of this mail).
>
> the running sybase server is named cc-shop and the database is called
> cshop.
>
> but i cant figure out how to connect with the shop to the new database
> i tried this (and many similar) configuration:
>
> Database            products products dbi:ASAny:cshop
> Database            products    USER    ic
> Database            products    PASS    123456
> Database            products    ENG     cc-shop
>
> i dont know if i can pass ENG simply like this (compare perlscript).
>
> please, can someone who works with a sybase server help me? i just dont
> know what to do now...
>
> many thanks in advance!
>
> klaus
>
>
> this is the perl script which recieves data from the database:
>
> #!/usr/bin/perl -w
> use DBI;
> use strict;
> my($database) = "CSHOP";
> my($data_source) = "DBI:ASAny:$database";
> my($username) = "UID=ic;PWD=123456;ENG=cc-shop";
> my($sel_statement) = "SELECT code,searchspec,ref01 FROM artikel";
> my($dbh) = &db_connect($data_source, $username, '');
> &db_query($sel_statement,$dbh);
> $dbh->disconnect;
> exit(0);
>
> sub db_connect {
>         my($source,$user,$pass) = @_;
>         my($dbh) = DBI->connect($source, $user, $pass);
>         return($dbh);
> }
>
> sub db_query {
>         my($sel,$h) = @_;
>         my($row,$sth) = undef;
>         $sth = $h->prepare($sel);
>         $sth->execute;
>         print "Names:      @{$sth->{NAME}}\n";
>         print "Fields:     $sth->{NUM_OF_FIELDS}\n";
>         print "Params:     $sth->{NUM_OF_PARAMS}\n";
>         print "\nFirst Name\tLast_name\tTitle\n";
>         while($row = $sth->fetch) {
>            print "@$row[0]\t@$row[1]\t\t@$row[2]\n";
>         }
>         $sth->finish;
> }
> __END__
>
>
> --__--__--
>
> Message: 2
> From: Kohegyi Tamas (LMF) <tamas.kohegyi@lmf.ericsson.se>
> Date: Wed, 14 Mar 2001 16:28:00 +0200
> charset="iso-8859-1"
> To: interchange-users@lists.akopia.com
> Subject: [ic] Delete row
> Reply-To: interchange-users@lists.akopia.com
>
> Hi all,
>
> Can anybody give me an example how to delete a specific row of a specific
table?
> In SQL it would be like DELETE FROM TABLENAME WHERE COLUMNNAME="x";
> But what should I do in [ic] and using non-sql-based table (gdbm)?
>
> I tried:
> [sql interpolate=1]delete from mytable where id="[value em_id]" and
username="[data session username]"[/sql]
> but nothing happened. (Also no error message in error.log)
>
> Thanks,
> Tamas
>
> --__--__--
>
> Message: 3
> From: tamas.kohegyi@unforgettable.com
> Date: Wed, 14 Mar 2001 16:29:31 +0200
> charset="iso-8859-1"
> To: interchange-users@lists.akopia.com
> Subject: [ic] Delete row
> Reply-To: interchange-users@lists.akopia.com
>
> Hi all,
>
> Can anybody give me an example how to delete a specific row of a specific
table?
> In SQL it would be like DELETE FROM TABLENAME WHERE COLUMNNAME="x";
> But what should I do in [ic] and using non-sql-based table (gdbm)?
>
> I tried:
> [sql interpolate=1]delete from mytable where id="[value em_id]" and
username="[data session username]"[/sql]
> but nothing happened. (Also no error message in error.log)
>
> Thanks,
> Tamas
>
> --__--__--
>
> Message: 4
> Date: Wed, 14 Mar 2001 09:44:03 -0500
> From: Mark Johnson <markj@redhat.com>
> Organization: Red Hat E-Business Solutions
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] format array value
> Reply-To: interchange-users@lists.akopia.com
>
> Mathew Jones wrote:
> >
> > The results of an sql query are returned to @$resultsetfinal. What i
> > would like to do is remove any price formating from the 3rd value within
> > the array for each record e.g  s/\$//;
> > and write that new format back into the value of the 3rd array element,
> > so that when I use @$resultsetfinal again  to sort by price there is no
> > unneccesary formating there.
> > Your help is appreciated...
> >
>
> I would look for a way to remove it from the query first, assuming your
> SQL engine handles substrings in some way *and* your formatting is
> consistent (which, frankly, is essential to good db management).
> Something like:
>
> SELECT substr(column, 2, length ( column ) - 1 ) as sort_price....
>
> The syntax will heavily depend on your particular db.
>
> However, if this isn't an option, or your data are inconsistent, you can
> do it in Perl:
>
> foreach (@$resultsetfinal) {
>    $_->[2] =~ s/\$//g;
> }
>
> Perl is also pretty magical, and it wouldn't surprise me a bit to find
> that it would perform a numeric sort by simply ignoring your non-numeric
> $ signs, etc.
>
> --
> Mark Johnson
> Senior Developer - Professional Services
> Red Hat, Inc.
> E-Business Solutions
> markj@redhat.com
> 703-456-2912
>
> --__--__--
>
> Message: 5
> Date: Wed, 14 Mar 2001 09:45:50 -0500
> From: Mark Johnson <markj@redhat.com>
> Organization: Red Hat E-Business Solutions
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] Basket content
> Reply-To: interchange-users@lists.akopia.com
>
> Sergey Sheykin wrote:
> >
> > How can I manually erease shopping cart content?
>
> mv_action=cancel
>
> --
> Mark Johnson
> Senior Developer - Professional Services
> Red Hat, Inc.
> E-Business Solutions
> markj@redhat.com
> 703-456-2912
>
> --__--__--
>
> Message: 6
> Date: Wed, 14 Mar 2001 06:47:19 -0800 (PST)
> From: Guido Sohne <caught_one@yahoo.com>
> To: interchange-users@lists.akopia.com
> Subject: [ic] [repost] per item shipping cost schedule
> Reply-To: interchange-users@lists.akopia.com
>
> I posted earlier on a shipping problem I was having and was basically
> told
> to either
>
> 1) Iterate over the cart items in Perl and watch the sun rising ... :-)
> 2) Or use an add-on product called shipd ...
>
> I opted for 'roll-your-own' :-) and am being rolled over by a steam
> roller.
>
> I'm trying to calculate shipping for a set of items in a shopping cart.
> Each item could potentially have its own shipping method.
>
> This is intended to allow for widely varying types of goods. For
> example,
> shipping iron rods is different from shipping jewelry, yet both can be
> bought
> at the same time.
>
> As far as I am aware, Interchange calculates shipping based on the
> aggregate
> weight/quantity of the items in a cart by applying a data table to this
>
> aggregate quantity. We're shipping based on weight.
>
> I've identified a strategy which seems workable except I do not know
> all
> the steps needed to achieve it.
>
> 1) Add a field to products database called ship. This field is the
> class
> of shipping (ie. the data table to be applied to this product)
>
> 2) Define tags that are used with [item-list] to be used as below:-
>
> ([]'s shifted around for clarity)
>
> [reset-shipping]
> [item-list]
> [add-to-shipping
> shipmode="[item-field ship]"
> weight="[item-field weight]"
> quantity="[item-quantity]"
> ]
> [/item-list]
> [calculate-shipping-to "New Jersey"]
>
>
> 3) These UserTags go into the catalog.cfg for the store.
>
> This UserTag resets all shipping values to zero and should
> be used each time one is going to do something related to
> calculating shipping.
>
> UserTag reset-shipping Routine <<EOR
> sub { $Vend::Session->{SendToAfrica} = undef; return ""; }
> EOR
>
> This UserTag sorts the products into bins according to shipping class
> and calculates the aggregate weight for each bin.
>
> UserTag add-to-shipping Order shipmode weight quantity
> UserTag add-to-shipping Routine <<EOR
> sub {
>         my ($shipmode,$weight,$quantity) = @_;
>         $Vend::Session->{SendToAfrica}{$shipmode} += $weight *
> $quantity;
>         return "";
> }
> EOR
>
> This UserTag is supposed to apply a data table used in regular
> Interchange
> shipping to each bin. If the bin are called '1', '2' and '3', and we
> are
> shipping to 'USA', then this UserTag should apply data table USA1 to
> the
> aggregate weight of items in bin '1'; apply data table USA2 to the
> aggregate weight of items in bin '2' etc.
>
> I'm setting $::Values->{mv_shipmode} to the concatenation of the
> shipping
> destination and the shipping class. That would make data table 'USA1'
> apply
> to destination 'USA' and shipping class '1'.
>
> Now I want to call an Interchange function, telling it to calculate
> shipping
> for the items in bin '1' for destination 'USA'. From looking at the
> source
> code for sub shipping in Interpolate.pm, I guess the next step is to
> create
> a cart for each bin, put all items in the bin into the cart.
>
> I'm having problems trying to work out how to do the
> calculate-shipping-to
> UserTag properly. This code doesn't work ... and I need help with it
> especially
> as this is my first descent into the Perl side of developing with
> Interchange.
>
> Any ideas ? This would be much easier if Interchange had API level
> documentation. If something like that exists, please let me know !!!!
>
> I'm tearing my hair out trying to grok this Perl :) it's too
> elite for me, maybe ... Maybe ?!?
>
> UserTag calculate-shipping-to Order region
> UserTag calculate-shipping-to Routine <<EOR
> sub {
>         my $region = shift;
>         my $method = undef;
>         my $cat = undef;
>         my $total = undef;
>
>         foreach $cat (keys %{$Vend::Session->{SendToAfrica}}) {
>                 # TODO: from region get shipping data table
>                 # this is done by setting mv_shipmode
>                 $::Values->{mv_shipmode} = $region . $cat;
>
>                 print $Vend::Interpolate::shipping($region . $cat);
>                 # TODO: use mv_shipmode on category weight
>                 $total += $Vend::Session->{SendToAfrica}{$cat};
>         }
>         return "$total";
> }
> EOR
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> --__--__--
>
> Message: 7
> Date: Wed, 14 Mar 2001 10:03:29 -0500
> From: Mark Johnson <markj@redhat.com>
> Organization: Red Hat E-Business Solutions
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] connecting to sybase
> Reply-To: interchange-users@lists.akopia.com
>
> I would guess that the actual connect call looks something like this:
>
> DBI->connect(SQLDSN,SQLUSER,SQLPASS);
>
> Given that, I would "try"
>
> SQLDSN  "DBI:ASAny:CSHOP"
> SQLUSER  "UID=ic;PWD=123456;ENG=cc-shop"
> SQLPASS
>
> Another possibility would be adding the ENG directive to SQLDSN:
>
> DBI:ASAny:CSHOP;ENG=cc-shop
>
> Or, scour the man page for DBD::ASAny for alternative syntax.
>
> Good luck!
>
>
> Klaus Koch wrote:
> >
> > hello!
> >
> > i have to switch a running shop from mysql to sybase anywhere studio.
> > i installed the ASAny DBI driver and i am able to connect with a perl
> > script and recieve data (i copied this script to the end of this mail).
> >
> > the running sybase server is named cc-shop and the database is called
> > cshop.
> >
> > but i cant figure out how to connect with the shop to the new database
> > i tried this (and many similar) configuration:
> >
> > Database            products products dbi:ASAny:cshop
> > Database            products    USER    ic
> > Database            products    PASS    123456
> > Database            products    ENG     cc-shop
> >
> > i dont know if i can pass ENG simply like this (compare perlscript).
> >
> > please, can someone who works with a sybase server help me? i just dont
> > know what to do now...
> >
> > many thanks in advance!
> >
> > klaus
> >
> > this is the perl script which recieves data from the database:
> >
> > #!/usr/bin/perl -w
> > use DBI;
> > use strict;
> > my($database) = "CSHOP";
> > my($data_source) = "DBI:ASAny:$database";
> > my($username) = "UID=ic;PWD=123456;ENG=cc-shop";
> > my($sel_statement) = "SELECT code,searchspec,ref01 FROM artikel";
> > my($dbh) = &db_connect($data_source, $username, '');
> > &db_query($sel_statement,$dbh);
> > $dbh->disconnect;
> > exit(0);
> >
> > sub db_connect {
> >         my($source,$user,$pass) = @_;
> >         my($dbh) = DBI->connect($source, $user, $pass);
> >         return($dbh);
> > }
> >
> > sub db_query {
> >         my($sel,$h) = @_;
> >         my($row,$sth) = undef;
> >         $sth = $h->prepare($sel);
> >         $sth->execute;
> >         print "Names:      @{$sth->{NAME}}\n";
> >         print "Fields:     $sth->{NUM_OF_FIELDS}\n";
> >         print "Params:     $sth->{NUM_OF_PARAMS}\n";
> >         print "\nFirst Name\tLast_name\tTitle\n";
> >         while($row = $sth->fetch) {
> >            print "@$row[0]\t@$row[1]\t\t@$row[2]\n";
> >         }
> >         $sth->finish;
> > }
> > __END__
> >
> > _______________________________________________
> > Interchange-users mailing list
> > Interchange-users@lists.akopia.com
> > http://lists.akopia.com/mailman/listinfo/interchange-users
>
> --
> Mark Johnson
> Senior Developer - Professional Services
> Red Hat, Inc.
> E-Business Solutions
> markj@redhat.com
> 703-456-2912
>
> --__--__--
>
> Message: 8
> Date: Wed, 14 Mar 2001 08:28:33 -0700
> From: Rick Lord <rick@desertlord.com>
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] Simple Question....
>
> It seems to me that many people have this problem, including myself.
> Does anyone have any answers?
> Thanks.
>
> Jack Lauman wrote:
> >
> > How do you disable shipping?
> >
> > How do you disable inventory?
> >
> > When processing an order for a non-inventory soft product I get the
> > error: "NOTE: Nothing to ship!" and of course it won't complete the
> > transaction.
> >
> > Jack
> >
> > _______________________________________________
> > Interchange-users mailing list
> > Interchange-users@lists.akopia.com
> > http://lists.akopia.com/mailman/listinfo/interchange-users
>
> --
> Rick Lord
> Desert Lord Enterprises
> http://www.desertlord.com/
> http://www.KitKar.com/
> http://www.NavySealsWatches.com/
>
>
> --__--__--
>
> Message: 9
> Date: Wed, 14 Mar 2001 11:16:46 -0500
> To: interchange-users@lists.akopia.com
> From: Christopher VanOosterhout <chris@vanoosterhout.com>
> Subject: [ic] PGP ... Implementation Documentation
>
>
> Greetings All,
>
> Things are progressing real well but I am having a bit of trouble figuring
> out just how to bring PGP and Interchange together.
>
> I have looked through the online documentation and mailing list archives
> and do not find just what I am looking for.  If I did miss it, please be
so
> kind to point me in the right direction.
>
> Here is what I would like to do.
>
> I would like to take my order file and encrypt it with PGP before it is
> emailed to my order desk.  I have PGP installed on my machine.
>
> How do I tell Interchange to start encrypting orders?
>
> Thanks,
>
> Christopher Van Oosterhout
>
>
>
>
>
>
> --__--__--
>
> Message: 10
> Date: Wed, 14 Mar 2001 11:34:59 -0500
> From: Mark Stosberg <mark@summersault.com>
> Reply-To: mark@summersault.com
> Organization: Summersault
> To: interchange-users@lists.akopia.com
> Subject: [ic] shipping voo-doo challenge question
>
>
> Hello!
>
>   After reviewing the IC docs on setting up shipping schemes several
> times, it still seems somewhat like voodoo to me. So I have extra
> respect for anyone who can help me implement the following shipping
> logic in Interchange:
>
> " Use a flat rate shipping price based on quantity with price breaks at
> 1 and 10, but exclude any items in the quantity count that have a true
> value in the 'download' column in the products table".
>
> I had the basic price point structure set up, but adding in the
> exception for soft goods (which don't effect the shipping charge), has
> thrown me for a loop.
>
> Perhaps related: In the simple demo of Interchange, there doesn't appear
> to be a mention of handling soft goods in the shipping table, but I
> assume they are not being charged for shipping. How is shipping being
> handled for those items?
>
> Thanks!
>
>    -mark
>
> personal website             }      Summersault Website Development
> http://mark.stosberg.com/    {      http://www.summersault.com/
>
> --__--__--
>
> Message: 11
> Date: Wed, 14 Mar 2001 11:35:16 -0500
> From: Mark Stosberg <mark@summersault.com>
> Reply-To: mark@summersault.com
> Organization: Summersault
> To: interchange-users@lists.akopia.com
> Subject: [ic] need help with acl for soft goods purchasing
>
>
> Hello!
>
>     I'm working on getting soft goods downloading working with Minivend
> 4.04a and have progressed a bit. I believe I'm currently getting stuck
> with a problem related to the "ACL" permissions of the file. I'm getting
> back the error:
> "Sorry, not authorized for PDF1. Buy it first, please."
>
> Any help in this area would be appreciated.  The pertinent details are
> below.
>
>  On the receipt page, I have code that trys to have the logic of:
>
> " for each downloadable file, set it's expiration date to 7 days, and
> return a return a link
> to where it can be downloaded"
>
> [set download_present][/set]
> [item-list]
> [if-item-field dl_location]
> [set download_present]1[/set]
> [userdb
> function=set_file_acl
> mode="expire 7 days"
> location="[item-code]"
> ]
>       [calc] my $save = delete $Scratch->{mv_add_dot_html}; [/calc]
> <BR><A HREF=[area href="deliver/[item-field dl_location]"
> arg=[item-field code]]download</A>
> [calc] $Scratch->{mv_add_dot_html} = $save if $save;[/calc]
> [/if-item-field]
>
> ######################################
>
> I'm keeping the files in the pages/deliver directory
> and I'm using the standard "deliver.html" page delivered with Minivend.
> In Catalog.cfg, I have these related Variables:
>
> # Add some variables that might help with Soft Goods downloading
> Variable   MV_USERDB_ACL_TABLE  userdb
> Variable   MV_USERDB_ACL_COLUMN acl
>
> The "acl" column did not appear in the userdb.txt file, so I added it.
>
> This also appears to use the "deliver" ActionMap, which was already
> defined in Catalog.cfg.
>
> I tried creating a zero byte ".access" file in the deliver directory,
> but I got a different error: "You must be logged in to view this page".
> Although I expect the user to have a session, our scheme doesn't require
> them to be logged in.
>
> Thanks!
>
>    -mark
>
> personal website             }      Summersault Website Development
> http://mark.stosberg.com/    {      http://www.summersault.com/
>
> --__--__--
>
> Message: 12
> Date: Wed, 14 Mar 2001 08:38:44 -0800
> To: interchange-users@lists.akopia.com
> From: Ed LaFrance <edl@newmediaems.com>
> Subject: Re: [ic] Delete row
>
> At 04:29 PM 03/14/2001 +0200, you wrote:
> >Hi all,
> >
> >Can anybody give me an example how to delete a specific row of a specific
> >table?
> >In SQL it would be like DELETE FROM TABLENAME WHERE COLUMNNAME="x";
> >But what should I do in [ic] and using non-sql-based table (gdbm)?
> >
> >I tried:
> >[sql interpolate=1]delete from mytable where id="[value em_id]" and
> >username="[data session username]"[/sql]
> >but nothing happened. (Also no error message in error.log)
> >
>
> Here is a Usertag from (from Mike Heins, I believe), orginally for earlier
> Minivend versions, but it may work in Interchange, though some tweaking
> could be necessary:
>
>
> #To use it as a tag:
> #
> # [tag flag write]products[/tag]
> # [delete_record table="products" key="00-0011a"]
> #
> #I will leave the production of a subroutine as an exercise for
> #the reader.
> #
> #Of course [tag flag write] must be at the top of the page. And of
> #course this won't work with the old parser.
> #
> #If you want to update the ASCII source file, of course:
> #
> # [tag export products][/tag]
> ################################################################
>
> UserTag delete_record Order table key
> UserTag delete_record PosNumber 2
> UserTag delete_record Routine <<EOR
> sub {
>   my ($table, $key) = @_;
>   return "Delete-record requires all information" unless $table and $key;
>   my $db = Vend::Data::database_exists_ref($table) or return "Bad table
> '$table'.";
>   $db = $db->ref();
>   $db->record_exists($key) or return "No key '$key' in table '$table'.";
>   return $db->delete_record($key);
> }
> EOR
>
>
> - Ed L.
>
>
>
> ===============================================================
> **** Virtual Hosting w/private IC Installation, $65/month! ****
> ---------------------------------------------------------------
> New Media E.M.S.               Software Solutions for Business
> 463 Main St., Suite D          eCommerce | Consulting | Hosting
> Placerville, CA  95667         edl@newmediaems.com
> (530) 622-9421                 http://www.newmediaems.com
> (866) 519-4680 Toll-Free       (530) 622-9426 Fax
> ===============================================================
>
>
> --__--__--
>
> Message: 13
> From: "Andreas, Scott" <Scott.Andreas@learningco.com>
> To: "'interchange-users@lists.akopia.com'"
> <interchange-users@lists.akopia.com>
> Subject: RE: [ic] connecting to sybase
> Date: Wed, 14 Mar 2001 08:42:09 -0800
> charset="iso-8859-1"
>
> If you have IC version 4.6.X look under Administraion -> info and under
> Database Information if you see your DBI listed, IC can connect using that
> interface. Of course you need to declare your products database  in IC to
> use your dbi interface.
>
> If it not listed there, install that module within the interchange
> directory, then restart the server.
>
> Other opotions are to install the dbi::sybase perl module Or, the one that
> I'm looking at that has cross compatability with  Microsoft SQL serve,
since
> both Sybase and Microsoft SQL Servers use Tabular Data Streams, is
> dbi::freeTDS.
>
> good luck.
>
> -----Original Message-----
> From: interchange-users-admin@lists.akopia.com
> [mailto:interchange-users-admin@lists.akopia.com]On Behalf Of Klaus Koch
> Sent: Wednesday, March 14, 2001 6:13 AM
> To: interchange-users@lists.akopia.com
> Subject: [ic] connecting to sybase
>
>
> hello!
>
> i have to switch a running shop from mysql to sybase anywhere studio.
> i installed the ASAny DBI driver and i am able to connect with a perl
> script and recieve data (i copied this script to the end of this mail).
>
> the running sybase server is named cc-shop and the database is called
> cshop.
>
> but i cant figure out how to connect with the shop to the new database
> i tried this (and many similar) configuration:
>
> Database            products products dbi:ASAny:cshop
> Database            products    USER    ic
> Database            products    PASS    123456
> Database            products    ENG     cc-shop
>
> i dont know if i can pass ENG simply like this (compare perlscript).
>
> please, can someone who works with a sybase server help me? i just dont
> know what to do now...
>
> many thanks in advance!
>
> klaus
>
>
> this is the perl script which recieves data from the database:
>
> #!/usr/bin/perl -w
> use DBI;
> use strict;
> my($database) = "CSHOP";
> my($data_source) = "DBI:ASAny:$database";
> my($username) = "UID=ic;PWD=123456;ENG=cc-shop";
> my($sel_statement) = "SELECT code,searchspec,ref01 FROM artikel";
> my($dbh) = &db_connect($data_source, $username, '');
> &db_query($sel_statement,$dbh);
> $dbh->disconnect;
> exit(0);
>
> sub db_connect {
>         my($source,$user,$pass) = @_;
>         my($dbh) = DBI->connect($source, $user, $pass);
>         return($dbh);
> }
>
> sub db_query {
>         my($sel,$h) = @_;
>         my($row,$sth) = undef;
>         $sth = $h->prepare($sel);
>         $sth->execute;
>         print "Names:      @{$sth->{NAME}}\n";
>         print "Fields:     $sth->{NUM_OF_FIELDS}\n";
>         print "Params:     $sth->{NUM_OF_PARAMS}\n";
>         print "\nFirst Name\tLast_name\tTitle\n";
>         while($row = $sth->fetch) {
>            print "@$row[0]\t@$row[1]\t\t@$row[2]\n";
>         }
>         $sth->finish;
> }
> __END__
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
> --__--__--
>
> Message: 14
> From: "Dan McFarland" <dan@mailturtle.com>
> To: <interchange-users@lists.akopia.com>
> Date: Wed, 14 Mar 2001 11:26:47 -0600
> charset="iso-8859-1"
> Subject: [ic] Authorize Net...
>
> Can someone send me the details about getting Interchange to work
real-tine
> with authorize net?
>
> Thanks!
>
>
>
>
> --__--__--
>
> Message: 15
> Date: Wed, 14 Mar 2001 11:36:58 -0600
> Subject: Re: [ic] Authorize Net...
> From: Bill Shupp <hostmaster@shupp.org>
> To: <interchange-users@lists.akopia.com>
>
> on 3/14/01 11:26 AM, Dan McFarland at dan@mailturtle.com wrote:
>
> > Can someone send me the details about getting Interchange to work
real-tine
> > with authorize net?
>
> And me as well!
>
> Thanks,
>
> Bill Shupp
>
>
> --__--__--
>
> Message: 16
> charset="iso-8859-1"
> From: Dylan Oliver <doliver@hampshire.edu>
> Organization: Global View International
> To: interchange-users@lists.akopia.com
> Date: Wed, 14 Mar 2001 12:33:02 -0600
> Subject: [ic] Quantities
> Reply-To: interchange-users@lists.akopia.com
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> As I've been working on the ord/basket.html page, I've noticed that each
> refresh adds another item to my basket. Which makes sense, as the url I
used
> to get to the page includes "&mv_order_item=gvah18". However, instead of
> adding to the quantity of one item in the basket, each refresh adds a
whole
> 'nother item, like so:
>
> 1  Rajasthan Painted Table   $215.00  $215.00
>
> 1  Rajasthan Painted Table   $215.00  $215.00
>
> 1  Rajasthan Painted Table   $215.00  $215.00
>
> instead of:
>
> 3  Rajasthan Painted Table  $215.00   $645.00
>
> This seems like a bug to me; how can I get around it?
>
> Dylan Oliver
>    http://stout.hampshire.edu/~dao99
> Global View International
>    http://www.globalview-intl.com
> Do you know how little you know?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iEYEARECAAYFAjqvuV4ACgkQ7U8r0TCZf4H69wCdFMXR8+LITpeE+c0OOcrijRK4
> WWkAn1e/Bts+6qQDf4WrB6/wVNH0M5+9
> =R1l6
> -----END PGP SIGNATURE-----
>
> --__--__--
>
> Message: 17
> Date: Wed, 14 Mar 2001 13:28:53 -0500
> From: "Bob Puff@NLE" <bob@nleaudio.com>
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] Quantities
> Reply-To: interchange-users@lists.akopia.com
>
> I've noticed this same thing happens if you go an order two of the same
item separately - it doesn't see that the item is already in the basket, and
just bump up the quantity.  Would be nice if this did this.
>
> BOb
>
>
> Dylan Oliver wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > As I've been working on the ord/basket.html page, I've noticed that each
> > refresh adds another item to my basket. Which makes sense, as the url I
used
> > to get to the page includes "&mv_order_item=gvah18". However, instead of
> > adding to the quantity of one item in the basket, each refresh adds a
whole
> > 'nother item, like so:
> >
> > 1  Rajasthan Painted Table   $215.00  $215.00
> >
> > 1  Rajasthan Painted Table   $215.00  $215.00
> >
> > 1  Rajasthan Painted Table   $215.00  $215.00
> >
> > instead of:
> >
> > 3  Rajasthan Painted Table  $215.00   $645.00
> >
> > This seems like a bug to me; how can I get around it?
> >
> > Dylan Oliver
> >    http://stout.hampshire.edu/~dao99
> > Global View International
> >    http://www.globalview-intl.com
> > Do you know how little you know?
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.4 (GNU/Linux)
> > Comment: For info see http://www.gnupg.org
> >
> > iEYEARECAAYFAjqvuV4ACgkQ7U8r0TCZf4H69wCdFMXR8+LITpeE+c0OOcrijRK4
> > WWkAn1e/Bts+6qQDf4WrB6/wVNH0M5+9
> > =R1l6
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Interchange-users mailing list
> > Interchange-users@lists.akopia.com
> > http://lists.akopia.com/mailman/listinfo/interchange-users
>
> --__--__--
>
> Message: 18
> Date: Wed, 14 Mar 2001 10:49:48 -0800
> To: interchange-users@lists.akopia.com
> From: Ed LaFrance <edl@newmediaems.com>
> Subject: Re: [ic] Quantities
> Reply-To: interchange-users@lists.akopia.com
>
> At 12:33 PM 03/14/2001 -0600, you wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Hi,
> >
> >As I've been working on the ord/basket.html page, I've noticed that each
> >refresh adds another item to my basket. Which makes sense, as the url I
used
> >to get to the page includes "&mv_order_item=gvah18". However, instead of
> >adding to the quantity of one item in the basket, each refresh adds a
whole
> >'nother item, like so:
> >
> >1  Rajasthan Painted Table   $215.00  $215.00
> >
> >1  Rajasthan Painted Table   $215.00  $215.00
> >
> >1  Rajasthan Painted Table   $215.00  $215.00
> >
> >instead of:
> >
> >3  Rajasthan Painted Table  $215.00   $645.00
> >
> >This seems like a bug to me; how can I get around it?
> >
>
> The catalog.cfg directive which controls this is SeparateItems, and it is
> well-documented.
>
> - Ed L.
>
>
>
>
> ===============================================================
> **** Virtual Hosting w/private IC Installation, $65/month! ****
> ---------------------------------------------------------------
> New Media E.M.S.               Software Solutions for Business
> 463 Main St., Suite D          eCommerce | Consulting | Hosting
> Placerville, CA  95667         edl@newmediaems.com
> (530) 622-9421                 http://www.newmediaems.com
> (866) 519-4680 Toll-Free       (530) 622-9426 Fax
> ===============================================================
>
>
>
>
> --__--__--
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
> End of Interchange-users Digest
>