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)
-   -   free SEO mod - XC SEO -> needs testing & feedback (https://forum.x-cart.com/showthread.php?t=21383)

alru111 05-19-2006 04:29 PM

Intel, I want to tweak the mod so that it fits my needs.
Because I have many subcategories I want to eliminate some of them and put some into the ../*.html part

Can you point me where to look. Is it something easy that can be done by removing/replacing a few lines or should I start studying php and mod rewrite ? ;)

MallRomania 05-20-2006 01:35 AM

Thanks for your work

I have some problems and questions:
1. Products images are not shown in IE 6. I keep all images in database and it's ok untill in install xc seo; it's ok in Firefox, Opera or Netscape (latest versions)
2. Can you add an option to enable/disable this module? Just in case of error to return to old good known configuration
3. Same error in Firefox 1.5.3 about login problem, also about searching issue (&amp appear)
4. ?cat=0&page=1 or ?cat=293&bestseller at the end of url can be solved? This problem will afect my listing in Google for example?
5. Can be somethig made to redirect or send user who access old html pages to new pages?


i see something about 404 in seo.php, also i want to block access to some folders and files. Please let me know if this .htaccess it's ok to work with xc seo

<Files .htaccess>
order allow,deny
deny from all
</Files>
DirectoryIndex home.php index.html index.php
# REWRITE RULES
Options +SymlinksIfOwnerMatch -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.mallromania\.ro [NC]
RewriteRule ^(.*)$ http://www.mallromania.ro/$1 [R=301,L]
</IfModule>

# block all smarty templates (no reason to have these exposed)
RedirectMatch gone ^.*.tpl$

# block the entire log directory
RedirectMatch gone ^.*/log/.*$

# block all .log (log files), .sql (sql dump/export), .bak (backup files) and .conf (config files) files
# in case some day these files move to another directory
RedirectMatch gone ^.*\.(sql|log|conf|bak)$

# block access to the 'Smarty-*' directory
RedirectMatch gone ^.*Smarty.*$

# block access to /upgrade
RedirectMatch gone ^.*/upgrade/.*$

# block the version.php
RedirectMatch gone ^.*/include/version.php

# block access to the /sql directory
RedirectMatch gone ^.*/sql/.*$

# block access to the /shipping directory
RedirectMatch gone ^.*/shipping/.*$

# block access to the pgp directories
RedirectMatch gone ^.*/.pgp/.*$
#RewriteBase /shop

# Don't rewrite requests for any files, directories, or symbolic
# links (shortcuts) that exist on the filesystem.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*_p([0-9]+)\.html product.php?productid=$1 [last]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*_i([0-9]+)\.jpg$ image.php?productid=$1 [last]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html $1.php [qsappend,last]

# if not a real file and if not matched as product or image
# then assume category, and map to home.php
# this section might cause issues with other urls in x-cart... needs work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*$ home.php [last]

ErrorDocument 401 http://www.mallromania.ro/Pagina-cautata-nu-exista-sp-396.html
ErrorDocument 403 http://www.mallromania.ro/Pagina-cautata-nu-exista-sp-396.html
ErrorDocument 404 http://www.mallromania.ro/Pagina-cautata-nu-exista-sp-396.html
ErrorDocument 500 http://www.mallromania.ro/Pagina-cautata-nu-exista-sp-396.html
ErrorDocument 503 http://www.mallromania.ro/Pagina-cautata-nu-exista-sp-396.html

Thank you

intel352 05-20-2006 04:15 PM

Quote:

Originally Posted by alru111
Intel, I want to tweak the mod so that it fits my needs.
Because I have many subcategories I want to eliminate some of them and put some into the ../*.html part

Can you point me where to look. Is it something easy that can be done by removing/replacing a few lines or should I start studying php and mod rewrite ? ;)


hmm... good queston. search the class file (in the xcart include/ folder), for any reference to 'category' or 'categories'. you'll find several functions that i created for fetching category information, matching urls based on the categories shown, etc. you should be able to rewrite the category functions to match your needs without too much hassle. i don't think you'd have to edit anywhere else, either, just that one file.

MallRomania
1. I'll have to look into the IE6 issue. I haven't come across that problem yet myself, but I should be able to find a way to fix it.

2. To disable the module, you must remove the custom code that was added to the .htaccess file, and also change the xc seo option to FALSE (remember those config settings you added for xc seo? disable the first setting)

3. I believe I've fixed both of these issues, and will be included in the next release.

4. I'm working on code to remove the &page= and &cat=, I have to make sure those variables are only removed when not needed, though, because I don't want to break some other functionality of x-cart... Should also be included in the next release

5. Old html pages? Referring to the Catalog? I'm currently working on that issue, and once that is solved, I'll post the release :-) (should be in v0.7)

6. Regarding 404, in version 0.6, the 3rd config option that you put into config.php allows you to define a 404 page for XC SEO to reference. :-) As for your .htaccess, that looks fine to me. I would test it if I were you though, to make sure it works as expected. While it APPEARS fine, doesn't meant it will always work as intended. I have similar Rewrites on my own sites though, and I haven't noticed a problem.

MallRomania 05-30-2006 12:57 AM

Hello intel352

Any news about 0.7 version? I check your forum but didn't see any changes

jayzee 06-07-2006 11:39 PM

has anyone heard any more about this mod, I was wanting to implement it but can't get to the forum mentioned??

fhiremark 06-08-2006 02:15 PM

Hey jayzee, i think the direct link to the forums is:

http://www.phpsitesolutions.com/forum/

MallRomania 06-14-2006 02:44 AM

anybody have any news about this project or project is dead? I don't want to buy another module untill i know what is status of xc seo project. Intel352, please let me (us) know if you still working on this project or not.

Thanks

moneysaver67 06-22-2006 04:24 PM

Disappearing Act
 
Quote:

Originally Posted by MallRomania
anybody have any news about this project or project is dead? I don't want to buy another module untill i know what is status of xc seo project. Intel352, please let me (us) know if you still working on this project or not.

Thanks


Intel, the suspense is thick enough you could cut it with a knife! Please tell us you are alive and well, and somewhere in your mind teetering with a lil' 'ol idea we like to call XC SEO! :)

neroag 06-26-2006 08:21 AM

Great Little mod, just one small problem i have with it, if anyone has any guidance ...

on checkout i get returned back to the product & it does not proceed to checkout, having looked another cart i notice the following ..

with SEO disabled .../cart.php?paymentid=4&mode=checkout (checkout works fine)
with SEO Enabled .../cart.php?paymentid=4&amp;mode=checkout (checkout doesnt work)

using clean install of 4.0.18


thanx for any help guys

moneysaver67 06-26-2006 03:35 PM

Quote:

Originally Posted by neroag
Great Little mod, just one small problem i have with it, if anyone has any guidance ...

on checkout i get returned back to the product & it does not proceed to checkout, having looked another cart i notice the following ..

with SEO disabled .../cart.php?paymentid=4&mode=checkout (checkout works fine)
with SEO Enabled .../cart.php?paymentid=4&amp;mode=checkout (checkout doesnt work)

using clean install of 4.0.18


thanx for any help guys


neroag, this has been addressed and corrected, only Intel has not released since. Not sure where he his, likely busy with deadlines?? I addressed this issue a few posts ago and am anxiously awaiting, as well.

neroag 06-30-2006 09:16 AM

A Possible fix for the "&amp;" problem.

I Am NO Programmer an the fix may not work for other people so BACKUP your file, but it does work for me.

in /include/class.xcart_seo.php look for ..

Code:

$query = preg_replace(array('@&amp;@i','@&@'),array('&','&amp;'),$query);

Replace with ..

Code:

$query = preg_replace(array('@&amp;@i','@&@'),array('&','&'),$query);

all i've done is remove the amp; from the line of code & my checkout works a treat, anyways hope its useful to someone else.

neroag 07-12-2006 02:41 AM

After further testing whilst havin the htaccess file supplied with the SEO mod active on the site it knocks out the coupon module, when a customer enters a coupon code the site just redirects back to home.php

address also shows .../javascript%20document.couponform.submit();
instead of the usual .../cart.php

Changing the htaccess file for me just results in a non functional site at various stages.

ive posted the htaccess details in the hope someone might be able to modify it & keep the site working which is outta my realm.


Code:

DirectoryIndex home.php index.html index.php

RewriteEngine On

#RewriteBase /shop

# Don't rewrite requests for any files, directories, or symbolic
# links (shortcuts) that exist on the filesystem.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*_p([0-9]+)\.html product.php?productid=$1 [last]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*_i([0-9]+)\.jpg$ image.php?productid=$1 [last]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html $1.php [qsappend,last]

# if not a real file and if not matched as product or image
# then assume category, and map to home.php
# this section might cause issues with other urls in x-cart... needs work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*$ home.php [last]


gedsta 07-19-2006 10:10 AM

hi

i have tried this mod on a test site on a windows server, but it wont work as i assume because it dont make use of the .htaccess

is there anyway round this using [ISAPI_Rewrite]?

Ged

JeremyL 09-11-2006 04:42 PM

Re: free SEO mod - XC SEO -> needs testing & feedback
 
Does anyone have the latest version of this? His site is down. If I can get a copy I might be able to contibue the work. Email to jeremy [at] ecarcommerce.com if you have it.

I have recieved the files and have continued the project here
http://forum.x-cart.com/showthread.php?t=24832

Thanks
Jeremy

intel352 09-20-2006 09:34 AM

Re: free SEO mod - XC SEO -> needs testing & feedback
 
XC SEO Lite v 1.0.0 Released

Thread is available at the following url:
XC SEO Lite Released

Quote:

The XC SEO team is proud to announce the release of XC SEO Lite version 1.0.0.
XC SEO Lite is completely free, and licensed under the GNU GPL 2 license.
All code is versioned and available from our repository at:
http://code.google.com/p/x-cart-seo/

A zip of the release is available at the bottom of this post.
This release is for X-Cart 4.0.x and 4.1.x

A .htaccess file is included, it is recommended that you open the .htaccess file and COPY the contents into your existing .htaccess file.
Additionally, a default robots.txt has been included. The robots.txt file should be used with discretion and modified as needed for your own website.

Any incoming product/manufacturer/category links are properly 301 redirected to their html alias, so any existing pagerank should be transferred properly.

-------------
This project was started around April of 2006, grew into a sizeable modification that had several bugs due to the complexity of the code, and then lay dormant until recently. Xuru sparked new interest in the project by releasing a copy of the original XC SEO code with a few fixes included. Then geckoday released a stripped down and rewritten version of the XC SEO mod.

Due to the issues that still existed with the original code, I decided to use geckoday's rewritten code as a base. After several feature additions, and after testing the code on a production website with positive results, I'm proud to announce the first public release of XC SEO Lite.
-------------

XC SEO Lite functions similarly to DSEFU, in that it requires 0 template edits, and writes all Product/Manufacturer/Category urls to .html page aliases: sitename.com/categoryname.html

In the near future, I intend to release an XC SEO Advanced version that will function similar to the original XC SEO release (and similar to CDSEO), with the ability to rewrite urls using categories as folders: sitename.com/category1/category2/productname.html

--------------

Quote:

CHANGELOG

XC SEO Lite 1.0.0 (rev 6 - September 20, 2006)
====================================

* Replaced original XC SEO code with geckoday's rewritten code (rewrite of outputfilter & htaccess, he had dropped all other code/files)
* Altered code to replace accented characters with non-accented equivalent
* Added support for rewriting 'printable=Y' urls
* Added support for rewriting 'sort' & 'sort_direction' urls
* Added seo.php to rewrite/redirect category/product/manufacturer urls to new HTML alias
* Added ability to inject user-specified keyword into urls
* Added IF condition that turns off the mod under HTTPS urls
* Added conditional support for SEO mod in Froogle module
* Added default robots.txt



intel352 02-28-2008 08:40 PM

Re: free SEO mod - XC SEO -> needs testing & feedback
 
Just to update anyone that might have installed XC SEO ages ago and not realized it's still being updated, v1.3 was recently released, with good bugfixes, feature additions, etc.

New thread for v1.3:
http://forum.x-cart.com/showthread.php?t=37700


All times are GMT -8. The time now is 01:28 PM.

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