Zen Cart Logo
Forums / All Other Contributions/Addons / Ultimate SEO v3 (and v2.200) [Support Thread]

Ultimate SEO v3 (and v2.200) [Support Thread]

Views: 427,443

Results 41 to 60 of 1,706
29 Sep 2012, 8:46 PM
#41
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Ultimate SEO v3 (and v2.200) [Support Thread]

morrisgiftshop:

Would this mod will help the search engines to find your more or less?

If you want to discuss Search Engine related topics, please use the Search Engines section of the forum. There are a large number of topics and discussions on how to optimize your site for search engines. A couple of threads at a glance: Custom rewrites for on page seo, Key words in URL, and basic operation for SEO.

This thread should be used for support and version announcements of "Ultimate SEO URLs" only.

29 Sep 2012, 10:05 PM
#42
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

lhungil:

For all of the demo sites I've seen, including my stock 1.5.0 and 1.5.1 test sites, and my development site (lots of modules, different templates, etc) If you pull up the source and look at the "Form Action" you will see a URL like the first one you listed. This is the correct URL.

Just to clarify, I've added some example URLs found in the "form action" for adding a product to a URL. The log files and / or looking at the files I mentioned earlier should hopefully help you narrow down where things in your installation are broken.

Some examples

http://demo.zen-cart.cn/hewlett-packard-sale-with-attributes-on-sale[B]-p-60[/B].html?action=add_product&number_of_uploads=0
http://www.earth.local/store/dvd-movies-c-3/cartoons-c-3_13/a-bugs-life-linked[B]-p-8[/B].html?action=add_product
http://www.earth.local/zen-cart-v1.5.1/hardware-c-1/keyboards-c-1_8/microsoft-internet-keyboard-ps2[B]-p-25[/B].html?action=add_product&cpath=1
http://www.prom-mart.com/demo-1/index.php?[B]main_page=product_info[/B]&cPath=1_4&products_id=1&number_of_uploads=0&action=add_product
2 Oct 2012, 5:17 PM
#43
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

craftideasweekly:

This plugin works perfectly on the site I am setting up (Yarnstyle.com, Zen 1.5.0) EXCEPT for the add to cart functionality is not working. :)
I suspect it is something I need to change in the .htaccess file....

I have verified the add to cart button works when I turn this plugin off so it has something to do with this installation. Any advice on where I should look to make changes?

I was finally able to duplicate this in one of my environments (only took me three days and lots of settings changing). My apologies: you were right, the culprit is in the .htaccess file.

Change:

RewriteRule ^(.*)-c-([^/])/(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$4&cpath=$2 [L]

To

RewriteRule ^(.*)-c-([^/])/(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
2 Oct 2012, 5:24 PM
#44
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Affected Environments
Everyone, especially those running with "Categories as Directories". Everyone should update their .htaccess file accordingly.

Credits
Thanks to craftideasweekly for finding this bug.

Notes
The needed changes will be incorporated in the next release. In the meantime you can download and examine a copy of the new .htaccess sample file.

2 Oct 2012, 8:23 PM
#45
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

htaccess Update / Patch Preview

3 Oct 2012, 3:33 AM
#46
craftideasweekly avatar

craftideasweekly

New Zenner

Join Date:
Jun 2011
Posts:
21
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

lhungil:

Affected Environments
Everyone, especially those running with "Categories as Directories". Everyone should update their .htaccess file accordingly.

Credits
Thanks to craftideasweekly for finding this bug.

Notes
The needed changes will be incorporated in the next release. In the meantime you can download and examine a copy of the new .htaccess sample file.

Thank YOU!!! I had tried your other suggestions and figured I was missing something and turned the plugin off.
I'll add this to the .htaccess file, re-activate the plugin, and confirm it fixes the issue.

thanks again,
Molly

3 Oct 2012, 3:40 AM
#47
craftideasweekly avatar

craftideasweekly

New Zenner

Join Date:
Jun 2011
Posts:
21
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Confirmed -- the new .htaccess file worked like a charm! Thank you again!!:)

3 Oct 2012, 7:34 PM
#48
adamells avatar

adamells

New Zenner

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

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Everything is working for me except the "Buy Now" buttons on the product list page. I get exactly the same link for every product:

http://site/categoryname-c-1/?action=buy_now&sort=20a

Clicking the link just takes you to an empty cart, which makes sense since there's no product ID to pass. Turning off SEO makes the links work:

http://site/index.php?main_page=index&cPath=1&sort=20a&action=buy_now&products_id=2

I'm running 1.5.0 and I've re-copied the Ultimate SEO just to make sure I had the right files and versions. I am using the updated .htaccess (but this doesn't look like an .htaccess problem). Turning on/off pretty much every option in SEO URLs doesn't affect it.

Am I the only one with this issue? Any solutions? Thank you!

3 Oct 2012, 9:22 PM
#49
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

I recall someone having this or a similar problem some time back. His add to cart button from category product lisings did not work properly with Ultimate SEO. I think it was on the Search Engines forum. I spent a bit of time trying to find thread but couldn't. I don't think it was in the Ultimate SEO thread here:

http://www.zen-cart.com/showthread.php?44104-Ultimate-SEO-URLs

I recall it being a separate thread and don't recall if there was ever a solution.

BTW, it helps if you give the forum a link or text address to see your site. Sometimes someone might see the problem. Possibly other plugins or even templates (TM?) might be the cause of problems.

3 Oct 2012, 9:31 PM
#50
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Here's another link (not the one I referenced) where someone had an add to cart problem with Ultimate SEO:

http://www.zen-cart.com/showthread.php?198381-Add-to-cart-showing-page-not-found&highlight=ultimate+seo+add+button

Looks like site went back to dynamic urls. Also, is a TM template which may have been a factor in the problem.

3 Oct 2012, 9:51 PM
#51
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Can you post the contents of your .htaccess, a screen shot of your current settings for "SEO URLs", a list of plugin / modules installed, and a link to your site please? Also do you see this behavior when using the template / theme Zen Cart comes with?

I am especially interested in the following lines from your .htaccess.

RewriteBase /shop/

# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-c-([^/])/(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]

Those two lines are vital as they ensure "action=add_product" is sent to Zen Cart. The order the rules are listed in the .htaccess file are also important.

3 Oct 2012, 10:05 PM
#52
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

The previous fix was for the regular "buy" button on product pages. I will take a look at the "buy now" button in product listings as soon as I can.

4 Oct 2012, 2:39 PM
#53
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Affected Environments
Stores using the "Buy Now" links or "Add selected products to cart" feature on product listing pages.

Credits
Thanks to adamells for finding this bug.

The fix
Starting at line 418 in "includes/classes/seo.url.php" change:

//	case ($page == FILENAME_PRODUCT_INFO && !$this->is_attribute_string($params)):

to:

	case ($page == FILENAME_DEFAULT):
		$container[$p2[0]] = $p2[1];
		break;

Notes
I tested this change against both clean and modified Zen Cart 1.5.0 and 1.5.1 installations.

9 Oct 2012, 5:25 AM
#54
timbojrjr1 avatar

timbojrjr1

New Zenner

Join Date:
Oct 2012
Posts:
23
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

I installed Ultimate SEO Url's tonight and first off got a 500 error on my website and also on the admin. Changed Rewrite Engine to Off and now my homepage and admin work but any other page on my website gets a 404 error. I tried changing all the setting on the plugin in the admin but my site only works if I change the Enable SEO Urls to off. Not sure what I did wrong or what code I didn't add to .htaccess. I didn't previously have a .htaccess for my site because it is pretty new and I wanted to get the plugin's installed before I add all the security functions. This is my website maybe you could spot something http://www.luckylaketackle.com. Any help would be greatly appreciated. Thank you so much for your help.

9 Oct 2012, 5:36 AM
#55
timbojrjr1 avatar

timbojrjr1

New Zenner

Join Date:
Oct 2012
Posts:
23
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Now I got those to work by adding

Options +FollowSymLinks
RewriteEngine on
RewriteRule index-main_page-(.)-cPath-(.).html$ index.php?main_page=$1&cPath=$2

I just went to a URL Rewriting website and put a path to one of my products in it and it wrote this out for me. Not sure why this works? This .htaccess file is really confusing to me.

Ok now I took out that code and just replace the top of the .htaccess file to

Options +FollowSymLinks
RewriteEngine on

It seems like the RewriteEngine On caused a problem with a capital O. Not sure why this made a huge difference.

9 Oct 2012, 1:33 PM
#56
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

timbojrjr1:

It seems like the RewriteEngine On caused a problem with a capital O. Not sure why this made a huge difference.

Thank You for letting us know both the issue you ran into and what the fix was for your server environment.

Some servers are more picky then others (depends on the web server, what version, who compiled, if a htaccess scanner was used, etc). I have not seen any problems using "On" on multiple test sites running apache2 (with and without a .htaccess scanner) and IIS (with a filter to use .htaccess files)... But for compatibility I'll probably switch to just "on" as lowercase when I release an example .htaccess in the future just to be safe (Apache2 documentation uses lowercase).

9 Oct 2012, 7:24 PM
#57
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Lat9 just posted an interesting thread on the forums. While looking through the code for page_not_found, he noticed it does not exclude the page from being added to the navigation history!

I would venture any sites which have been plagued by the "back button glitch" causing the button to send a user to "page_not_found" may actually be caused by having a broken js, css, image, or other resource! Any 404 will go to this page (yes even missing resources) when you have enabled "Ultimate SEO URLs" (and potentially other re-writer's).

https://www.zen-cart.com/showthread.php?200899-page_not_found-should-remove-itself-from-the-navigation-history

Applying the fix in post #1 from Lat9 appears to work in my environment when I purposely add a reference to a missing resource. Of course, if the fix works for you, you may want to look around in your theme and pages (or server logs) to find and fix the missing (or broken) resource.

10 Oct 2012, 5:25 PM
#58
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Example .htaccess
I have been working on a new example .htaccess file. It is working correctly in my test environments: Linux, PHP 5.2 and 5.3, Zen Cart 1.5.0 and 1.5.1.

The changes in this file are still in testing. If you have a working site with this plugin already, make sure you backup the existing .htaccess before trying the changes shown here.

Keep in mind after you change the .htaccess you may need to clear your browser cache to see everything in action. When changing some settings (such as "categories as directories") in the admin configuration you will need to edit the .htaccess and may wish to also reset the SEO Cache to see the changes immediately.

Added Support
Some performance enhancements, more exact matching, and better handling of 301s after changing settings in both the admin configuration and the .htaccess file.

Removed Support
This version of "Ultimate SEO URLs" does not support Zen Cart 1.3.x. The 1.3.x versions of "Ultimate SEO URLs" included in the .htaccess file examples for "Open Operations Info Manager" or "Dreamscape's News & Articles Manager". These have been removed from the .htaccess file because the plugins are not readily availability for Zen Cart 1.5.x.

File Contents

##### NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /shop/

# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ $3-p-$4\.html?cPath=$2&%{QUERY_STRING} [R=301,L]

# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]

# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]

# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)\.html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.*)-c-([0-9_]+)/$ $1-c-$2\.html [R=301,L]

# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/?\.html$ $1-c-$2/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)/$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]

# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-m-([0-9]+)\.html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)\.html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)\.html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)\.html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)\.html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]

# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]

# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]
11 Oct 2012, 4:19 PM
#59
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

New example .htaccess seems to be working for me:

prommart com

Thanks!

11 Oct 2012, 6:51 PM
#60
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Back Button glitch fix mentioned in post # 57 also working for me. Thanks again!