[ic] Specify the URL to append before the product sku?

Kevin Walsh interchange-users@interchange.redhat.com
Fri Apr 12 04:26:01 2002


> I'd like to be able to call a url like the following:
> http://wwww.yourdomain.com/cgi-bin/yourstore/products/00001.html and
> have IC generate the product page based on the flypage like it does
> normally.  The only difference being that all products would be pulled
> up in the products directory and not from the base pages directory.  Is
> there a configuration directive to do such a thing?  The reason for this
> is we are going to use a search product which allows for parts of the
> site to be part of a group based on matching on the url.  We'd like to
> have product grouping, information grouping, company information, etc.
> 
You could create an ActionMap to map "products/sku.html" onto
"my_flypage.html?arg=sku".  Try adding something like this to
your catalog.cfg file:

    ActionMap products <<EOA
    sub {
        $Session->{arg} = shift;
        $Session->{arg} =~ s/^.*\/|\..*$//g;
        $CGI->{mv_nextpage} = 'my_flypage';
        1;
    }
    EOA

You would then need to copy your current flypage.html to a new
my_flypage.html page and add [fly-list]...[/fly-list] tags around
the block of [item-*] tags in there, like this:

    [fly-list prefix="item" code="[data session arg]"]
        code is: [item-code]<br>
        other item tags...
    [/fly-list]

Note that doing this will not disable the ordinary flypage
mechanism.  If someone called "cgi-bin/yourstore/000001.html"
then the flypage.html would be called as expected.

Also note that I haven't tried any of this. :-)

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/