Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

XC SEO v1.1.0 Released

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #341  
Old 11-01-2007, 06:31 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

What is the goal? To remove that string, or to add it to the rewritten url? Or something else entirely?

But anyways, it's possible, mainly just depends on what you need it to do. The code is all open source, and there's only a couple of files that you would need to modify.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #342  
Old 11-01-2007, 06:35 AM
 
lovetree lovetree is offline
 

Member
  
Join Date: Jan 2003
Posts: 13
 

Default Re: XC SEO v1.1.0 Released

Exactly a person I need help from!! Wow.

I pull additional products with "retailcatid=XX" string in addition to "cat=XX".

i.e. c-XXXX-r-XXXX.html something like that for cat=XXX&retailcat=XXXX

Thanks
Reply With Quote
  #343  
Old 11-01-2007, 07:08 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

k, you'll need to decide how in-depth you want your modification to go, i.e. - do you want to be able to pass retailcat on every category page? (page 2, page 3, etc, sorted ascending, descending, etc)

if so, you'll need to modify your .htaccess, where the category section starts:
# Rewrite SEO category URL's << (categories start at this line)


Then the rest of your changes would take place in the following files:
modules/XC_SEO/outputfilter.seo.php
modules/XC_SEO/seo.php

You're changes will have to effect pretty much anywhere you see "cat" mentioned, should be minor changes all over. Additionally, you shouldn't need to create any new functions, just inserting your retailcat information anywhere you find "cat" referenced.

If you're able to complete the mod successfully, you should document your changes to make it easy for someone else that needs to pass in a custom variable

BTW, it also should be possible to skip all this, and just allow your retailcat variable to be appended to the end of the normal static category url.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #344  
Old 11-01-2007, 08:22 AM
 
lovetree lovetree is offline
 

Member
  
Join Date: Jan 2003
Posts: 13
 

Default Re: XC SEO v1.1.0 Released

Thanks for a guide. Just did a mod/patch and it is working:

If I missed something, please send a comment.

GOAL:
modify XC_SEO to work with a custom variable called "retailcatid".
( i.e., "c-XXXX-r-XXXX.html" something like that for "cat=XXX&retailcat=XXXX")

BACKGROUND:
I pull additional products with this variable. i.e. "cat=XXX&retailcat=XXX"

MODS:

1. .htaccess : ADDED
Code:
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-r-([0-9]+)\.html$ $1home.php?cat=$2&retailcat=$3 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-r-([0-9]+)-p-([0-9]+)\.html$ $1home.php?cat=$2&retailcat=$3&page=$4 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-up-c-([0-9]+)-r-([0-9]+)-p-([0-9]+)\.html$ $1home.php?sort=$2&sort_direction=0&cat=$3&retailcat=$4&page=$5 [QSA,L] RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-c-([0-9]+)-r-([0-9]+)-p-([0-9]+)\.html$ $1home.php?sort=$2&sort_direction=1&cat=$3&retailcat=$4&page=$5 [QSA,L]

2. modules/XC_SEO/outputfilter.seo.php

ADDED to class variable declaration
Code:
var $_ret_prefix;
ADDED to function seo_filter()
Code:
$this->_ret_prefix = $this->_name_delim.'r'.$this->_name_delim;

ADDED to function _category_filename
Code:
if ($options['retailcat']) $options['result_title'] .= $this->_ret_prefix.$options['retailcat'];
Reply With Quote
  #345  
Old 11-01-2007, 08:43 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

looks good enough to me, although I believe your htaccess rules may be lacking, but if you don't notice any issues, excellent

thanks for posting your changes back, as well, i'm sure it'll be handy to other aspiring modders
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #346  
Old 11-06-2007, 06:55 AM
 
dtfootwear1 dtfootwear1 is offline
 

Newbie
  
Join Date: Oct 2007
Posts: 2
 

Default Re: XC SEO v1.1.0 Released

I'm Running 4.1.8 gold on Apache 2.0.52 with PHP 4.39 and I can't get this to work. Mod is installed, re-write rules are in .htaccess but I don't know if they are correct...

Mod installed fine, no errors - When I move over the link it now points to a html page (instead of ...=cat1) which is great but the link does not work correctly as it say "page cannot be displayed"

I have put back the original auth.php file which turns off XC SEO and fixes the broken link on the live site... I don't have a dev site to test this on unfortunately!

Is there anything I should look at?
__________________
xcart 4.1.8 gold
Special Offers 4.1.8
DSEFU 1.0.8
Paypal Pro UK
PHP 5.1.6
MySQL Server/Client 5.0.22
Apache /2.2.3 (CentOS)
Perl 5.008008
Reply With Quote
  #347  
Old 11-06-2007, 07:22 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

to disable XC SEO, you can leave all changes intact, just go into X-Cart Admin and disable the module there.

if the url is showing as an html url, but the page cannot be found, that suggests it's a problem with your .htaccess file
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #348  
Old 11-06-2007, 07:45 AM
 
dtfootwear1 dtfootwear1 is offline
 

Newbie
  
Join Date: Oct 2007
Posts: 2
 

Default Re: XC SEO v1.1.0 Released

Hi intel352,

Thanks for quick response... Yes you are quite right... I didn't think about turning it off from the X-cart amin console.

...and as I thought the .htaccess file is not setup correctly!!

If I PM you with my details would you be able to look at my .htaccess file and tell me where you think I might be going wrong?

Regards

RM.
__________________
xcart 4.1.8 gold
Special Offers 4.1.8
DSEFU 1.0.8
Paypal Pro UK
PHP 5.1.6
MySQL Server/Client 5.0.22
Apache /2.2.3 (CentOS)
Perl 5.008008
Reply With Quote
  #349  
Old 11-06-2007, 04:15 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

sure, you can PM me or email me (email is in the signature), I'll take a look at it for you (or you can send me the contents of your file and I'll correct it, and send back)

Cheers
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #350  
Old 11-07-2007, 05:54 AM
  Qdox's Avatar 
Qdox Qdox is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 57
 

Default Re: XC SEO v1.1.0 Released

Would appreciate an answer from anyone about this. Having the same issue.
Quote:
Originally Posted by pumpkins
I found this is causing the problem:

RewriteEngine on
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]

but I added this line in my .htaccess to get Google Checkout to work . Does this mean I have to choose between Google checkout and XC SEO?
__________________
QdoxGroup
X-Cart version 4.1.8 Pro
HandsOnWebHosting.
Web server Apache/2.0.52 (Red Hat)
http://www.justinthenet.com/
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:18 PM.

   

 
X-Cart forums © 2001-2020