MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Free Catalog As Default



******    message to minivend-users from Larry Leszczynski <larryl@furph.com>     ******

Hi Ven -

> I am looking on a way/method to put a default item (in this case a 
> catalog) in every shopper's basket. Even if they don't order 
> anything. Just have it show up.

You could put something like this at the top of ord/basket.html and
ord/checkout.html:

 [perl arg="carts"]
    my $code = '123-ABC';   # item code for catalog
    my $db   = 'products';  # database file containing $code

    my $found = 0;
    foreach my $item ( @{$Safe{'carts'}->{'main'}} ) {
       if ( $item->{code} eq $code ) {
          $found = 1;
          last;
       }
    }
    unless ( $found ) {
       push @{$Safe{'carts'}->{'main'}}, { 'code'     => $code,
                                           'quantity' => 1,
                                           'mv_ib'    => $db };
    }
    '';
 [/perl]


Larry Leszczynski
larryl@furph.com
--
  furph, Inc.	WWW/Unix/Windows Solutions	734-513-7763 (voice)
info@furph.com	   http://www.furph.com		734-513-7759 (FAX)

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: