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

Google XML Sitemap for XC SEO
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #11  
Old 08-11-2008, 10:50 AM
 
charlesw charlesw is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 2
 

Default Re: Google XML Sitemap for XC SEO

The XC-SEO category fix is awesome and saves time on xml updates

I noticed that product links appear for every category they are assigned to, i.e. if a product is assigned to two categories then there will be two identical links in the xml output twice

Any ideas on how to fix this in the php script, i.e. generate only one link per product irrespective of how many categories it is assigned to?

Thanks, Charles
__________________
x-cart gold v4.1.3
cwhatling@regentgifts.co.uk
www.regentgifts.co.uk
Reply With Quote
  #12  
Old 08-12-2008, 02:46 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Google XML Sitemap for XC SEO

Add
Code:
GROUP BY p.productid
after
Code:
p.forsale="Y"
to make it look like
Code:
p.forsale="Y" GROUP BY p.productid

Basically put it where the LIMIT BY was.

i.e.
Code:
$query = ' SELECT p.productid, p.product, pc.categoryid FROM ' . $sql_tbl['products'] . ' p INNER JOIN ' . $sql_tbl['products_categories'] . ' pc ON (p.productid = pc.productid) WHERE p.forsale="Y" GROUP BY p.productid ';
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:31 PM.

   

 
X-Cart forums © 2001-2018