Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping (SEO)

Ceon URI Mapping (SEO)

Locked

Views: 472,235

Results 601 to 620 of 2,913
This thread is locked. New replies are disabled.
24 Sep 2009, 1:50 PM
#601
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Ceon URI Mapping (SEO)

conor:

Nevertheless, the answer you are looking for is that you create a .htaccess file for each store and put these files in the individual stores' directories. Your server will check the .htaccess file in the root directory first, then it will check any subdirectories to see if they have .htaccess files.. so the .htaccess file for the appropriate store will be loaded when the webserver attempts to open /store or /test-store (i.e. /store/.htaccess or /test-store/.htaccess).

As both stores are in a subdirectory of the root of the site, you should use the appropriate rewrite rule example for stores which are in a subdirectory.

As long as your root .htaccess file doesn't interfere with the subdirectory .htaccess files, everything should be smooth enoughIMO, you did a fantastic job explaining how to setup the .htaccess per directory in your read me docs.. All of my client sites are set up in a dev environment with subdirectories for each client.. Your instructions got me up and running in NO time.. :smile:

28 Sep 2009, 8:59 AM
#602
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi,

DivaVocals:

IMO, you did a fantastic job explaining how to setup the .htaccess per directory in your read me docs.. All of my client sites are set up in a dev environment with subdirectories for each client.. Your instructions got me up and running in NO time.. :smile:
That's good to hear and nice of you to say, thanks! :)

All the best...

Conor
ceon

29 Sep 2009, 5:28 PM
#603
scatzc avatar

scatzc

New Zenner

Join Date:
Sep 2009
Posts:
79
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

Notes (that will hopefully help others) regarding installing Ceon URI Mapping when the hideCategories add-on is already installed:

There are no conflicting files between these two add-ons - except for one file:> admin/categories.php

Inside that admin/categories.php file, there are two distinct segments that, using a file compare utility like WinMerge, can simply be copied over to the original admin/categories.php from v1.3.8a. They are marked with the lines:

//Begin hideCategories code.
...
//End hideCategories code.

Applying admin/categories.php patches from Ceon 3.2.4 to the admin/categories.php from v1.3.8a can be done in the same manner: distinct segments that can simply be copied over. They are marked with the lines:

// BEGIN CEON URI MAPPING n of 5
...
// END CEON URI MAPPING n of 5

(of course, when either of these add-ons are applied to the original v1.3.8a file, the entire admin/categories.php can simply be copied, overwriting the original one).

Using the same "segmented-copy" approach, we can copy over the Ceon 3.2.4 segments, one-by-one, verbatim to their respective positions in admin/categories.php that has already been patched with hideCategories -- except for the last one (5 of 5)!

The last one is "special" in the sense that, if you use a file compare utility like WinMerge, it overlaps with the last segment from hideCategories. You can't just "copy over".

Therefore, care must be taken when applying this change:

  1. Do any of these last segments need to be modified (requiring programmer's code examination)?
  2. If not, which one comes first? Do we insert the Ceon 3.2.4 segment before the hideCategories segment or after it?

As of now, it appears that the correct answers are:

  1. No need to modify any of these two "last segments".
  2. The Ceon 3.2.4 segment should be inserted before the hideCategories segment

If I discover anything that contradicts the above, I will post an update here.

29 Sep 2009, 10:35 PM
#604
scatzc avatar

scatzc

New Zenner

Join Date:
Sep 2009
Posts:
79
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

DivaVocals:

IMO, you did a fantastic job explaining how to setup the .htaccess per directory in your read me docs.. All of my client sites are set up in a dev environment with subdirectories for each client.. Your instructions got me up and running in NO time.. :smile:
Now that I finally finished adding this module to my test store, I can say that I agree whole heatedly.

What an amazing job Conor did. One of the reasons it took me so long to add this module was the fact that I had to add it to a system that already had quite a few add-ons already integrated. I had to be very careful in comparing and applying every change - in addition to not really understanding every line of code or .htaccess statement.

Not only does Conor explains each and every step (and different cases/possibilities/configurations for each step), he also formats the document in a way that I haven't seen in any add-on.

I am thrilled at how this worked for me in the first attempt (knock wood...) without interfering with the hideCategories add-on.

Thank you, Conor!

29 Sep 2009, 11:36 PM
#605
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

scatzc:

What an amazing job Conor did. One of the reasons it took me so long to add this module was the fact that I had to add it to a system that already had quite a few add-ons already integrated. I had to be very careful in comparing and applying every change - in addition to not really understanding every line of code or .htaccess statement.So did I.. In fact, I was adding this to not one but TWO different sites. Conor made this work easy by CLEARLY identifying all the core files that might be overwritten. For me this made the WinMerge process loads easier since all I had to do was compare the clearly marked files to the ones already in place on both sites.

Overall Conor did an excellent job in packaging, documenting, and supporting this add-on.. Looking over the support thread, no question has been too small or too dumb. However, for my money IMO his documentation really explained EVERYTHING well.. I don't have to exactly understand what each line in the .htaccess does, but I do have to understand what I need to do to set it up for this add-on to work.. Which is why I said that IMO, Conor did a fantastic job explaining how to setup the .htaccess per directory in his readme docs..

30 Sep 2009, 4:15 PM
#606
scatzc avatar

scatzc

New Zenner

Join Date:
Sep 2009
Posts:
79
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

Question regarding FAQ #4: After "ticking" a few products (in the operational site) and verifying that this ingenious add-on works, I indeed encountered the appended “?cPath” at the the end of a product's URI.

I then referred to the FAQ which confirmed that this is not a bug, it is by design. It says: > There is no way to avoid the cPath parameter being added for linked products.
I then noticed that if I manually delete that “?cPath” suffix from the browser's address bar, the URI now corrects itself and whenever I search for a product or click a link to it, its URI always shows up without the “?cPath” suffix.

This is a great but now I wonder: Is this how it is supposed to behave? Are there undesired "side effects" to this?

Thanks.

30 Sep 2009, 8:51 PM
#607
scatzc avatar

scatzc

New Zenner

Join Date:
Sep 2009
Posts:
79
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

scatzc:

I then noticed that if I manually delete that “?cPath” suffix from the browser's address bar, the URI now corrects itself and whenever I search for a product or click a link to it, its URI always shows up without the “?cPath” suffix.

Update: None of my products are of the "Linked" type. Yet, some products (not all) get the “?cPath” appended upon URI creation. As stated before, if I manually Backspace the “?cPath” suffix, it will not re-appear.

I wonder whether I am the only one having this "problem" (not really a problem, at least for now).

3 Oct 2009, 3:06 AM
#608
sarabz avatar

sarabz

New Zenner

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

Re: Ceon URI Mapping (SEO)

I implemented this on our upgraded site, everything looked great and we went live a couple days ago. I was slowly converting all our pages, categories, products, manufacturers, etc over to the pretty URL's, and it was brought to my attention that the manufacturer pages were not letting you "add to cart" when they have a new URL. It just refreshes the page. Since this is my live site, I removed the URI Mappings for the manufacturers, although I had to do it through the database and not the admin utility, even when I deleted the text, it stuck around, and would not go back to the zen default urls.

Since my test site is down, and my live site I had to remove the errors to prevent further sales loss, I cannot show this to you at the moment, but I will try to get my test site back up in the next couple of days if needed.

Summary, since I kind of rambled, is:

  1. My major issue: on Manufacturer pages, when anything besides the default zen path is used, cannot do the multiple add to cart (when the products have no attributes). It just refreshes the page.

  2. This is minor, but on the Admin Manufacturers edit page, cannot remove the URI Mapping, have to remove manually from the database.

Our website is the most current 1.3.8a, with the most current CEON SEO mod. We do have a handful of other mods installed (better together, rewards points, image handler, zen light box, and a few others), but I don't think they are interfering here, since it seems to work everywhere but the manufacturers pages. I did several winmerges to see if I missed anything in the uploads, and everything seems to be correct. Our current setting is to go to the shopping cart after an item has been added, not to stay on the product/category page, but I'm not sure that makes any difference.

Hopefully someone here can help me out, I'd really like the URI Mapping to be implemented on the manufactures pages as well.

Thanks
Sara
b a b y S N A Z Z .com

5 Oct 2009, 7:00 AM
#609
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

Okay.. I'm ready to fire the trigger on this, and I was doing some final testing.. EVERYTHING works great with one exception..

After completing a sale, I get an error when I click the notifications button as follows:

Warning: urlencode() expects parameter 1 to be string, array given in /home/blahblahblah**/public_html/includes/init_includes/init_ceon_uri_mapping.php** on line 657

Warning: Cannot modify header information - headers already sent by (output started at /home/blahblahblah/public_html/includes/init_includes/init_ceon_uri_mapping.php:657) in /home/blahblahblah**/public_html/includes/init_includes/init_ceon_uri_mapping.php** on line 664

Warning: Cannot modify header information - headers already sent by (output started at /home/blahblahblah/public_html/includes/init_includes/init_ceon_uri_mapping.php:657) in /home/blahblahblah**/public_html/includes/init_includes/init_ceon_uri_mapping.php** on line 665
Any ideas what might be causing this??

5 Oct 2009, 2:40 PM
#610
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi,

DivaVocals:

Okay.. I'm ready to fire the trigger on this, and I was doing some final testing.. EVERYTHING works great with one exception..

That's great to hear! :)

DivaVocals:

After completing a sale, I get an error when I click the notifications button as follows:

Any ideas what might be causing this??

I can see what would cause the code to fail but not how you're arriving in the situation causing it.

The errors you have indicated would be caused by the redirection code in the module for a non-standard Zen Cart page incorrectly trying to encode a query string ($_GET) parameter which is an array.

I'm posting some code for you to prevent these errors appearing in the module but it's strange that you're reaching this point. It means that instead of your product notifications form using the POST method, as with any Zen Cart store/template I've seen, your store must be using the GET method. Also, you must have entered a URI manually for the account products notification page?

Anyway, replace the following loop in includes/init_includes/init_ceon_uri_mapping.php:

foreach ($_GET as $key => $value) {
                        $query_string .= '&' . urlencode($key) . '=' . urlencode($value);
                    }

with:

if (is_array($value)) {
                            foreach ($value as $key2 => $value2) {
                                $query_string .= '&' . urlencode($key2) . '=' . urlencode($value2);
                            }
                        } else {
                            $query_string .= '&' . urlencode($key) . '=' . urlencode($value);
                        }

It's kludgely and off the top of my head but that should work! I'll add better code to a future version of the module (a little recursive function of course).

All the best...

Conor
ceon

5 Oct 2009, 3:01 PM
#611
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi Sara,

sarabz:

  1. My major issue: on Manufacturer pages, when anything besides the default zen path is used, cannot do the multiple add to cart (when the products have no attributes). It just refreshes the page.

I'm afraid I can't replicate that behaviour on a fresh installation of ZC 1.38a and the latest version of the module. Everything works fine here on manufacturer's page with a mapped URI and several products with buy now buttons: I can keep going back and adding as many products at a time as I like, straight from the list! Something specific must be wrong on your site. Possibly with the template or something like that?

sarabz:

  1. This is minor, but on the Admin Manufacturers edit page, cannot remove the URI Mapping, have to remove manually from the database.

You're right about that! You've found a bug. I'll get that sorted for a future version (it is minor as you say but still must be fixed!).

All the best...

Conor
ceon

5 Oct 2009, 3:16 PM
#612
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi scatz,

First off thanks for the nice comments, they're really appreciated!

Secondly, thanks for the quick merge guide you wrote for others, hopefully you'll have saved someone some bother if they're using the Hide Categories module (haven't heard of that one myself).

scatzc:

Update: None of my products are of the "Linked" type. Yet, some products (not all) get the “?cPath” appended upon URI creation. As stated before, if I manually Backspace the “?cPath” suffix, it will not re-appear.

When building the URIs the module will add the cPath suffix only if a comparison with the full cPath for the product's master category (As returned by zen_get_product_path($product_id)) comes up as false (i.e. the product is not being linked to in its normal "home", its "master" category).

I'm afraid I can't replicate your problem, nor can I see how it could occur if you're the latest version of the code.. it's probably something that would to be traced manually.

As for why the module wouldn't add the cPath back on after you backspace it.. that would be because it never adds the cPath to product URI mappings, it only ever removes it if it thinks it doesn't need to be there (i.e. it doesn't match the full cPath to the product's master category).

Sorry I can't shed any more light on this.. hopefully something there will allow you to see what's wrong on your site?

If so let me know what caused the problem!

All the best...

Conor
ceon

5 Oct 2009, 5:50 PM
#613
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

Conor you SOOOOOOOO rock!! Yep I am getting ready to go live with this on two client sites. Sooo excited about it too..

Yeah it's weird how this error came up.. What's aggravating me is that I missed it in my QA..:censored: Oh well.. It happens..:laugh:

My template is a custom template (I always build my own templates based on the default Zen Template), and except for using the "Tableless Order Steps" mod for checkout, there are no other mods to the checkout pages. I am reasonably sure that the "Tableless Order Steps" mod didn't change anything to the default product notifications form methods. And you are right.. I did manually create a URI for the account products notification page.. (I was on a roll testing and creating URIs.. :laugh:)

Gonna try this code tonight and let you know how it goes.. Thanks again for your time.. :)

conor:

I can see what would cause the code to fail but not how you're arriving in the situation causing it.

The errors you have indicated would be caused by the redirection code in the module for a non-standard Zen Cart page incorrectly trying to encode a query string ($_GET) parameter which is an array.

I'm posting some code for you to prevent these errors appearing in the module but it's strange that you're reaching this point. It means that instead of your product notifications form using the POST method, as with any Zen Cart store/template I've seen, your store must be using the GET method. Also, you must have entered a URI manually for the account products notification page?

Anyway, replace the following loop in includes/init_includes/init_ceon_uri_mapping.php:

foreach ($_GET as $key => $value) {
$query_string .= '&' . urlencode($key) . '=' . urlencode($value);
}

>  
> with:
>  
> ```php
if (is_array($value)) {
                            foreach ($value as $key2 => $value2) {
                                $query_string .= '&' . urlencode($key2) . '=' . urlencode($value2);
                            }
                        } else {
                            $query_string .= '&' . urlencode($key) . '=' . urlencode($value);
                        }

It's kludgely and off the top of my head but that should work! I'll add better code to a future version of the module (a little recursive function of course).

All the best...

Conor
ceon

6 Oct 2009, 2:11 AM
#614
sarabz avatar

sarabz

New Zenner

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

Re: Ceon URI Mapping (SEO)

conor:

Hi Sara,

I'm afraid I can't replicate that behaviour on a fresh installation of ZC 1.38a and the latest version of the module. Everything works fine here on manufacturer's page with a mapped URI and several products with buy now buttons: I can keep going back and adding as many products at a time as I like, straight from the list! Something specific must be wrong on your site. Possibly with the template or something like that?

You're right about that! You've found a bug. I'll get that sorted for a future version (it is minor as you say but still must be fixed!).

All the best...

Conor
ceon

Thanks Conor for the fast reply! Your support for a free mod is incredible. :clap:

I will get my test site back up soon and see if I can figure it out. I have a fresh install as of about 2 weeks ago, I am using the classic template with some design changes. I have a few mods (stock by attributes, better together with the paid add-ons, rewards points, image handler, zen light box, attributes grid), none of which touch the manufacturer's page, and I would think it shouldn't behave any different than the regular category pages. I'll post back here if I can figure out what is going on! It works just fine when the URI Mapping is turned off for those pages, so its not completely urgent, but I would love for it to work on all the pages since the Manufacturer pages are a large part of our menu.

Any hints on what to look for?

6 Oct 2009, 2:14 AM
#615
sarabz avatar

sarabz

New Zenner

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

Re: Ceon URI Mapping (SEO)

sarabz:

Thanks Conor for the fast reply! Your support for a free mod is incredible. :clap:

I will get my test site back up soon and see if I can figure it out. I have a fresh install as of about 2 weeks ago, I am using the classic template with some design changes. I have a few mods (stock by attributes, better together with the paid add-ons, rewards points, image handler, zen light box, attributes grid), none of which touch the manufacturer's page, and I would think it shouldn't behave any different than the regular category pages. I'll post back here if I can figure out what is going on! It works just fine when the URI Mapping is turned off for those pages, so its not completely urgent, but I would love for it to work on all the pages since the Manufacturer pages are a large part of our menu.

Any hints on what to look for?

Oh, I forgot to mention another big mod for our site - the css-drop down menu. Not sure that could cause it either, but I just forgot to mention it.

6 Oct 2009, 5:48 AM
#616
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

Okay.. So I made this change, and I don't get the error, but I now get redirected to the site's blog page instead of the product notification page.. Weird..

**ETA: **I think I know why.. For some reason clicking the notifications button it redirects you to http://www.yourdomain.com/? which would redirect you to my blog.. (I'm using WOZ, and the "?" after the main URL directs you to the blog)

DivaVocals:

Conor you SOOOOOOOO rock!! Yep I am getting ready to go live with this on two client sites. Sooo excited about it too..

Yeah it's weird how this error came up.. What's aggravating me is that I missed it in my QA..:censored: Oh well.. It happens..:laugh:

My template is a custom template (I always build my own templates based on the default Zen Template), and except for using the "Tableless Order Steps" mod for checkout, there are no other mods to the checkout pages. I am reasonably sure that the "Tableless Order Steps" mod didn't change anything to the default product notifications form methods. And you are right.. I did manually create a URI for the account products notification page.. (I was on a roll testing and creating URIs.. :laugh:)

Gonna try this code tonight and let you know how it goes.. Thanks again for your time.. :)

6 Oct 2009, 8:57 AM
#617
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi Sara,

How are you?

sarabz:

Any hints on what to look for?

If it's not adding to the cart properly only when the URI Mapping module is enabled then the only thing I can think of is that the user's path to the cart page is being interrupted by a redirect.

The only reason I can see that happening is if the form on the manufacturers page doesn't make use of the zen_href_link function which is overridden by the URI Mapping module to add the mapping functionality.

So I'd check what the "action" of the form is. For example, on my test server zen138.local, on the page of the manufacturer gt_interactive the add to cart form tag is built as such:

<form name="multiple_products_cart_quantity" action="http://zen138.local/gt_interactive
```Hope that helps!

All the best..

Conor
[ceon](http://dev.ceon.net)
6 Oct 2009, 8:59 AM
#618
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi,

DivaVocals:

Okay.. So I made this change, and I don't get the error, but I now get redirected to the site's blog page instead of the product notification page.. Weird..

**ETA: **I think I know why.. For some reason clicking the notifications button it redirects you to http://www.yourdomain.com/? which would redirect you to my blog.. (I'm using WOZ, and the "?" after the main URL directs you to the blog)

Not really sure what you mean here.. I don't know what WOZ is?

All the best...

Conor
ceon

6 Oct 2009, 1:36 PM
#619
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

conor:

Hi,

Not really sure what you mean here.. I don't know what WOZ is?

All the best...

Conor
ceonSorry..:smile: WOZ is WordPress on ZenCart. It's an add-on that allows you to embed a WordPress blog into your store.. I don't use the embedding feature because since ver 2.7.x of WordPress, the mod has been problematic... It's just easier for me to style the blog to match the main site..

However, the WOZ sideboxes for this mod are quite useful in that they allow me to tie the blog to the store a little more directly than just a simple blog link on a menu. The WOZ sideboxes allow you to show your blog's active widgets in your store.

In any case, when WOZ is running if you go to http://www.yourdomain.com/**? **you will be taken to the blog.

So here's my dev site:
http: // clients . overthehillweb . com/hairisle

And if you go to this link:
http: // clients . overthehillweb . com/hairisle/?

You are re-directed here:
http: // clients . overthehillweb . com/hairisle/hairisleblog

So after making the code change you posted, when I click the notifications button on the checkout_success page, instead of being directed to the account notifications page, I am redirected to:
http: // clients . overthehillweb . com/hairisle/?

and this link takes me to my blog. Ahhh.. I am so very confused.. I can turn off notifications, but honest to goodness, I am hoping I don't have to ..:frusty:

On the bright side, the other site that I was adding your mod too went live with it's new pretty URLs last night.. (It is an existing site launched last year that we added Ceon URI to) The client still has to do the categories and products.. She's working on it and should have those all converted by the weekend.. But I added all the other pages to the DB (I have a script I use to make this work easier), and it's working PERFECTLY!!!

6 Oct 2009, 2:04 PM
#620
conor avatar

conor

Passed

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

Re: Ceon URI Mapping (SEO)

Hi,

DivaVocals:

Sorry..:smile: WOZ is WordPress on ZenCart.

Oh, right. I'd thought the W might stand for Wordpress but the OZ made it sound like some Australian thing! :)

The code I posted shouldn't result in an extra ? being added to the end of the URI, it only creates the query string if there are GET variables to create it from.

If you send me some FTP details for your site I can manually trace what is being created that is causing the redirect. Apart from that I'm afraid I'm out of ideas!

I don't use the PM system here so just use this link to contact me.

All the best...

Conor
ceon