Quoting Mike Heins (suppressed):
> There would be another way, via GlobalSub and Autoload. You just check
> the path for a valid product code, and set
> $Vend::Cfg->{Special}{flypage} accordingly when you find one.
>
> GlobalSub <<EOR
> sub munge_flypage {
> my $code = $Vend::FinalPath;
> $code =~ s/\.html?$//;
> $code =~ s:^/::;
> my $db = Vend::Data::product_code_exists_ref($code)
> or return;
> my $template = $db->field($code, $Vend::Cfg->{PageSelectField})
> or return;
> $Vend::Cfg->{Special}{flypage} = "f_$template";
> }
> EOS
>
> Then in catalog.cfg you put "Autoload munge_flypage".
By the way, this last would actually be bad in some situations. Though
you will typically open the product database on most pages, this ensures
that you do even for mv_tmp_session pages. Also, if you wanted to later
flag it for write you would not be able to (though the default SQL mode
write-enables anyway).
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <suppressed>
I am a great believer in luck, and I find that the harder I work
the more luck I have. -- Thomas Jefferson
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.