This file was created for me to generate long tail links on our website. However when on a page with https the long tail links are http. Can anyone help me figure out how to fix this so if your on a page with https the long tail links go to https?
On page code [long_tail "sku"]
The file is in interchange/usertag/ and is called long_tail.tag
Here is the code in that file:
UserTag long_tail Order sku
UserTag long_tail addAttr
UserTag long_tail Routine <<EOR
sub {
my $sku = shift;
my $opt = shift;
$opt->{no_session} = 1 unless defined $opt->{no_session};
use vars qw/ $Tag /;
my $db = dbref('products')
or do {
::logError("no products db!");
return $Tag->area($sku);
};
my ($long, $desc) = $db->get_slice($sku, [ qw/ long_tail description / ]);
if(! $long and ! $desc) {
::logError("no sku=$sku in products db, called by long_tail");
return $Tag->area($sku);
}
$long ||= $desc;
$long =~ s/--/-/g;
$long =~ s/\W+/-/g;
$long =~ s/^$sku//;
$long =~ s/^-+//;
$long = join "--", $sku, $long;
return $Tag->area({ href => $long, no_session => $opt->{no_session}});
}
EOR
GlobalSub long_tail_missing <<EOS
sub {
my $sku = shift;
return unless $sku =~ s/--.*//s;
my $db = dbref('products')
or return;
my ($resku, $template) = $db->get_slice($sku, [ qw/ sku template_page / ]);
return unless $resku;
$template ||= 'flypage';
$Vend::Session->{arg} = $sku;
return(1, $template);
}
EOS
Steve Bronson
Air Delights, Inc.
http://www.airdelights.com
steve@airdelights.com
Phone: 1-800-440-5556
Fax: 1-503-643-8224
Air Delights, Inc. is a National Distributor of Plumbing Products and Restroom Accessories. Please visit our website at http://www.airdelights.com
_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
On page code [long_tail "sku"]
The file is in interchange/usertag/ and is called long_tail.tag
Here is the code in that file:
UserTag long_tail Order sku
UserTag long_tail addAttr
UserTag long_tail Routine <<EOR
sub {
my $sku = shift;
my $opt = shift;
$opt->{no_session} = 1 unless defined $opt->{no_session};
use vars qw/ $Tag /;
my $db = dbref('products')
or do {
::logError("no products db!");
return $Tag->area($sku);
};
my ($long, $desc) = $db->get_slice($sku, [ qw/ long_tail description / ]);
if(! $long and ! $desc) {
::logError("no sku=$sku in products db, called by long_tail");
return $Tag->area($sku);
}
$long ||= $desc;
$long =~ s/--/-/g;
$long =~ s/\W+/-/g;
$long =~ s/^$sku//;
$long =~ s/^-+//;
$long = join "--", $sku, $long;
return $Tag->area({ href => $long, no_session => $opt->{no_session}});
}
EOR
GlobalSub long_tail_missing <<EOS
sub {
my $sku = shift;
return unless $sku =~ s/--.*//s;
my $db = dbref('products')
or return;
my ($resku, $template) = $db->get_slice($sku, [ qw/ sku template_page / ]);
return unless $resku;
$template ||= 'flypage';
$Vend::Session->{arg} = $sku;
return(1, $template);
}
EOS
Steve Bronson
Air Delights, Inc.
http://www.airdelights.com
steve@airdelights.com
Phone: 1-800-440-5556
Fax: 1-503-643-8224
Air Delights, Inc. is a National Distributor of Plumbing Products and Restroom Accessories. Please visit our website at http://www.airdelights.com
_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users