Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Ceon URI Mapping (SEO)

Locked

Started by conor on 14 Jan 2009, 11:25 AM · Views: 473,810

Results 101 to 120 of 2,913
This thread is locked. New replies are disabled.
24 Mar 2009, 10:55 PM
#101
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #101 by conor

Hi,

HPG09:

Why not just restore the backup you took before installation? :dontgetit
lol You're probably not surprised to hear that most people don't backup before installing.. I have to admit that sometimes I have to catch myself on after "awk, I couldn't be bothered..." crossed my mind :)

All the best...

Conor

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Mar 2009, 12:57 PM
#102
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Post #102 by marg

Installed 3.0.2 - upgrading to 3.2.0 - How do I upgrade the database? Simply going to Admin/modules/Ceon URI Mapping (SEO) Config doesn't upgrade the database. Unless, of course, I have missed something.
Thanks

25 Mar 2009, 1:22 PM
#103
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #103 by conor

Hi,

Marg:

Installed 3.0.2 - upgrading to 3.2.0 - How do I upgrade the database? Simply going to Admin/modules/Ceon URI Mapping (SEO) Config doesn't upgrade the database. Unless, of course, I have missed something.

It should do. Are you sure you've copied all the files across? Including the auto_upgrade.php script?

If you are then please use this link to send me some admin and FTP details and I'll take a look.

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Mar 2009, 2:36 PM
#104
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Post #104 by marg

ceon_uri_mapping_auto_upgrade.php

I assume this is the file you are referring to. Yes, that's there and I have checked all the files several times.

I manually added the query_string_parameters
but need to know what else needs be done.

The line:
} else if (substr($version, 0, 3) == '3.0') {

If I change the above to 3.0.2 - will it do the necessary upgrade?

25 Mar 2009, 3:54 PM
#105
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #105 by conor

Hi,

Marg:

I manually added the query_string_parameters
but need to know what else needs be done.

If you haven't previously entered any alternative URIs in the database beginning with "index.php?main_page=" then you're done.

Marg:

The line:
} else if (substr($version, 0, 3) == '3.0') {

If I change the above to 3.0.2 - will it do the necessary upgrade?

No, it already matches that (look up the substr function on php.net if you'd like to see how/why).

Please don't go changing any code, I can't support modified versions of the module (without charging for the support).

It looks like you should be fine now anyway.. I don't know what you did wrong as you didn't give me the necessary access but if the version in the admin is reported as 3.2.0 then you've made all the necessary database changes and I'd imagine everything is now working for you!

Thanks for letting me know that, as expected, the new example rewrite rules included with 3.2.0 work just fine with Google Sitemaps! :)

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 Mar 2009, 4:04 AM
#106
stealthify avatar

stealthify

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

Post #106 by stealthify

Conor,
I just wanted to take a moment to say, you are a god among men!

Thank you for taking the time to make this!

I might be overwhelmed with joy to actually see this work as it is so far on my test site. I've tried Magic SEO for a friend's site that I developed, I've seen Ultimate SEO and others in action, but hands-down this appears to be exactly what I was looking for in terms of functionality.

So, thank you once again!

26 Mar 2009, 6:22 AM
#107
stealthify avatar

stealthify

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

Post #107 by stealthify

Alright, first question for you:

Is it a known bug for Ceon URI Mapping to alter/cause conflict with the "zen_href_link(FILENAME_DEFAULT)" in Zen Cart?

From what I understand, FILENAME_DEFAULT alone normally returns the root directory of the site. For example, its used in the default email template for when a new client registers on the site. (See line 30 of email_extras.php in the languages folder).

However, I notice that the zen_href_link(FILENAME_DEFAULT) now returns the web address to the latest entry in the zen_ceon_url_mappings table in the database.

For example, this is the steps I took to find the bug:

  • I have a fresh install of Zen Cart + Ceon URI Mapping
  • I've added a new category, and then a product in that category. I've assigned each of them an auto-generated URI.
  • Now, just by luck, I notice that the 'Home' link in the site's Breadcrums, the Home link in the default footer AND the Home link in the Welcome email sent to new customers all point to the latest product I made an auto-generated URI for.

Does this happen for you? Or is this just a problem on my end?

26 Mar 2009, 9:04 AM
#108
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #108 by conor

Hi,

stealthify:

Does this happen for you? Or is this just a problem on my end?

I'm guessing you're running 3.0.2 from the downloads area? (I think the Zen Cart team is a bit too busy with 2.0.0 to update the downloads area at the minute - maybe they'll upload 3.2.1 when I submit it to them later today).

That problem was fixed in 3.2.0...

http://dev.ceon.net/web/zen-cart/uri_mapping/downloads

Hope that helps!

Thanks for the nice comments about the module... I hope it does indeed work as you expect.

3.2.1 should be out later today, please upgrade to it when it is as it fixes a bug with the page_not_found feature of Zen Cart.

Upgrading should only take a few minutes, make sure you read the upgrading instructions that come with the module though!

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 Mar 2009, 2:22 PM
#109
stealthify avatar

stealthify

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

Post #109 by stealthify

That did the trick! You were correct, I did download the 3.0.2 version.

Upgrade went smoothly, and the zen_href_link(FILENAME_DEFAULT) has been fixed!

Also, the new instructions look superb.

One last question - tomorrow my project is to get the zen_href_link(FILENAME_CONTACT_US), FILENAME_CONDITIONS, etc all pointed to easier to read URI's (like mydomain.com/contact_us, mydomain.com/conditions).

I worked with it for a few hours earlier today on 3.0.2 with phpMyAdmin, but wasn't having much luck getting the zen_href_link's to properly link to the new URI's generated by Ceon. I could manually go to mydomain.com/contact_us and have it correctly display the built-in "index.php?main_page=contact_us" page, but if there's a link on my Zen Cart (such as the ones in the Information Sidebox), it doesn't seem to want to automatically generate the new URI's.

I'll find out more tomorrow as I see this section of the instructions are a lot more detailed than they were, but since I hadn't seen this example mentioned yet: is it true that Ceon URI Mapping can work with these other zen_href_link() links?

Thanks again Conor! Looking forward to 3.2.1

26 Mar 2009, 3:17 PM
#110
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #110 by conor

Hi,

stealthify:

That did the trick! You were correct, I did download the 3.0.2 version.

Thought it would. :)

stealthify:

Also, the new instructions look superb.

Thanks for saying so.. they took over 6 hours to write so I'm glad someone said that! :)

stealthify:

"index.php?main_page=contact_us" page, but if there's a link on my Zen Cart (such as the ones in the Information Sidebox), it doesn't seem to want to automatically generate the new URI's.

I don't know what you're doing wrong, maybe you're using "alternate_uri", the "old" way of doing things? Or maybe you forgot to enter "1" for the current_uri status field.

Adding what you asked is easily done:

In PHPMyAdmin add a record to the ceon_uri_mappings table with:

uri: /contact_us (actually, I'm recommending dashes in future as of 3.2.1 so I'd use /contact-us).

language_id: 1 (one for each language your store uses).

current_uri: 1

main_page: contact_us

date_added: select NOW()

All other values are left as null.

That's it, that will definitely work. (Unless you've got existing records, you should delete those if you're not changing them as above).

stealthify:

Thanks again Conor! Looking forward to 3.2.1

Might not be out until tomorrow as I've been sitting all day fiddling with colours on a new website design for a client. :)

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 Mar 2009, 7:48 PM
#111
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Post #111 by marg

Just a quickie - thanks! Tomorrow never comes soon enough!!

26 Mar 2009, 10:58 PM
#112
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Post #112 by mickmo68

Hello Conor,
I have Image Handler 2 installed and I'm unable to add additional images to the products. The main image loads fine thru IH2 but the additional images do not show up, they are suppose to be at the bottom. This is a result of the Ceon mapping. IH2 works fine on any product I have not updated (saved) but will not add the images after updating (saving). If this is any help, the first link is an item with additional images and is not Ceon updated yet:

http://keepsafeco.com/index.php?main_page=product_info&cPath=3_1_4&products_id=9

Item that is updated, (IH2 shows an additional image in Admin):

http://keepsafeco.com/strollers/baby_strollers_joggers/single_baby_strollers_joggers/all_terrain_baby_strollers_for_joggers_free_umbrella_stroller

Any thought would be helpful.
Thank you

27 Mar 2009, 2:36 AM
#113
stealthify avatar

stealthify

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

Post #113 by stealthify

conor:

I don't know what you're doing wrong, maybe you're using "alternate_uri", the "old" way of doing things? Or maybe you forgot to enter "1" for the current_uri status field.

When you're right, you're right!

Might have been a combination of things, it turns out: I also had the default '301' in the redirection_type_code. Since it was set by default I wasn't sure if I should change it. I changed it to null though, and now its working!

Was this the right thing to do? I believe I did mistakenly have something in the alternate_uri before as well. So, not sure which of the two things ended up fixing it. :(

conor:

Adding what you asked is easily done:

Couldn't have been any more straight-forward after your explanation. Thanks for taking the time to reply!

For anyone else trying to work with this mod, I HIGHLY recommend following through with it until you get it working. By its relatively complex nature, its certainly is not the easiest mod to incorporate with your Zen Cart - but, all things considered, a mod of this magnitude definitely warrants the extra time it takes to install.

Thanks again, Conor!

27 Mar 2009, 8:17 AM
#114
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #114 by conor

Hi,

stealthify:

When you're right, you're right!

It's easier to know what's going on when you wrote the actual software! ;)

stealthify:

Might have been a combination of things, it turns out:

No, it was just the "alternate_uri" field not being empty.. it has to be NULL if using the "main_page" field. The redirection code isn't used if alternate_uri is empty.

Obviously this is explained in the new docs, but it wasn't in the old docs so I understand the confusion.

Thanks for the nice comments about the module, it seems people do like it, which is nice as it took a lot to write! :)

Checking out the above image-handler problem and, if it doesn't affect the code in any way, 3.2.1 will be out within an hour or two. :)

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

27 Mar 2009, 8:26 AM
#115
stealthify avatar

stealthify

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

Post #115 by stealthify

conor:

No, it was just the "alternate_uri" field not being empty.. it has to be NULL if using the "main_page" field. The redirection code isn't used if alternate_uri is empty.

Ah, alright it all makes sense now. So would it be wise for me to put 301 back in the 'redirection_type_code' for these type of entries (contact_us, conditions, etc)? Or will it make no difference either way?

If this is mentioned in the new directions, my apologies, I'll re-read this section now! :)

27 Mar 2009, 8:29 AM
#116
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #116 by conor

Hi,

Mickmo68:

Hello Conor,
I have Image Handler 2 installed and I'm unable to add additional images to the products. The main image loads fine thru IH2 but the additional images do not show up, they are suppose to be at the bottom.

Neither of the pages you sent a link to show additional images at the bottom.

I'm not sure this is anything to do with the URI mapping module, but a coincidence based on the fact that you are updating the products.

I'll install Image Handler here myself to see but I don't see how changing the URI would have any effect on whether the additional images are shown or not.

Unless, the additional images are linked to without file extensions, in which case an exception to the rewrite rule would need to be added for the IH2 cache directory. I'd find that odd behaviour but it could be possible if IH2 uses URIs such as /cache/DFLKJ349DKS23 (at a guess, I don't know as I don't use that module!)

If I can't replicate the problem here and you still think this is the URI Mapping module and not a mistake you've made when updating the products then please get in contact privately with some FTP and admin details so I can take a look. Of course, you can delete any accounts created afterwards for peace of mind.

On a tangent.. the two links you sent me are to a type of buggy which I feel should not be sold any longer.. I hope you promote "parent-facing" buggies more on your site than the anti-social "forward-facing" buggies, they have been proven to have a less positive effect on the children as they are more socially isolating. (Really, I do believe this and have fairly strong feelings about it! ;) ).

All the best..

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

27 Mar 2009, 8:36 AM
#117
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #117 by conor

Hi,

stealthify:

Ah, alright it all makes sense now. So would it be wise for me to put 301 back in the 'redirection_type_code' for these type of entries (contact_us, conditions, etc)? Or will it make no difference either way?

It doesn't make a difference.

stealthify:

If this is mentioned in the new directions, my apologies, I'll re-read this section now! :)

It's not currently mentioned that this code isn't used (every other field is mentioned though). I'll specifically mention it in 3.2.1's docs so there's no ambiguity! Guess I've learnt that I need to be 100% specific to be sure that there are no questions for people to have to ponder and ask about! :)

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

27 Mar 2009, 9:21 AM
#118
gerjan avatar

gerjan

New Zenner

Join Date:
Dec 2007
Posts:
74
Plugin Contributions:
0

Post #118 by gerjan

Hi Conor,

As I mentioned by PM, everything is working fine. But have a "little":smile: problem.

I was working a friends webshop and he is using an extra domain name. In the htaccess there is this redirect for it but when uri mapping rules are active, this redirect doesn't work. Here's the htaccess (as you can see uri-mapping rules are inactive now):

RewriteEngine On
#Rule-0

Don't rewrite any files ending with .[xxxx], except for scripts/HTML files

#RewriteCond %{REQUEST_URI} !.[a-zA-Z]{2,4}$ [OR]
#RewriteCond %{REQUEST_URI} .(php|xml|html|htm|aspx)$ [NC]

Don't rewrite cpanel directories

#RewriteCond %{REQUEST_URI} !/cpanel.* [NC]
#RewriteCond %{REQUEST_URI} !/frontend.* [NC]

Don't rewrite admin directory

#RewriteCond %{REQUEST_URI} !/admin.* [NC]

Don't rewrite editors directory

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

Don't rewrite payment pages/callback handlers

#RewriteCond %{REQUEST_URI} !/googlesitemap.php.* [NC]
#RewriteCond %{REQUEST_URI} !/ideal_callback.php.* [NC]
#RewriteCond %{REQUEST_URI} !/ipn_main_handler.php.* [NC]
#RewriteCond %{REQUEST_URI} !/iridium_3d_secure_iframe.php.* [NC]
#RewriteCond %{REQUEST_URI} !/localities_remote_loader.php.* [NC]
#RewriteCond %{REQUEST_URI} !/nochex_apc_handler.php.* [NC]
#RewriteCond %{REQUEST_URI} !/protx_direct_3d_secure_iframe.php.* [NC]
#RewriteCond %{REQUEST_URI} !/realex_remote_3d_secure_iframe.php.* [NC]

Handle all other URIs/file types (php|html|htm etc.) using Zen Cart (index.php)

#RewriteRule (.*) index.php?%{QUERY_STRING} [L]

#Rule-1
RewriteCond %{HTTP_HOST} ^niels-slaapcomfort.nl$
RewriteCond %{REQUEST_URI} !^/nielsslaapcomfort
RewriteRule (.*) /nielsslaapcomfort/$1

#Rule-2
RewriteCond %{HTTP_HOST} ^www.niels-slaapcomfort.nl$
RewriteCond %{REQUEST_URI} !^/nielsslaapcomfort
RewriteRule (.*) /nielsslaapcomfort/$1

I already asked the the isp but they could not tell me what the problem could be. I used their hosting manager wich automaticly can write redirects an I also tried manually but without succes. Also changing the sort-order of rulenumbers didn't make any difference. As you already now I'm not very technical so that's why I and up here :wink:

Hope you can give me some advice...

Thanks in advance, Gerjan - The Netherlands

27 Mar 2009, 9:36 AM
#119
gerjan avatar

gerjan

New Zenner

Join Date:
Dec 2007
Posts:
74
Plugin Contributions:
0

Post #119 by gerjan

Mickmo68:

Hello Conor,
I have Image Handler 2 installed and I'm unable to add additional images to the products....

Any thought would be helpful.
Thank you

I also use IH2, everything is working fine. I only use IH2 to get optimal resolution of the images wich IH2 does automaticly.

I upload my images manual with ftp. Hope this info helps...

Here's a link with aditional images and uri mapping on.

Gerjan

27 Mar 2009, 9:39 AM
#120
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Post #120 by conor

Hi Gerjan,

How are you? :)

When I wrote the module and released it I really didn't think I's start having to become an expert on rewrite rules! ;)

I think you need to exclude the directory that is being used by the other domains from the rewrite.

Also, you're using the old example rewrite rules, not the new ones from 3.2.0.

I think you should try the following. If it doesn't work please e-mail me rather than posting here as this is obviously server specific and lots of rewrite rules being posted in this thread obscures the posts about the module itself!

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxx])
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,4}$
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/admin.* [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors.* [NC]
# Don't rewrite payment pages/callback handlers
# (Won't be rewritten by rules above but included here in case rewriting of URIs ending in .php is added)
RewriteCond %{REQUEST_URI} !^/ipn_main_handler.php.* [NC]
RewriteCond %{REQUEST_URI} !^/iridium_3d_secure_iframe.php.* [NC]
RewriteCond %{REQUEST_URI} !^/localities_remote_loader.php.* [NC]
RewriteCond %{REQUEST_URI} !^/nochex_apc_handler.php.* [NC]
RewriteCond %{REQUEST_URI} !^/protx_direct_3d_secure_iframe.php.* [NC]
RewriteCond %{REQUEST_URI} !^/realex_remote_3d_secure_iframe.php.* [NC]
# Don't rewrite cPanel directories
RewriteCond %{REQUEST_URI} !/cpanel.* [NC]
RewriteCond %{REQUEST_URI} !/frontend.* [NC]
# Don't rewrite nielsslaapcomfort directory
#RewriteCond %{REQUEST_URI} !^/nielsslaapcomfort.* [NC]
# Handle all other URIs using Zen Cart (index.php)
RewriteRule (.*) index.php?%{QUERY_STRING} [L]

Hope that helps!

On a side note.. obviously the best idea here is to not share the same space between several websites.. not good practice in my opinion! :)

All the best...

Conor
Ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.