[ic] Specify flypage using javascript or another non-database method
DB
db at m-and-d.com
Sun Jul 5 18:05:22 UTC 2015
>> >
> [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.
DB
More information about the interchange-users
mailing list