[ic] {Spam?} Re: [bounce] question

Rick Bragg rbragg at gmnet.net
Wed Feb 22 20:39:12 UTC 2012


On Wed, 2012-02-22 at 14:22 -0500, DB wrote:
> I want to use the tag [bounce href if] on a flypage to redirect visitors
> to an external URL if the sku matches a pattern - say the first 3
> characters of the sku are ABC
> 
> In other words, if someone visits the flypage:
> http://www.domain1.com/ABC-123.html
> 
> I want them to end up at
> http://www.domain2.com/ABC-123.html
> 
> But for all other skus the flypage should work as normal. I'm having
> trouble cooking up the correct 'if' condition. Does anyone have a
> suggestion?
> 
> Thanks
> 
> DB

Try something like this: (untested)

[calc]
 my $itemsku = "[item-code]";
 my $bouncepage;
 if ($itemsku =~ /^ABC/){
  $Scratch->{bouncepage} = "http://domain2.com/$itemsku";
 }
 return;
[/calc]

[if scratch bouncepage]
  [bounce href="[scratchd bouncepage]"]
[/if]

Rick






More information about the interchange-users mailing list