Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 452,045

Results 1,661 to 1,680 of 2,454
10 Oct 2014, 1:50 AM
#1661
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Ceon URI Mapping v4.x

BGoat:

I'm having problems with a site that I have set up as a the main domain. Actually the problem is with the sub domains. I can't get to them with the .htaccess file that is create with CEON. If I don't use the .htaccess file I can get to them. Here is the file.

RewriteEngine On

Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])

RewriteCond %{REQUEST_URI} !.[a-z]{2,5}$ [NC]

Don't rewrite any URIs for some, popular specific file format extensions,

which are not covered by main file extension condition above

RewriteCond %{REQUEST_URI} !.(mp3|mp4|h264)$ [NC]

Don't rewrite any URIs for some specific file format extensions,

which are not covered by main file extension condition above

Uncomment the following line to apply this condition! (Remove the # at the start of the next line)

#RewriteCond %{REQUEST_URI} !.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]

Don't rewrite admin directory

RewriteCond %{REQUEST_URI} !^/adminghi [NC]

Don't rewrite editors directory

RewriteCond %{REQUEST_URI} !^/editors/ [NC]

Don't rewrite bmz_cache directory

RewriteCond %{REQUEST_URI} !^/bmz_cache/ [NC]

Don't rewrite rayshookconstruction.com directory

RewriteCond %{REQUEST_URI} !^/rayshookconstruction.com/ [NC]

Don't rewrite cgi-bin directory

RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]

Don't rewrite logs directory

RewriteCond %{REQUEST_URI} !^/logs/ [NC]

Don't rewrite b-goat.com directory

RewriteCond %{REQUEST_URI} !^/b-goat.com/ [NC]

Don't rewrite sitemap directory

RewriteCond %{REQUEST_URI} !^/sitemap/ [NC]

Don't rewrite temp.jaciscookies.com directory

RewriteCond %{REQUEST_URI} !^/temp.jaciscookies.com/ [NC]

Handle all other URIs using Zen Cart (its index.php)

RewriteRule .* index.php [QSA,L]

> 
> Not sure what I need to change. Help would be greatly appreciated.
> 
> Billie

Well, one thing seems that you need to change your admin directory....

The other issue seems to be related to having subdirectories that end with an extension. Though before acting on that, is there an .htaccess in each/any of the other store roots?
10 Oct 2014, 4:24 AM
#1662
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

DML73, forget Multi-Language SEO URLs mod and do this to your common HTML_header:
$tmp_lng = new language();
reset($tmp_lng->catalog_languages);
foreach($tmp_lng->catalog_languages as $cat_lng) {
$lengua_sql = $db->Execute("select languages_id from " . TABLE_LANGUAGES . " where code = '" . $cat_lng['code'] . "'");
$codigo_de_lengua=$lengua_sql->fields['languages_id'];

if (isset($_GET['cPath'])) {

$ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and associated_db_id=".$current_category_id." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
$ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
}

else if (isset($_GET['manufacturers_id']) ){
$marca_a_buscar="'manufacturers_id=".(int)$_GET['manufacturers_id']."'";
$ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and query_string_parameters=".$marca_a_buscar." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
$ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
}

if ($ceon_por_lengua_query!=''){
if ($cat_lng['code']==DEFAULT_LANGUAGE){echo '<link rel="alternate" href="<http://www.mysite.com> . $ceon_por_lengua_query. '" hreflang="x-default" />';}
echo '<link rel="alternate" href="<http://www.mysite.com> . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
}
}

Thanks so much tonibarcelona, that was almost exactly what I was looking for. The only difference between your solution and my site is that my site is setup like this:

https://www.mysite.es/es/blahblah <-- for spanish
and
https://www.mysite.co.uk/en/blahblah <-- for english

As you can see, I am using two different domains, .es for spanish and .co.uk for english, and also the sub-folders for each language.
How could your code be modified to solve this problem? (unfortunately Im not a programmer).

10 Oct 2014, 10:16 AM
#1663
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

DML73:

Thanks so much tonibarcelona, that was almost exactly what I was looking for. The only difference between your solution and my site is that my site is setup like this:

www.mysite.es/es/blahblah <-- for spanish
and
www.mysite.co.uk/en/blahblah <-- for english

As you can see, I am using two different domains, .es for spanish and .co.uk for english, and also the sub-folders for each language.
How could your code be modified to solve this problem? (unfortunately Im not a programmer).

Glad to help you. Ok, let´s assume that you main domain is the .co.uk. Try this:

$tmp_lng = new language(); 
reset($tmp_lng->catalog_languages);
foreach($tmp_lng->catalog_languages as $cat_lng) {
$lengua_sql = $db->Execute("select languages_id from " . TABLE_LANGUAGES . " where code = '" . $cat_lng['code'] . "'");
$codigo_de_lengua=$lengua_sql->fields['languages_id'];


if (isset($_GET['cPath'])) {


$ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and associated_db_id=".$current_category_id." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
$ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
}


else if (isset($_GET['manufacturers_id']) ){
$marca_a_buscar="'manufacturers_id=".(int)$_GET['manufacturers_id']."'";
$ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and query_string_parameters=".$marca_a_buscar." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
$ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
}


if ($ceon_por_lengua_query!=''){
if ($cat_lng['code']==DEFAULT_LANGUAGE){echo '<link rel="alternate" href="http://www.mysite.com.co.uk' . $ceon_por_lengua_query. '" hreflang="x-default" />';}
else if ($cat_lng['code']=='es'){echo '<link rel="alternate" href="http://www.mysite.es' . $ceon_por_lengua_query. '" hreflang="es" />';}
else if ($cat_lng['code']=='en'){echo '<link rel="alternate" href="http://www.mysite.co.uk' . $ceon_por_lengua_query. '" hreflang="en" />';}
else '<link rel="alternate" href="http://www.mysite.co.uk' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
}
}

I haven´t tested, so please report if it works.

I have a question for you: Do you run both domains with the same installation.? If so, how do yo do it, with the multisite mod?

10 Oct 2014, 1:47 PM
#1664
bgoat avatar

bgoat

New Zenner

Join Date:
Sep 2012
Posts:
14
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc12345678:

Well, one thing seems that you need to change your admin directory....

The other issue seems to be related to having subdirectories that end with an extension. Though before acting on that, is there an .htaccess in each/any of the other store roots?

Yes I do now, ugh. Didn't even think about that before posting.

No, there isn't any other store roots. The only site that has a store is the temp.

Billie

10 Oct 2014, 4:20 PM
#1665
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

BGoat:

Yes I do now, ugh. Didn't even think about that before posting.

No, there isn't any other store roots. The only site that has a store is the temp.

Billie

So with regards to say:

rayshookconstruction\.com

Is there an .htaccess file and how is one from the internet expected to get there? If it is by typing that as the uri, then that is a root location. To further explain the thought, once the system tries to get the guest there, if an .htaccess is not provided then generally speaking the .htaccess from the parent directory overrules and in that case, the REQUEST_URI is no longer the subdirectory but a / and therefore the rules of the original .htaccess apply and the user gets redirected to a non-existent index.php potentially and the errors you have seen appear. This is not a condition to be determined by the auto script for the base .htaccess file and must be enhanced/modified. It is something discussed in the documentation to an extent, the details to be independently worked out.

10 Oct 2014, 6:36 PM
#1666
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

I haven´t tested, so please report if it works.

Thanks a lot, it works except that it never defines the "en" language.

If I use your first solution then I get this:

<link rel="alternate" href="http://www.mysite.com/es/blahblah" hreflang="es" /> <link rel="alternate" href="http://www.mysite.com/en/blahblah" hreflang="x-default" /> <link rel="alternate" href="http://www.mysite.com/en/blahblah" hreflang="en" />

If I use your second solutioin then I only get this:

<link rel="alternate" href="http://www.mysite.es/es/blahblah" hreflang="es" /> <link rel="alternate" href="http://www.mysite.co.uk/en/blahblah" hreflang="x-default" />

(the domains are correct but the hreflang for english is missing).

tonibarcelona:

I have a question for you: Do you run both domains with the same installation.? If so, how do yo do it, with the multisite mod?

Yes, I have both domains on same server (and same zencart installation). I only have the CEON module installed, and then I have the following redirection in my htaccess file:

RewriteCond %{HTTP_HOST} ^(www.|)tronicore.dk$ [NC]
RewriteRule ^(da)/.* [QSA,L]

Im not sure this is the right way to do it, but it seems like its working except for the hreflang tags. You can see it here https://www.tronicore.co.uk.

10 Oct 2014, 8:28 PM
#1667
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

DML73:

Thanks a lot, it works except that it never defines the "en" language.

If I use your first solution then I get this:

<link rel="alternate" href="http://www.mysite.com/es/blahblah" hreflang="es" /> <link rel="alternate" href="http://www.mysite.com/en/blahblah" hreflang="x-default" /> <link rel="alternate" href="http://www.mysite.com/en/blahblah" hreflang="en" />

If I use your second solutioin then I only get this:

<link rel="alternate" href="http://www.mysite.es/es/blahblah" hreflang="es" /> <link rel="alternate" href="http://www.mysite.co.uk/en/blahblah" hreflang="x-default" />

(the domains are correct but the hreflang for english is missing).

Yes, I have both domains on same server (and same zencart installation). I only have the CEON module installed, and then I have the following redirection in my htaccess file:

RewriteCond %{HTTP_HOST} ^(www.|)tronicore.dk$ [NC]
RewriteRule ^(da)/.* [QSA,L]

Im not sure this is the right way to do it, but it seems like its working except for the hreflang tags. You can see it here www.tronicore.co.uk.

Mmmmm, I think you have several things wrong at your end:
Language flags doesn´t work as expected, they always redirected to home

try with this:

if ($ceon_por_lengua_query!=''){
if ($cat_lng['code']=='es'){$domaintoshow='http://www.mysite.es';}if ($cat_lng['code']=='en'){$domaintoshow='http://www.mysite.co.uk';}else {$domaintoshow='http://www.mysite.co.uk';}
if ($cat_lng['code']==DEFAULT_LANGUAGE){echo '<link rel="alternate" href="http://www.mysite.com.co.uk' . $ceon_por_lengua_query. '" hreflang="x-default" />';}

echo '<link rel="alternate" href="'.$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
}

It´s a very too late & I haven´t the time to test it. the code can by sure be better rewritten. If this doesn´t work, I can take another look on Monday !!

11 Oct 2014, 2:56 AM
#1668
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

Mmmmm, I think you have several things wrong at your end:
Language flags doesn´t work as expected, they always redirected to home

try with this:

if ($ceon_por_lengua_query!=''){
if ($cat_lng['code']=='es'){$domaintoshow='http://www.mysite.es';}if ($cat_lng['code']=='en'){$domaintoshow='http://www.mysite.co.uk';}else {$domaintoshow='http://www.mysite.co.uk';}
if ($cat_lng['code']==DEFAULT_LANGUAGE){echo '<link rel="alternate" href="http://www.mysite.com.co.uk' . $ceon_por_lengua_query. '" hreflang="x-default" />';}
echo '<link rel="alternate" href="'.$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
}
It´s a very too late & I haven´t the time to test it. the code can by sure be better rewritten. If this doesn´t work, I can take another look on Monday !!

Thanks for the suggesion, unfortunately it didn't work, it gives me an internal server error 500.

I know my language flags does not work exactly as they should, they redirect to my hom page, I still haven't figured out how to fix that.

11 Oct 2014, 3:08 AM
#1669
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Addition to my reply above. I changed:

echo '<link rel="alternate" href="'.$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
to
echo '<link rel="alternate" href=".$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;

now Im getting:

<link rel="alternate" href=".$domaintoshow./da/blahblah" hreflang="da" /> <link rel="alternate" href="http://www.mysite.co.uk/en/blahblah" hreflang="x-default" /> <link rel="alternate" href=".$domaintoshow./en/blahblah" hreflang="en" />

Close but still not right.

12 Oct 2014, 8:21 PM
#1670
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

DML73:

Addition to my reply above. I changed:

echo '<link rel="alternate" href="'.$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;
to
echo '<link rel="alternate" href=".$domaintoshow.' . $ceon_por_lengua_query. '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;

now Im getting:

<link rel="alternate" href=".$domaintoshow./da/blahblah" hreflang="da" /> <link rel="alternate" href="http://www.mysite.co.uk/en/blahblah" hreflang="x-default" /> <link rel="alternate" href=".$domaintoshow./en/blahblah" hreflang="en" />

Close but still not right.

And this?:

echo '<link rel="alternate" href="'. $domaintoshow . $ceon_por_lengua_query . '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL;

12 Oct 2014, 8:29 PM
#1671
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

ey!! You did it!!
congrats

12 Oct 2014, 8:32 PM
#1672
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

-not, not yet:

<link rel="alternate" href="[http://www.tronicore.com.co.uk/en/serial-port-cards](http://www.zen-cart.com/view-source:http://www.tronicore.com.co.uk/en/serial-port-cards)" hreflang="x-default" />
12 Oct 2014, 8:36 PM
#1673
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

-not, not yet:

<link rel="alternate" href="[http://www.tronicore.com.co.uk/en/serial-port-cards](http://www.zen-cart.com/view-source:http://www.tronicore.com.co.uk/en/serial-port-cards)" hreflang="x-default" />

No its not right yet, the code you gave me above gives me this:

<link rel="alternate" href="http://www.mysite.co.uk/da/seriel-ethernet-lan-konvertere" hreflang="da" /> <link rel="alternate" href="http://www.mysite.com.co.uk/en/serial-ethernet-converters" hreflang="x-default" /> <link rel="alternate" href="http://www.mysite.co.uk/en/serial-ethernet-converters" hreflang="en" />

The danish (da) domain should be .dk, but it gives me its .co.uk for all languages.

12 Oct 2014, 8:38 PM
#1674
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Please, copy here your html_header contents

12 Oct 2014, 8:44 PM
#1675
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

Please, copy here your html_header contents

<?php
/**
 * Common Template
 *
 * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Tue Jul 17 16:02:00 2012 -0400 Modified in v1.5.1 $
 */
/**
 * load the module for generating page meta-tags
 */
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?> xmlns:fb="http://ogp.me/ns/fb#" itemscope itemtype="http://schema.org/Product">

<head>
<title><?php echo META_TAG_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="U.S. Converters LLC" />
<meta name="generator" content="shopping cart program by Zen Cart®, http://www.zen-cart.com eCommerce" />

<!--BOF Get OG meta tags from file in /includes/modules/responsive_sheffield_blue-->
<?include(DIR_WS_MODULES . zen_get_module_directory('og_tags.php'));?>
<!--EOF Get OG meta tags from file-->



<meta name="viewport" content="width=device-width, initial-scale=1.0"/>

<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
<?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>

<?php



 $tmp_lng = new language(); 
 reset($tmp_lng->catalog_languages);
 foreach($tmp_lng->catalog_languages as $cat_lng) {
 $lengua_sql = $db->Execute("select languages_id from " . TABLE_LANGUAGES . " where code = '" . $cat_lng['code'] . "'");
 $codigo_de_lengua=$lengua_sql->fields['languages_id'];

 if (isset($_GET['cPath'])) {

 $ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and associated_db_id=".$current_category_id." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
 $ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
 }

 else if (isset($_GET['manufacturers_id']) ){
 $marca_a_buscar="'manufacturers_id=".(int)$_GET['manufacturers_id']."'";
 $ceon_por_lengua_sql = "select uri from " . TABLE_CEON_URI_MAPPINGS . " where uri IS NOT NULL and main_page='index' and query_string_parameters=".$marca_a_buscar." and current_uri=1 and language_id='" .$codigo_de_lengua."'";
 $ceon_por_lengua_query = $db->Execute($ceon_por_lengua_sql)->fields['uri'];
 }

if ($ceon_por_lengua_query!=''){
 if ($cat_lng['code']=='da'){$domaintoshow='http://www.tronicore.dk';}if ($cat_lng['code']=='en'){$domaintoshow='http://www.tronicore.co.uk';}else {$domaintoshow='http://www.tronicore.co.uk';}
 if ($cat_lng['code']==DEFAULT_LANGUAGE){echo '<link rel="alternate" href="http://www.tronicore.com.co.uk' . $ceon_por_lengua_query. '" hreflang="x-default" />';}
 echo '<link rel="alternate" href="'. $domaintoshow . $ceon_por_lengua_query . '" hreflang="' . $cat_lng['code'] . '" />'.PHP_EOL; 
 }
 } 





/**
 * load all template-specific stylesheets, named like "style*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }
/**
 * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
 */
  
 
 
  $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
  $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
  $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
  if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id;
  $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet',
                        '/' . $tmp_pagename,
                        '/' . $_SESSION['language'] . '_' . $tmp_pagename,
                        '/c_' . $cPath,
                        '/' . $_SESSION['language'] . '_c_' . $cPath,
                        '/m_' . $manufacturers_id,
                        '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id,
                        '/p_' . $tmp_products_id,
                        '/' . $_SESSION['language'] . '_p_' . $tmp_products_id
                        );
  while(list ($key, $value) = each($sheets_array)) {
    //echo "<!--looking for: $value-->\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
  }

/**
 *  custom category handling for a parent and all its children ... works for any c_XX_XX_children.css  where XX_XX is any parent category
 */
  $tmp_cats = explode('_', $cPath);
  $value = '';
  foreach($tmp_cats as $val) {
    $value .= $val;
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/c_' . $value . '_children.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . $_SESSION['language'] . '_c_' . $value . '_children.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
    $value .= '_';
  }

/**
 * load printer-friendly stylesheets -- named like "print*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');
  sort($directory_array);
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }

/**
 * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
  }

/**
 * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
  }

/**
 * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
  }
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($page_directory . '/' . $value); echo "\n";
  }

// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';

if (COLUMN_WIDTH == '0') {
    echo '';
} else {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive.css' . '" />';
}
?>

<script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/css_browser_selector.js' ?>" type="text/javascript"></script>






<script type="text/javascript">
$(document).ready(function() {
		var origsrc = $("#productMainImage a img").attr("src");
	$("#productAdditionalImages .additionalImages a img").hover(
	  function () {
		$("#productMainImage a img").attr('src', this.src);
	  }, 
	  function () {
		$("#productMainImage a img").attr('src', this.src);
	  }
	);
});
</script>
</head>
<?php // NOTE: Blank line following is intended: ?>
12 Oct 2014, 8:52 PM
#1676
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

As I can see, the code is Ok. The only thing I think must be changed is

http://www.tronicore.com.co.uk

that I supose must be
http://www.tronicore.co.uk

Can you upload the code with this change for take another view?

12 Oct 2014, 8:57 PM
#1677
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
413
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Ok, I corrected that, but it still gives me:

http://www.mysite.co.uk/da/

which should be

http://www.mysite.dk/da/

Is it not possible to do that?

12 Oct 2014, 9:06 PM
#1678
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

yes, I saw. I have thinking about it but not find why yet...

12 Oct 2014, 9:24 PM
#1679
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I don´t know why it isn´t putting the correct domain.
Try erasing this:

else {$domaintoshow='http://www.tronicore.co.uk'}

12 Oct 2014, 9:30 PM
#1680
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

tonibarcelona:

I don´t know why it isn´t putting the correct domain.
Try erasing this:

else {$domaintoshow='http://www.tronicore.co.uk'}

Success!!!!