And it works - you can see the effect -> my pvc banners site - obout 9000 products :) http://www.hugeone.co.uk
Printable View
And it works - you can see the effect -> my pvc banners site - obout 9000 products :) http://www.hugeone.co.uk
It may or does, besides a few minor things, it assigns all items to the product type product general. So document types or any other product type get reassigned to the product type, as written. The data is there available to not have that happen, but it is not fully incorporated.
Agree, and offering a little feedback near the original post for those that choose to pluck it out, find a place to insert it and try to use it. Ie. There was already a cautionary note about the language situation, but there wasn't one about the product type. Now there is :) it's all good.
I have zencart 1.5.3,. INstalled ceon url mapping 4.4.2.
Installation broke admin login to white page. so I troublshot it file by file. Finally found that the ifle that is breaking the installation is admin/includes/functions/general.php. If I revert back to clean install of that file my admin works fine again. Of course the ceon url mapping is then broke.
I've done a compare of the two files but there is alot of changes in the ceon version and my php is not good enough to figure out what the problem might be.
I'm assuming it might be something to do with the file needing to be upgraded to be compatible with 1.5.3 since 1.5.3 had some changes from 1.5.1 in that I noticed 1.5.3 broke other things that worked ok with 1.5.1 and had to be fixed (eg, a template).
help! (Please).
Did you happen to use the files from this post that islocated one page back? http://www.zen-cart.com/showthread.p...16#post1255416
Thanks yeah didn't find/see that. will take a look at it. Currently I seem to have ceon url mapping working on the site in spite of not using their version of general.php so I am hesitant to fiddle too much since this is a production site that is the sole income of quite a few people so we don't want to break anything now that we have the upgrade to 1.5.3 working and live. I'll probably wait until the slow time over the weekend and backup the site then try it out in case anything breaks will give me time to recover without to much impact on the business. appreciate the info.
Before the more than likely resulting heart attack, how about doing something to not have to work on a live income providing site? Like set up a development/test site? That wayu can find the errors 1) before your customers, and 2) while your customers keep shopping?
Hi all,
When will be there an updated version for ZC 1.5.3?
Thanks for the answers in advance!
So, a couple things on that. I think from recent posts on the issue, it won't be updated by those of jsweb until a support ticket (or whatever method of notification) is made to jsweb at their site. Otherwise, anyone can submit n updated version. I posted a downloadable file set that I had generated for a 1.5.3 site two pages ago that would need to be combined with the current version that has been posted. Call it lazy if you wish or unsure, but I didn't do a full incorporation to include instruction update, etc. To post a new version with the files included. Additionally, I've only had limited access to a server with a more recent version of php to validate full functionality, so hesitated in considering it viable solution. It worked for the system I used it on, and thought I would share the "wealth" seeing that an update had not yet been provided here.
Quote:
it won't be updated by those of jsweb until a support ticket...
Incorrect - supporting Conor's free contributions was never part of our original agreement with Ceon. However, when we get the time, we will endeavour to update the free contributions when necessary.
A new version has been uploaded to the plugins section+ that is 1.5.3 compatible. Probably still awaiting moderation.
Thank's JS, Once the 153 version is available I will upgrade my site
http://www.zen-cart.com/downloads.php?do=file&id=889 - it's there
Hi Can anyone help me out, I have copied the example rewrite rule but the URI are redirecting only to the homepage.
Need to provide more information. Might suggest providing the .htaccess file but with the admin directory obscured. Also to identify if the store is in the main directory or a sub-directory, other htaccess modifyiing plugins installed? Other posting guideline questions that have been missed?
Thank you for the reply. .htaccess is:
## BEGIN CEON URI MAPPING REWRITE RULE
RewriteEngine On
# ONLY rewrite URIs beginning with /onlinestore/
RewriteCond %{REQUEST_URI} ^/onlinestore/ [NC]
# 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} !^/onlinestore/adminxxxxxxx [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/onlinestore/editors/ [NC]
# Don't rewrite modules directory
RewriteCond %{REQUEST_URI} !^/onlinestore/modules/ [NC]
# Don't rewrite languages directory
RewriteCond %{REQUEST_URI} !^/onlinestore/languages/ [NC]
# Don't rewrite min directory
RewriteCond %{REQUEST_URI} !^/onlinestore/min/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/onlinestore/cgi\-bin/ [NC]
# Don't rewrite cron directory
RewriteCond %{REQUEST_URI} !^/onlinestore/cron/ [NC]
# Don't rewrite sitemap directory
RewriteCond %{REQUEST_URI} !^/onlinestore/sitemap/ [NC]
# Don't rewrite templates directory
RewriteCond %{REQUEST_URI} !^/onlinestore/templates/ [NC]
# Don't rewrite bmz_cache directory
RewriteCond %{REQUEST_URI} !^/onlinestore/bmz_cache/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/onlinestore/logs/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /onlinestore/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
I didn't change anything from the example Rewrite rule.
The .htaccess is located in the root while the store is inside /onlinestore
There is no other rewrites active.
new files uploaded properly together with the modified core files and the template overrides. TIA.
Can you provide all the content from .htaccess?
In the meanwhile, are you sure tha mod_rwrit i active? If not sur, add this to the beining of .htaccess: RewriteEngine On
If the request made earlier to provide the contents of the .htaccess (without the identification of the admin directory) is what was provided above then one can see that the rewriteengine statement is included. Another area that could be a problem/cause might be in the includes/configure.php file. What are the settings for HTTP_SERVER, HTTPS_SERVER, ENABLE_SSL, DIR_WS_CATALOG, and DIR_WS_HTTPS_CATALOG?
You don't need to provide the actual url (ie could be replaced with www.mydomain dot com or something if desired), but do need to see the general construct with slashes, etc...
Another question... Do you have an .htaccess file in your onlinestore directory? And before I get pounced, I know the instructions for installing CEON URI Rewriter state to incorporate the provided .htaccess file into the root directory and that the provided information is not to go into the sub-directory in which the store is installed (when a store is installed into a sub-directory). I am also aware that ZC does not require a .htaccess file to be located within the base of the store. It is all of these things though that could also lead to a problem if not properly managed, and so am trying to ascertain the current status.
BTW, I haven't seen that it would be an issue per se, but the RewriteRule, perhaps change it slightly?
By adding the ^( and )$ around the .*?Code:RewriteRule ^(.*)$ /onlinestore/index.php [QSA,L]
Im trying to get CEON URL working with Multi-language SEO URLs (http://www.zen-cart.com/downloads.php?do=file&id=1717).
By adding:
RewriteRule ^(en|es)/.* index.php [QSA,L]
to the htaccess file ("en" for english and "es" for spanish) the index pages seems to be working fine but all other pages gets a "Page not found error". I suspect the reason is that "Multi-language SEO URLs" adds the "en" and "es" directories to the URL like this:
www.mywebsite.com/en/
www.mywebsite.com/es/
Is there a way to add a rule in htaccess to solve this problem? Or would the code in the CEON module need to be modified?
Not to be rude or awnry, why would you want to use a uri rewriter to rewrite in or to a foreign language when a uri rewriter already handles foreign/multiple languages? This. uri rewriter can even handle uris written as shown in the above examples if they previously existed with the applicable en or es folder prefix. Further the instructions do identify that using two rewriters is highly not advised/are likely not to work together.
The "Multi-language SEO URLs" module by itself does not do what you mention, as far as I understand. Only if I also install the "Ultimate SEO URLs" plugin as mentioned in the install instructions for the "Multi-language SEO URLs" module it will re-write the URLs. I like the "CEON URL" module better than the "Ultimate SEO URLs" plugin, that's why I would like to get it working with that instead.
Well, though the thing is that the CEON module already is multi-language, so what is there to get to work with it?
Saying that the module adds on en or es or whatever two letter abbreviaition to the uri is a uri rewriter. Therefore, having that plus CEON URI rewriter is having two rewriters...
If it is desired to have some sort of language identifying information in the uri, then it would just need to be added to part of the uri construct for the product(s)/category(ies).
I see your point. I think my situation is special because I have 2 domains, one for each language (on same server), for example:
www.site.co.uk
www.site.dk
In my htaccess file I then redirect each language to the correct site:
#danish to dk site
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.|)site\.dk$ [NC]
RewriteRule ^$ index.php?&language=da [R=301,L]
#english to co.uk site
RewriteCond %{HTTP_HOST} ^(www\.|)site\.co\.uk$ [NC]
RewriteRule ^$ index.php?&language=en [R=301,L]
I have found that this redirection is not working with the CEON module but it works fine with the Multilanguage SEO module, so I was trying to combine the two. However I guess a better approach would be to get the redirection code working with the CEON module instead. Any ideas?
Possible to do with this version of CEON rewriter. I'm a long ways away fom a computer to be able to tinker with. The htaccess that maybe necessary. I do know that in working with the module I have it working on a single server with multiplesubfolders each having their own "store" tobeable to try different setups. The request is beyond the typical usage/design (utogenerrated htaccess doesn't generate *all* of the applicable statements.) But it is something thatcan be done.
Would be good to understand things like are all of thesame products provided, is it just a language thing, anything else that may help the overall solution. (Whichmaynot be to simply get ceon uri rewriter to work as described...
Nd please forgiveme, I have been out in the heat the last three days fora long period of time. I already know that to help o will need to reread thepecious setup description, butit would help to state itconcisely.
So you are trying to get a module that is meant to work with a COMPLETELY DIFFERENT re-writer to work with THIS re-writer?? The short answer to how to make the "Multi-language SEO URL" module with with THIS module versus the module it was written to work with ("Ultimate SEO URLs") is is to have the "Multi-language SEO URL" module re-written to work with this module.. The question that's already been posed to you is WHY would you want to do this?? This module has supported multi-language shops since 2011.
From the FIRST PAGE of THIS support thread in the original author's OWN WORDS:
It's simply AMAZING what you find when searching the support thread (i.e search for multi language). All from the ORIGINAL author..
I Cannot solve this:
I have structured the int. urls. like this: /mysite.com/en/blahblah, /mysite.com/fr/blahblah,...but it is impossible to me to map the homepage: mysite.com/en
Any idea? (tested mapping at db and rewritting with htaccess with nosuccess)
This assumes that French is language id 2; although I had also inadvertently used a value of '1' and obtained the same final result.Code:INSERT INTO `ceon_uri_mappings` (`uri` ,`language_id` ,`current_uri` ,`main_page` ,`query_string_parameters` ,`associated_db_id` ,`alternate_uri` ,`date_added`)
VALUES ( '/mysite.com/fr','2','1','index','language=fr',NULL ,NULL , NOW()
);
It doesn't replace the link provided at the language flags, but entering the link using the two letter language designation does result in landing on the home page in the language identified by the two letter abbreviation.
Not sure that using the mysite.com approach is correct meaning having the period included... I have seen a site before that had problems with having a subfolder of mysite.com instead of mysitedotcom or some full text only method.
Seems to me that it is not up to the CEON module to add the tags, but instead should be a function of ZC that just happens to be supported or continued by the CEON module. Didn't find a reference to hreflang in zc 1.5.3 so would say that it is not an issue with CEON URI...
and one thing Conor was a STICKLER about was that his module's played well with other modules, and that the way to do this was to follow Zen Carts established coding standards.. Ceon URI has supported multi-languages since 2011, so there REALLY is NO REASON to make it work with the "Multi-language SEO URLS" module..
From the readme:
Quote:
- Full Multi-language Support - including Transliteration and UTF-8!
- The module is fully multilingual - every page can have a URI mapping for each language supported by the store!
- The module automatically causes Zen Cart to use the language the URI uses, greatly enhancing Zen Cart's language functionality!
- This multi-language functionality makes it likely that the site will feature much higher in search engine listings specific to the various languages the store supports.
- The module also has full support for transliteration! When using the URI mapping auto-generation functionality it transliterates the names/titles from any language into plain ASCII, the format used by URIs.
- Transliteration support means that characters outside of the standard character set allowed in URIs won't just be stripped from the URI, leaving words with letters missing. For example, á is replaced with a, ß is replaced with ss etc.
- The transliteration support extends to supporting the UTF-8 character set, so Japanese, Chinese characters etc. are all handled easily!
and from another episode of RTFM... From the Ceon URI readme..
So it's still not clear WHY the Ceon URI module should be made to work with the "Multi-language SEO URLS" module to add SUPPORT for a feature already SUPPORTED by the Ceon URI module..Quote:
Specifying the current URI Mapping for a Product
Specifying the current URI mapping for a Product, for each language used by the store, is easily accomplished:
- Use Catalog > Categories/Products to navigate to the product the desired product is within.
- Click the (green) icon for “Edit” alongside the product's name or click the “New Product” button if adding a new product.
The URI mapping can be automatically generated using the store's URI mapping auto-generation settings:
- The URI mapping fields can be found at the bottom of the page.
- Simply tick the URI mapping auto-generation text box and click “Preview”.
- The URI mapping will then be generated using the full path to the current product and the name of the product. For stores with multiple languages, a URI mapping will be generated for each language, using the respective product names entered for each language.
- The auto-generated URI mappings for each language the store is using will be displayed below the product's description.
- Click “Update” to save the product's information, including its URI mapping(s).
Now that said, this is an OPEN SOURCE module.. and as such since this module TRULY doesn't have what I consider an ACTIVE maintainer (one who will TRULY look after this module as bugs and upgrades to Zen Cart occur) ANYONE can certainly take over the care and upkeep of this module, or fork it and add this feature.. However, it hasn't been made clear why this is needed if it's ALREADY SUPPORTED..
That would be because what you consider the "homepage" is for you not the index page. What pray tell then if not the index page is your homepage? For my test case where I have/had a "second" language installed, it was if I visited the page identified in the language chosen. In my case the index.php page which was written/offered in two different languages...
If your home page is anything other than index, then you need to identify the parameters that would need to be manually inserted into the database that would otherwise be "displayed" to get to that point. If it be an ezpage, a category page, a product page, etc... Etc... ETC...
Would suggest adding it to the database as a status of 0 as it probably already exists as a different listing that is active, but if it doesn't already exist as some other redirection path, then it should be a status of 1.
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;
}
}
Thank you one more time, mc12345678.
My homepage is the index. But I "cutomize" it not displying the columns. Have you tested the solution you propose?
Yes I did as indicated by trying both languages 1 and 2 for the sql provided. Seeing the above customiztion doesn't use zencart zen_href related functions and hardcodes the store's uri to name a few areas of improvement, makes me wonder what customizations were made to the "homepage".
lot of customizations were made, but none of them is attached to homepage
the code above is only fo showing hreflang tags, in conjuction with ceon uri mapping
Few weeks ago, I tried to map the variable $this_is_home_page , but with no success :(
Would be easier to obtain help if you identify what constitutes your homepage? Almost anything would help, there are so many ways to identify what you have considered to be your homepage content. For example, when browsing your site (has web address been provided?) What is the url that is shown for the home option that typically appears in the upper left? What is the setting in the configurations section for the category to appear when opening the webpage. Have you used some sort of htaccess redirect to display some sort of customized page? $this_is_home_page is not something that "fits" into the CEON URI mapping table if that is what is meant. Otherwise, what is meant by mapping the variable/how was it used?
Btw, this discussion is beginning to become off-topic to this forum, unless a direct correlation can be made to the operation of CeON urI mapping, the discussion of above should be continued on a new thread.
Hi mc12345678
Homepage sent by pm
With regrds to the mapping of the language to the homepage, as indicated in the provided sql, the use of mysite.com as a subdirectory was discouraged. The uri provided which with respect is not being disclosed does not contain such a sub-directory. To explain and as is shown in the hreflang uri construct, the data in the database for the uri mappings does not actually contain the site's uri, but the path off of the uri to the final location so in the case of this site, the sql provided would have the subdirectory replaced for mysite.com. Ie: /ZenCart/fr would be the path to include in the sql to map french to the site that is hosted at mysite dot com/ZenCart/fr
Now that said, looking at the site via. Mobile device identified that the template for a mobile device is not integrated with ZC the way expected as looking at the "full site" takes one to the site/fullsite.php file instead of index.php. Finally after navigating was able to find a way to truly see the site as if from a desktop, and nothing appeared unique about the "homepage" that would cause any "concern".
So the reason of discussion of a possible off topic discussion is the relationship of the template (which I have not viewed from a desktop computer) to CEON URI Mapping and the actions necessary to bring it up to ZC standard/normal use. The associated specifics would be more appropriate in a separate thread.
Ok, I understand you now.
Yes, that is true, I havenīt thinked about a user with the shop located at a subdirectory. I have this situation but I includeed the subdirectory path at any uri mapping. Neverless, the code I provided will generate the hreflang and will serve as a guide for DML73.Quote:
Originally Posted by mc12345678
This is a handmade redirection for smartphones. It applies only to templates.Quote:
Now that said, looking at the site via. Mobile device identified that the template for a mobile device is not integrated with ZC the way expected as looking at the "full site" takes one to the site/fullsite.php file instead of index.php.
Ok, Isnīt my intention to hijack the thread. Many thanks for take a view to the site for try to help !!Quote:
Finally after navigating was able to find a way to truly see the site as if from a desktop, and nothing appeared unique about the "homepage" that would cause any "concern".
So the reason of discussion of a possible off topic discussion is the relationship of the template (which I have not viewed from a desktop computer) to CEON URI Mapping and the actions necessary to bring it up to ZC standard/normal use. The associated specifics would be more appropriate in a separate thread.
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.
Not sure what I need to change. Help would be greatly appreciated.Code: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]
Billie
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:
I havenīt tested, so please report if it works.Code:$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 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?
So with regards to say:
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.Code:rayshookconstruction\.com
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 !!
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.
ey!! You did it!!
congrats
-not, not yet:
<link rel="alternate" href="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.
Please, copy here your html_header contents
Code:<?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: ?>
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?
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?
yes, I saw. I have thinking about it but not find why yet...
I donīt know why it isnīt putting the correct domain.
Try erasing this:
else {$domaintoshow='http://www.tronicore.co.uk'}
Yes! thanks so much! I have been wanting this for a long time, .. finally its working! :clap:
glad to help!!
I agree.. It appears that this whole off topic line of conversation has finally come to a conclusion.. NOTHING in it relates to Ceon URI usage.. only a few users desire for an "off-book" use of the module.. I would submit that if Conor Kerr were still with us, he would have respectfully asked for the discussion to be moved elsewhere.. Since this module no longer has a real active maintainer.. anyway.. **shrug** glad folks got the solution they wanted..
With all my respects, Divavocals, my question was totally related to the mod. I asked for help for mapping the homepage in different languages. If you donīt have an answer, itīs ok, but I think that your opinion about the "quality" of post is the only thing that doesnīt matter to this module.
Problem is that an answer was provided for a standard ZC installation that worked on a standard ZC install, but not sure if there was ever success in applying it.
The last 3+ pages have been about refining which host to display using hard coded uris to address a monster created to address a perception. (I.e. If one iives in denmark, why would one break the boundaries and order from the uk or why would one from the uk choose to reach out to a site in denmark?) And then after the address is entered, the fascade continues, even on the landing page, the links presented have not been rewritten, which is abnormal for this plugin and in effect results in two uris being valid and published to reach various aspects of the website. Etc... Etc... Etc...
This is not to deter posting about an issue. The issue/question was posed the relationship between the a site and the functionality of Ceon URI Mapping was established, this should have then been moved to an alternate thread with a link to that thread posted here for those tht had interest. Yes, I've been on both sides of that before, one to keep on going and I would like to think I've learned more and recognize better when a topic should continue elsewhere. This isn't about who is better or cares more or whatever, it's at least partially about readability, applicability, and resolution.
As said, if concerned about the message that was quoted above as related to a satisfactory rewrite of an address using a language identifier, it is still unknown/unclear of whether that was resolved or not. I understand there is a difference in languages and am not going to pick on that, but from the above statement to DivaVocals about providing a solution to the problem asked about it appears that the issue is still unresolved.
Ok, maybe I have been lost in translation. It thatīs the case, I apologize...
I have a slight problem. I'll admit I might have cheated on this by making some modifications to Easy Populate 4 to allow for the direct importation of the URI Mapping via a CSV. However, I noticed that the links that would generate a link to a product page, aren't showing the URI mapping but instead still show the full ZenCart link instead of the remapped URI. I know I can see the database row where it should be. but it is still not generating. Any advice?
Sorry about that. Yes the entire row is being imported via custom coding I made in EasyPopulate 4. Each row is being given a rewritten URI, product_id, product_type, and the language and value are set as active.
Attachment 14603
Which mappings files do I need to update? I don't think I've done anything to manage that.
EDIT: Wait, just got it.
I had to edit /catalog/includes/extra_datafiles/ceon_uri_mapping_product_pages.php to add the page there into the $ceon_uri_mapping_product_pages array.
NB: To anyone who is using custom product types, make sure that you declared a constant for the "FILENAME_" either in /catalog/includes/extra_datafiles/extra_datafiles or the default /catalog/includes/filenames.php. Copy the constant name (the part of the define line in all caps) to that array and continue.
Glad it is solved, and as far as "cheating", I can't say that it is, I've done something similar. And as identified the issue was clearly in the "setup"/modification of the URI Mapping program to support additional data types as described/identified at least in the previously existing website and possibly a few other locations.
Hi,
I'm running ZC 1.5.1 and just installed Ceon 4.4.3.
The installation was smooth and I have created links for all my products and categories, however the links that I created for my ezpages doesn't map properly, they still look like the old links? I tried searching here for answers but couldn't find any. Probably a quick fix, any ideas?
Thanks for a great mod!
/Peter
I have tried both auto and manual. I don't have any ezplugins for multilanguage that I know of. I have uploaded the ezpage file again. Still the same results.
Have a look at the website, http://www.scaffoldusa.com
Click "New Products" and look at the URL. It should read /new-products
Now, try changing the address to /new-products. It shows an empty page, but it's showing a page, not a 404.
I'm confused, could it be that my template has something to do with this? I tried changing the page title in ez-pages and it worked, just to verify that the ez-pages was actually being used.
I'm grateful for any ideas you might have!
/Peter
There are posts from the original author on this.. If you are using EZ Pages for some of the store pages (new, featured, specials, all products) this module will NOT create a URI for these kinds of EZ pages.. There are instructions in the readme for creating URIs for pages that are not auto-generated..
I'm not sure why you think or are saying that new products, or any of the items in the upper menu are considered ez-pages as they all point to static pages which require manual entry into the ceon_uri_mappings table. (See instructions). Basically if the main_page doesn't equal page, index, manufacturer, any of the default (or manually expanded) product types with _info attached at the end, then the link to the address needs to be "manually" entered.
I did notice that for some reason the zenID follows around in the uri until one of the rewritten uris is used... That seems odd as it should only really be displayed on the first page visited.
I have really tried to get my EZpages to work but they won't. I have manually added the URL in the DB etc etc... Do I need to convert my EZpage to get this to work? What needs to be done? For instance, http://www.scaffoldusa.com/specials points to http://www.scaffoldusa.com/index.php?main_page=specials. I have set the main page cell to specials in the DB, I have also tried using the URL instead.
Thanks!
/Peter
I believe I would have to disagree that http://www.scaffoldusa.com/specials points to http://www.scaffoldusa.com/index.php?main_page=specials. It may point closely to it, but entering both addresses gives two different results.
What information has been entered for each field of the ceon_uri_mappings table for any/all entries where the uri has /specials in it?
URI= /specials
Language_id= 1
current_uri= 1
main_page= specials (it used to say "page" but I changed it just now to specials, the others still says page)
query_string_parameters= NULL
associated_db_id= 17
alternate_uri= NULL
redirection_type_code= NULL
date_added= (the date it was added)
Check the specials link again, it now points somewhere but the link addresses hasen't changed on the website, shouldn't the links automatically change to /specials /new-products etc...?
/Peter
If the mapping is properly formatted, then yes the uri wouuld change. For a standard rewrite uri like this one, there is no associated_db_id, that too should be set to null.
As I went to test this again to see the effect of having 17 there, it appears that it has been removed... The uri for specials now points to the correct location.