X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   XC SEO v1.1.0 Released (https://forum.x-cart.com/showthread.php?t=25297)

teddychan 10-04-2006 11:57 AM

Re: XC SEO v1.1.0 Released
 
okay, i think i found the solution. the problem is on the line:

replace:
Code:

$product['descr']."\t".

with

Code:

func_froogle_convert($product['descr'], 65536)."\t".

in the install_how_to file

there should be two three line need to be replaced (included the comment out line)

intel352 10-05-2006 07:02 AM

Re: XC SEO v1.1.0 Released
 
Refer here for the latest (accurate) install docs, until I get another release out. I apologize for any issues:

http://x-cart-seo.googlecode.com/svn/branches/xc_seo_module/x-cart-seo%20docs/

Please note the Froogle modification instructions are different, there are issues in the current release's implementation of the Froogle changes.

KCAutosound 10-07-2006 06:16 PM

Re: XC SEO v1.1.0 Released
 
Sorry guys but I've been reading through the earlier posting of this and also this one and I am still trying to figure out what this is and what the benifits of it are. Can somebody please tell me in basic form what this is and why I need it.

ShishaPipeUK 10-08-2006 08:16 AM

Re: XC SEO v1.1.0 Released
 
SEO stands for Search Engine Optimisation, search engines discriminate against ID numbers in URL strings and this mod helps and makes life a little easier for those lovable bots and spiders who crawl our pages.

Whether you believe the fact that search engines discriminate against ID numbers in URL strings or not, the fact of the matter is that

[1] http://www.theshisha.com/shopcart/product.php?productid=16242

will never look as nice to the end user, or search engines, as

[2] http://www.theshisha.com/shopcart/Soex-Herbal-Strawberry-250g-pr-16242.html

With the second option, you can see what the product is in the URL without even going to that page, where as the first option you do not know what the product is.

Both these above links, link to the same page but the search engine, spider that crawls our web sites would prefer the second option which is a html page and not a PHP page.

jamesh3 10-10-2006 03:42 PM

Re: XC SEO v1.1.0 Released
 
Is there a way of getting this to run on Webserver Software Zeus 4.3?
I just found out that my host uses this not apache. A quick google suggests there is a rewrite command but does not work for SEO stuff.

intel352 10-11-2006 04:39 AM

Re: XC SEO v1.1.0 Released
 
Not currently, but possibly in the future. For now, you definitely need rewrite functionality

Scott DeToffol 10-12-2006 06:15 AM

Re: XC SEO v1.1.0 Released
 
I'm getting 1,963 URLs not followed due to redirect errors under Google Webmaster Tools.

Here is an example URL listed by Google:

Google is indexing many of my pages, but they don't seem to be indexing my product pages, and none of my pages using this mod's reformatted URLs.

intel352 10-12-2006 06:46 AM

Re: XC SEO v1.1.0 Released
 
This is an issue that exists due to X-Cart's redirect mechanism + functionality in XC SEO. If there is no established cookie when a user visits a .php style url, and the user gets redirected to the .html url (i.e.- either cookies are turned off OR your visit to the .php url is your first time to the site), X-Cart's redirect function will insert the xid session into the url. XC SEO attempts to strip the xid value from the url and redirect, which begins a loop (since x-cart will once again insert the xid value).

The session id (xid) should *not* be included in the url for search engines, because that may lead to session issues when a user visits a url that has the xid value appended. I've reported this issue to X-Cart, with the suggestion that they do not append xid for bots. They have responded saying that this change will be incorporated into the next release of X-Cart (in my case, v4.1.4).

I'll post a release of XC SEO today, along with the session id fix for bots. I had delayed a release, because I was waiting for results from google to make sure my changes were effective. (I found this issue happening with *some* google bots on SoundChoiceStore, 20416 urls had been reported by google as having redirect problems, tho a number of the urls were the same url with a different session value attached. Since I've implemented the session fix for bots, google appears to have had no more issues)

I apologize for any problems this has caused for you, but rest assured the fix is on it's way

jasonroy 10-12-2006 07:42 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by intel352
This is an issue that exists due to X-Cart's redirect mechanism + functionality in XC SEO. If there is no established cookie when a user visits a .php style url, and the user gets redirected to the .html url (i.e.- either cookies are turned off OR your visit to the .php url is your first time to the site), X-Cart's redirect function will insert the xid session into the url. XC SEO attempts to strip the xid value from the url and redirect, which begins a loop (since x-cart will once again insert the xid value).

The session id (xid) should *not* be included in the url for search engines, because that may lead to session issues when a user visits a url that has the xid value appended. I've reported this issue to X-Cart, with the suggestion that they do not append xid for bots. They have responded saying that this change will be incorporated into the next release of X-Cart (in my case, v4.1.4).

I'll post a release of XC SEO today, along with the session id fix for bots. I had delayed a release, because I was waiting for results from google to make sure my changes were effective. (I found this issue happening with *some* google bots on SoundChoiceStore, 20416 urls had been reported by google as having redirect problems, tho a number of the urls were the same url with a different session value attached. Since I've implemented the session fix for bots, google appears to have had no more issues)

I apologize for any problems this has caused for you, but rest assured the fix is on it's way


definitely anxiously awaiting this ;)

question about updating...i have 1.0.6 installed and noticed that you're up to 1.1.1. Is it as simple as uploading the new files, or do I need to re-run the sql commands?

Sahani 10-14-2006 07:19 AM

Re: XC SEO v1.1.0 Released
 
your mod is excellent. Thanks for the time you have spent on it. Look forward to your session ID fix :)

Sahani 10-17-2006 04:58 AM

Re: XC SEO v1.1.0 Released
 
Hi I get the following error now when I attempted to patch my live store -

PATCH RESULTS
SQL PATCH FAILED AT QUERY:
INSERT INTO xcart_config (name,comment,value,category,orderby,type,defvalue ) VALUES ('xcseo_keyword_injection','Specify a keyword to inject into rewritten urls','','XC_SEO',10,'text','')

PATCH LOG


Has anyone come across the same or similar problem?

intel352 10-17-2006 05:13 AM

Re: XC SEO v1.1.0 Released
 
If you have already run the SQL, do not re-run the SQL commands, as it will put double-entries into your database.

Sahani: what version of X-Cart are you running?

Sorry I haven't posted the release yet guys, I apologize, I have to doublecheck documentation today to make sure the upgrade process is properly recorded, then I should be able to upload the release. I've just been busier than usual as of late :-(

Sahani 10-17-2006 06:51 AM

Re: XC SEO v1.1.0 Released
 
Hi there intel352.
After getting the error, I checked the SQL tables and nothing had been inserted. I re-logged into x-cart and retried the SQL updates and it worked fine. I have no idea why I got the error result...maybe a session issue with x-cart..i can only speculate :(

I am currently running x-cart 4.12, the mod now works fine on my live store...www.sahanishop.com

Thanks again :)

jasonroy 10-18-2006 11:24 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by intel352
Sorry I haven't posted the release yet guys, I apologize, I have to doublecheck documentation today to make sure the upgrade process is properly recorded, then I should be able to upload the release. I've just been busier than usual as of late :-(


No worries, while we're all anxious we're still patient. Can't really complain when its a freebie, right?

Jerrad 10-18-2006 11:46 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by intel352
Sorry I haven't posted the release yet guys, I apologize, I have to doublecheck documentation today to make sure the upgrade process is properly recorded, then I should be able to upload the release. I've just been busier than usual as of late :-(


I'm the one that should apologize - it's because of me that intel is busier than usual... ;-)

His interpretation of helping is beyond anything I ever experienced! :-) :-)

Scott DeToffol 10-20-2006 06:54 AM

Re: XC SEO v1.1.0 Released
 
Intel352 - any way you could update us on when your next version will be ready? I'm trying to be patient but I have a feeling that Google is about to re-index my site and I'd love to get the latest bits.

Thanks.

Viejo 10-20-2006 06:45 PM

Re: XC SEO v1.1.0 Released
 
Intel352: What a great contribution to the forum. I set it up on a 4.1.3 that I'm building and it works just great! Can't thank you enough.

Been looking at the rewritten url for categories. In a large store there may be so many similar products in a category (or in the store for that matter) that a simple url (www.somesite.com/sweaters/great-sweater.html) will confict at some point. The categories shouldn't, I would think, and the category page is very often a landing page on our sites. We SEO them and bring visitors there instead of to a specific product page (unless it's a ppc visitor).

What do you think of adding a todo for an option in your module that truncates the category rewrites to just the category name, i.e. www.somesite.com/sweaters.html ?

intel352 10-24-2006 08:13 PM

Re: XC SEO v1.1.0 Released
 
XC SEO v1.1.5 released

I apologize for the multiple delays, I wanted to give this "version" a bit more time to test. Is working well on SoundChoiceStore, please give feedback for your installation.

See first post for download.

Changelog

Quote:

XC SEO 1.1.5 (rev 37 - October 24, 2006)
====================================

* Fix: X-Cart internal Redirect mechanism fixed to prevent adding SessionID for bots
* Fix: Language selector redirect was not functioning properly due to structure of rewritten URLs
* Fix: XC SEO will no longer do any URL processing/checking on a "redirect" URL, such as after form submission
* Fix: XC SEO will no longer do any URL processing/checking on non-GET requests
* Added secure.htaccess - optional rules to add to top of .htaccess file for security (no guarantees provided, intended for 4.1.x series...)
* Added options to Admin configuration of XC SEO for further tweaking of search engine optimization
* Added ability to rewrite SIMPLE search urls
- for users that have scripts to show Recent Searches (geared towards search engines,
- but also useful to users. I'll release a Recent Searches script separately)
* Added condition that if Webmaster Mode is enabled, XC SEO does not rewrite URLs. Helps Webmasters when linking to products/pages
- Example: when you create a link within X-Cart to a product, you should link to the original product.php url, so that
- XC SEO may rewrite the urls with the same consistent algorithm (mainly for the event of a bug-fixed release)
* Updated install/remove SQL
* Updated url matching REGEX for accuracy within html
* Updated XC SEO to more accurately match URLs that need to be redirected


intel352 10-24-2006 08:15 PM

Re: XC SEO v1.1.0 Released
 
Viejo, the module currently implements the category id in the url, so that X-Cart's speed doesn't change much (if any). I do intend to release a more "intensive" version of XC SEO at a later date, that will focus on truncating ALL urls so that they no longer need the category/product id, etc. Similar to CD SEO

Quote:

Originally Posted by Viejo
Intel352: What a great contribution to the forum. I set it up on a 4.1.3 that I'm building and it works just great! Can't thank you enough.

Been looking at the rewritten url for categories. In a large store there may be so many similar products in a category (or in the store for that matter) that a simple url (www.somesite.com/sweaters/great-sweater.html) will confict at some point. The categories shouldn't, I would think, and the category page is very often a landing page on our sites. We SEO them and bring visitors there instead of to a specific product page (unless it's a ppc visitor).

What do you think of adding a todo for an option in your module that truncates the category rewrites to just the category name, i.e. www.somesite.com/sweaters.html ?


Jerrad 10-25-2006 05:29 AM

XC SEO v1.1.5 Released
 
Thanks for this new version intel!
As far as I can tell now, it works great.

I can't find the includes/func/func.core.php in x-cart version 4.0.12, but I do have the get_language.php in the include directory.
The code that need to be changed when the language selector is enabled, is on line 130.

Thanks again! :)

Viejo 10-25-2006 05:33 AM

In re feedback: I have 1.1.1 installed on two carts we are close to taking live. (4.1.3 and 4.0.19) There have been no issues at all to date. If there is a speed hit it appears to be slight. Urls work as expected. Customizations are a little tricky but we have made them to both the tpls and the root .htaccess. I'll rate the mod as top-notch and invaluable.

Intel352: Please pm me if you want to see our sites or know more about the how and why of our category handling. I don't want to hijack the thread.

intel352 10-25-2006 05:47 AM

Re: XC SEO v1.1.0 Released
 
Update: the change that is needed for include/func/func.core.php in 4.1.x, should be done in include/func.php for 4.0.x

I'm working up updating the docs

jasonroy 10-25-2006 07:06 AM

Re: XC SEO v1.1.0 Released
 
going through the install on 4.1.3 right now.

noticed this...

the doc for 1.1.1 - 1.1.5 upgrade says

Quote:


-----------
Find Code:
-----------
if (!preg_match('!(\.htm(l)?|/$)!',$_tmp["path"])) {
func_header_location($l_redirect);
}
------------
Replace With
------------
################################################## ##########
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
################################################## ##########
if (!empty($active_modules["XC_SEO"])) {
func_header_location($l_redirect);
}else{
if (!preg_match('!(\.htm(l)?|/$)!',$_tmp["path"])) {
func_header_location($l_redirect);
}
}
# End SEO


The only line that resembles what you've specified to find in my get_language.php file says

Quote:

if (
($current_area == "C" || $current_area == "B") &&
!empty($HTTP_GET_VARS["sl"]) &&
!defined('IS_ROBOT') &&
!preg_match('/\.html?($|\?)|\/$/s', $l_redirect)
) {
func_header_location($l_redirect);
}


Either way I don't think it matters since it says its optional and I run a single language on my site.

intel352 10-25-2006 08:34 AM

Re: XC SEO v1.1.0 Released
 
Nice catch jason, I'll have to doublecheck against 4.1.3 (argh, 4.1.3 had a number of changes, lol...)

EDIT: btw, the point of that edit, is that the get_language file is NOT redirecting of the previous page had a .html extension. Which means it won't redirect back to an SEO'd url... :-\ Really I need a better workaround that what I implemented, just haven't come up with one yet

Scott DeToffol 10-25-2006 09:11 AM

Re: XC SEO v1.1.0 Released
 
I've noticed that when moving from http to https that the urls are not reformatted. Is this as designed?

intel352 10-25-2006 09:23 AM

Re: XC SEO v1.1.0 Released
 
Yes, the thought process is that search engines *shouldn't* be accessing your HTTPS site, and additionally most stores force users back to the http domain when they are wanting to browse more products. Also, wanted to avoid any unforseen issues with https urls (i.e.- in the event that a site is on shared SSL, there can be problems...)

If you would like to argue against this thought process, by all means, be my guest :-) Additionally, if you would like to modify the code so that it functions under HTTPS, to test in your environment, let me know how it goes. I could implement an option to toggle support for rewriting under HTTPS (with an "At your own risk" disclaimer)

Scott DeToffol 10-25-2006 09:57 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Update: the change that is needed for include/func/func.core.php in 4.1.x, should be done in include/functions.php for 4.0.x

I don't have include/functions.php, but I do have include/func.php. I made the change there and got a SQL error:

Quote:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'sql/xcseo.sql
sql/xcseo_lng_US.sql' at line 1
Backtrace :
/include/func.php:121
/include/func.php:80
/admin/patch_sql.php:179
/admin/patch.php:515


Scott DeToffol 10-25-2006 10:04 AM

Re: XC SEO v1.1.0 Released
 
I'm still getting Google Base/Froogle errors with the following characters:




®
²
½

intel352 10-25-2006 10:05 AM

Re: XC SEO v1.1.0 Released
 
I apologize, please look at the specified files:

sql/xcseo.sql
sql/xcseo_lng_US.sql

And copy the SQL commands from there. The install instructions refer to those files so that the instructions are less redundant/shorter, since the SQL is the same across 4.0.x,4.1.x

intel352 10-25-2006 10:09 AM

Re: XC SEO v1.1.0 Released
 
Regarding your Froogle errors, please refer to the Install instructions for 4.0x, scroll to the Froogle modification instructions, and make sure that your Froogle file is edited as instructed.

Scott DeToffol 10-25-2006 10:54 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by intel352
I apologize, please look at the specified files:

sql/xcseo.sql
sql/xcseo_lng_US.sql

And copy the SQL commands from there. The install instructions refer to those files so that the instructions are less redundant/shorter, since the SQL is the same across 4.0.x,4.1.x


I took all the text from those two files and attempted to patch SQL, got the following error:

Quote:

SQL PATCH FAILED AT QUERY:
INSERT INTO xcart_config (name,comment,value,category,orderby,type,defvalue ) VALUES ('xcseo_keyword_injection','Specify a keyword to inject into rewritten urls','','XC_SEO',10,'text','')

Previously, I was able to patch using the SQL text from the upgrade from 1.1.1 to 1.1.5 text file.

Maybe I need to "start over"?

intel352 10-25-2006 11:00 AM

Re: XC SEO v1.1.0 Released
 
Scott, I'm not sure how you got the error in your previous message (since the error actually referenced the individual .sql files..., unless you copy/pasted in the lines sql/xcseo.sql into the actual SQL box...)

If you're just upgrading, then as the upgrading instructions showed, you can just paste the specified SQL text. If you're installing from scratch, you can paste the sql from each .sql file (or do the Browse option to upload each SQL file).

It would be best for you to start over on the SQL part, execute the sql/xcseo_remove.sql file (or copy it's contents into a SQL text box and execute), then install the xcseo.sql and xcseo_lng_US.sql files

For a quick reference, here is the SQL to uninstall XC SEO:
Code:

DELETE FROM xcart_modules WHERE module_name='XC_SEO';

DELETE FROM xcart_config WHERE category='XC_SEO';

DELETE FROM xcart_languages WHERE name='module_descr_XC_SEO';
DELETE FROM xcart_languages WHERE name='module_name_XC_SEO';

# Added in v1.1.5
DELETE FROM xcart_languages WHERE name='option_title_XC_SEO';
DELETE FROM xcart_languages WHERE name='opt_xcseo_keyword_injection';
DELETE FROM xcart_languages WHERE name='opt_xcseo_category_rewrite';
DELETE FROM xcart_languages WHERE name='opt_xcseo_manufacturer_rewrite';
DELETE FROM xcart_languages WHERE name='opt_xcseo_product_rewrite';
DELETE FROM xcart_languages WHERE name='opt_xcseo_staticpage_rewrite';
DELETE FROM xcart_languages WHERE name='opt_xcseo_simplesearch_rewrite';
DELETE FROM xcart_languages WHERE name='opt_xcseo_redirect_robots';


Scott DeToffol 10-25-2006 11:11 AM

Re: XC SEO v1.1.0 Released
 
The sql delete and patch worked, thanks.

Now, do I add:

Quote:

Update: the change that is needed for include/func/func.core.php in 4.1.x, should be done in include/functions.php for 4.0.x

To my include/func.php?

intel352 10-25-2006 11:12 AM

Re: XC SEO v1.1.0 Released
 
The reference to include/functions.php is intended for include/func.php, as you already figured out. And yes, the include/func.php modification is highly recommended, so that Search Engines don't pick up SessionIDs on each url that they visit in X-Cart.

Scott DeToffol 10-25-2006 11:25 AM

Re: XC SEO v1.1.0 Released
 
Thanks so much intel! The last Google index found 2412 urls it could not follow, basically my catalog. So hopefully this update will solve that (I'll let you know).

Concerning the Froogle issues, I did update my froogle.php with the two pieces of code in your INSTALL 4.0x file but still get those characters. Here are the relevant sections of my froogle.php

Quote:

if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); }

################################################## ##########
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
################################################## ##########
if (!empty($active_modules["XC_SEO"])) {
include $xcart_dir."/modules/XC_SEO/loader.seo.php";
}
# END SEO

set_time_limit(0);


Quote:

$product['price'] = $tmp['taxed_price'];

################################################## ##########
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
################################################## ##########
# The following has been commented out and replaced
#
# # Post string
# $post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
# $product['descr']."\t".
# $http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t".
# $tmbn."\t".
#
# SEO replacement code begin
#
# Post string
if (!empty($active_modules["XC_SEO"])){
# Build SEO URL
$prod_url = $seo->_product_callback(array(false,'','productid='.$pr oduct['productid'],'',''), true, $product['product']);

$post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
$product['descr']."\t".
$http_location.constant("DIR_CUSTOMER")."/".$prod_url."\t";
}else{
$post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
$product['descr']."\t".
$http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t";
}
$post .= $tmbn."\t".
# End SEO
$product['productid']."\t".

intel352 10-25-2006 03:17 PM

Re: XC SEO v1.1.0 Released
 
Scott, please post the 2nd bit of code again, but this time marking it in CODE blocks instead of QUOTE blocks. I'm seeing some issues in the code you posted, I want to make sure it's not just due to the QUOTE block

Scott DeToffol 10-25-2006 03:31 PM

Re: XC SEO v1.1.0 Released
 
Code:

if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); }

############################################################
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
############################################################
if (!empty($active_modules["XC_SEO"])) {
    include $xcart_dir."/modules/XC_SEO/loader.seo.php";
}
# END SEO

set_time_limit(0);

Code:

            $product['price'] = $tmp['taxed_price'];

############################################################
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
############################################################
# The following has been commented out and replaced
#
#            # Post string
#            $post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
#                $product['descr']."\t".
#                $http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t".
#                $tmbn."\t".
#
# SEO replacement code begin
#
            # Post string
            if (!empty($active_modules["XC_SEO"])){
                # Build SEO URL
                $prod_url = $seo->_product_callback(array(false,'','productid='.$product['productid'],'',''), true, $product['product']);

                $post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
                    $product['descr']."\t".
                    $http_location.constant("DIR_CUSTOMER")."/".$prod_url."\t";
            }else{
                $post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
                    $product['descr']."\t".
                    $http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t";
            }
            $post .= $tmbn."\t".
# End SEO
                $product['productid']."\t".


intel352 10-26-2006 03:26 AM

Re: XC SEO v1.1.0 Released
 
okay, from what I can see, there's nothing wrong. Scott, do you still get errors if you DISABLE xc seo & export for froogle? I'm thinking that any issues you're having, is related to the Froogle module, not xc seo...

Scott DeToffol 10-26-2006 07:09 AM

Re: XC SEO v1.1.0 Released
 
I unchecked the XC SEO mod and did a froogle export and the offending characters remained. Weird, since I was not getting these errors before I installed this Mod. Thanks for your help intel.

intel352 10-26-2006 07:12 AM

Re: XC SEO v1.1.0 Released
 
Scott, one additional test would be to get a fresh copy of X-Cart 4.0.19, replace your froogle.php file with the fresh copy, and test again. That should remove *any* doubts.

Cheers


All times are GMT -8. The time now is 07:27 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.