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
  #141  
Old 11-18-2006, 11:24 PM
 
intel352 intel352 is offline
 

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

Default Re: XC SEO v1.1.0 Released

Sounds like you haven't implemented the .htaccess file that was provided in the download. The .htaccess file rules are what make those fake urls actually work.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #142  
Old 11-19-2006, 05:09 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

Thanks for the direction. In fact, that was the part of the instructions that I was least sure of (except for the optional multi-language edit -- couldn't find the line to modify).

The instructions state:
* If needed, you may have to manually copy/paste the content of the .htaccess file into your existing .htaccess file

I'm not sure what "if needed" or "may have to" mean -- sorry for my ignorance. I already had a ".htaccess" file in my store, but it only had one line:
DirectoryIndex index.html index.php

I first tried replacing this one-line file with yours, and this morning, I tried appending your file's contents to this one-liner. I then turned the module "XC SEO" on in my admin interface. Both ways resulted in the same error messages.

I read on the forum that one shouldn't have their store below the "root directory". I currently have mine in a folder called "store". Would this be causing this problem? Should I move everything up one folder?

Any help would be greatly appreciated!!

Thanks,
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #143  
Old 11-19-2006, 08:16 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

Ouch,
OK, I feel stupid -- guess I should read more!
I started reading the content of the .htaccess files to see if I could figure them out (and fix what was wrong).
I found that there are instructions in your .htaccess (to remove some comment marks, #).
Did that.
It now works -- thanks!!
I'm going to try my luck and see if I can get my sku numbers to appear in my product page htmls.
Thanks again,
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #144  
Old 11-19-2006, 10:53 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Question Re: XC SEO v1.1.0 Released

I was wanting to include the sku in my product html urls (in my line, sku's are often searched for by customers).
I modified the xcart code to include the sku in the links from the thumbnails on the catalog pages, e.g.,
http://www.miniature-giant.com/product.php?productid=20&cat=410&page=2&sku=1504

I then modified the .htaccess file to use the sku (or so I thought):

# Rewrite SEO product URL's
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?printable=Y&productid=$4&cat=$2&page =$3&sku=$5 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$ $1product.php?printable=Y&productid=$4&cat=$2&page =$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?productid=$4&cat=$2&page=$3&sku=$5 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$ $1product.php?productid=$4&cat=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?printable=Y&productid=$2&sku=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)\.html$ $1product.php?printable=Y&productid=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?productid=$2&sku=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)\.html$ $1product.php?productid=$2 [QSA,L]

I then turned the XC SEO module off then on and tested.
The html url is the same as it was before, e.g.,
http://www.miniature-giant.com/urban-legend-sophie-72mm-Reaper-c-410-p-2-pr-20.html

Any idea what I am doing wrong (or what I am neglicting to do)?

Thanks in advance!
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #145  
Old 11-19-2006, 12:35 PM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

Found the problem -- needed to edit the outputfiler.seo.php
Thanks,
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #146  
Old 11-20-2006, 05:20 AM
 
intel352 intel352 is offline
 

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

Default Re: XC SEO v1.1.0 Released

What did you have to edit in the outputfilter? (just curious)
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #147  
Old 11-20-2006, 08:13 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

I made two edits -- for two different feature additions:
1) to include the "sku" in the url, I edited the function _product_filename by adding the line:
if ($options['sku'] && !defined("IS_ROBOT"))
$options['result_title'] .= $this->_sku_prefix.$options['sku'];
after the similar line for the $options['printable']

2) I have JavaScript on my home page that randomly cycles through products in my catalog, showing them off. I wanted the customer to be able to click on these images and be taken to the corresponding product. But, I did not have an easy way in JavaScript to translate the SKU (which is what I used to name the images) to productid values. So, I added the following line as the first code line in the same function:
if ( ($options['productid']=="1") && $options['sku']){
$options['productid'] = func_query_first_cell("SELECT productid
FROM $sql_tbl[products]
WHERE productcode = '".$options['sku']."'");
}

In my system, there is no product with a productid of "1", so, if one is requested, this code uses the sku to lookup the correct productid in the db. This way I could have all my auto-generated images have anchor tags to product.php?productid=1&sku=<sku number>

Works like a charm.
(I'm in the final stages of testing, but you are welcome to see it at www.miniature-giant.com )

Hope the above makes sense -- if not, let me know and I'll elaborate,
Thanks,
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #148  
Old 11-20-2006, 08:27 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

Opps, sorry, I also had to add the following line to the function seo_filter():

$this->_sku_prefix = $this->_name_delim.'sku'.$this->_name_delim;

to define the url text. Now my url look like, e.g.,
http://www.miniature-giant.com/sophie-the-succubus-Reaper-sku-1406-pr-10.html or
http://www.miniature-giant.com/grim-reaper-and-tombstone-72mm-Reaper-sku-1414-pr-18.html

Sorry for missing that edit in my previous post,
James
__________________
X-Cart Gold v 4.1.3
Reply With Quote
  #149  
Old 11-20-2006, 10:20 AM
 
teddychan teddychan is offline
 

Member
  
Join Date: Mar 2006
Posts: 25
 

Default Re: XC SEO v1.1.0 Released

is it a bugs?

I just installed the koaconsulting.com mulit currency mode.

it pass the variable : currency_code=XXX
to the URL.

I can show the correct currency in home.php
or https page, when the seo is auto off.

while in all other http page, which seo is on.

i can't show the correct currency.

any idea?
__________________
--
Reply With Quote
  #150  
Old 11-20-2006, 10:47 AM
 
Miniature-Giant Miniature-Giant is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 71
 

Default Re: XC SEO v1.1.0 Released

"is it a bugs?"

No, none that I am aware of. I was adding a custom feature to my system to also have the sku listed in the html url.
__________________
X-Cart Gold v 4.1.3
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 09:16 AM.

   

 
X-Cart forums © 2001-2020