[ic] Specify flypage using javascript or another non-database method

Josh Lavin jlavin at endpoint.com
Sun Jul 5 22:26:49 UTC 2015


Quoting DB (db at m-and-d.com):
> >> > 
> > [snip]
> > 
> > Something else you might be interested in:
> > 
> > https://github.com/perusion/interchange-extras/tree/master/mobile
> > 
> > -- 
> > Josh Lavin
> 
> 
> I'm slowly making progress with this. As I mentioned previously, if I
> comment the line
> 
>         for($path, $mpath) {
>                 s:(/|index/?)$:/index:;
> #               s:(?!\.html)$:.html:;
>         }
> 
> Then the redirect to pages/m/index.html works. However despite the
> presence of pages/m/flypage.html, I'd still always get the default
> pages/flypage.html on a product page.
> 
> The debug log suggested that that again an extra .html may be to blame.
> So I added a line to is_mobile:
> 
>  ## send to 'm/flypage', if a sku in products
>  $fp =~ s{\.[^.]+$}{}; # <-Added this to line to remove extension
>  my $sku = dbref($Vend::Cfg->{ProductFiles
> [0])->record_exists(substr($fp, 1));
> 
> And then the mobile flypage started to work. But instead of actually
> using this hacked-up code, I thought I'd see if anyone here has any
> words of wisdom, and any would be welcomed.

I think the is_mobile tag was developed for a catalog with "Scratch
mv_add_dot_html" set to "0", but I was under the impression it would
work either way.

Perhaps not. I would be interested what your catalog uses for this
setting -- it may be that you have found a bug.

-- 
Josh Lavin
End Point Corporation



More information about the interchange-users mailing list