[ic] Code behaves differently on catalog pages and in IC Jobs

Ton Verhagen tverhagen at alamerce.nl
Tue Feb 5 10:20:37 EST 2008


Dear All,

In order to generate Google sitemaps for our various
domains we developed a UserTag called google-sitemap.


Brief background:
1. Sites are multi-lingual
2. Each 'language' has its own domain name
(e.g. English: mydomain.com, German: mydomain.de, etc.)

3. Relevant code:
# Set domain. Make sure proper domain shows up in links
my $vhost = $opts->{domain} || '';
my $vendurl_save = $Config->{VendURL};
$Config->{VendURL} = "http://${vhost}" if $vhost;
         ...
         generate urls using area tag
         ...
# Reset domain setting
$Config->{VendURL} = $vendurl_save if $vhost;



The above code works fine as long as the UserTag is being
used on a catalog page or on the test-code form in the admin.

When called like: [google-sitemap domain="www.mydomain.de"]
The domain www.mydomain.de shows up in all URL's.
So far so good.

However when the UserTag is called in an Interchange Job the
wrong domain (always default domain) shows up in the generated
links. No matter which domain name is provided in the UserTag call.
It looks like VendURL is not being set to the domain name provided.

Any ideas what causes this behaviour, and more importantly,
how could we fix this?
We would like to have the UserTag behave the same, no matter where
it is called: in IC Jobs or on normal catalog pages.

Many thanks for any help or insights.



Best regards,

Ton

--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting 




More information about the interchange-users mailing list