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

Free Sitemap addon, works with XC SEO

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 12-09-2007, 03:15 PM
 
intel352 intel352 is offline
 

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

Default Re: Free Sitemap addon, works with XC SEO

montrex, modifications would have to be made to pull the multi-lingual translations for product titles and whatnot, this would likely require some modifications to the SQL queries that are being executed. I'll see if I can make modifications for a future release.

systemskins, this is likely a problem with how I named certain variables, I'll change this for the next release. Regarding the plus/minus, this is handled in the CSS I believe.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #22  
Old 12-09-2007, 03:24 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

Quote:
Originally Posted by intel352
systemskins, this is likely a problem with how I named certain variables, I'll change this for the next release.

Will the next release still be free? Do you have any ETA on it?

Quote:
Regarding the plus/minus, this is handled in the CSS I believe.

I've looked, can't seam to find it. I did find the dotted line left border which I removed but not sure where to find the underlined +. I'm assuming its just a + with an underline since its not an image or maybe an acsii charachter/symbol? possible its inerted by the .js or .php ?
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #23  
Old 12-09-2007, 06:07 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

Ok, I figured it out.

The + symbol is a unicode character called ± found in sitemap.tpl at the very bottom:
Code:
{literal} <script type="text/javascript" language="javascript1.2"><!-- compactMenu('category_sitemap',true,'&plusmn', true); //--></script>{/literal}

I replaced it with:
Code:
{literal} <script type="text/javascript" language="javascript1.2"><!-- compactMenu('category_sitemap',true,'{/literal}<img src="{$ImagesDir}/sitemap+.gif" alt="" />{literal}', true); //--></script> {/literal}

You can see it here: http://www.systemskins.com/sitemap.html


As far as the image changing upon collapsing and expanding. It can not be done with this nested <ul> <li> script. You need to use a different script and it's done with CSS using display properties.

The nested script you produced for this site map I found here: http://www.howtocreate.co.uk/tutorials/jsexamples/listCollapseExample.html

A collapsable script that is more versitile is found here: http://www.howtocreate.co.uk/tutorials/jsexamples/collapseList.html


Now if I can only figure out how to make it so the sitemap doesn't reorder my categories and doesn't break the expanded menu bar on the left i'll be done with this project.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #24  
Old 12-09-2007, 07:02 PM
 
intel352 intel352 is offline
 

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

Default Re: Free Sitemap addon, works with XC SEO

I made a conscious choice to use this list method, so that it would be more SEO friendly, as search engines usually aren't to bright regarding URLs that have been generated by javascript.

To correct the category ordering issue, it would be good to find all
Code:
$smarty->assign
instances in the PHP code. Any variables that are being created (the first item in the parentheses), prefix with list_

Then, go through the TPL file, find any variables in that files, prefix each one with list_ (after the $ symbol, if it exists).

That should likely take care of the issue for you.


Simple updates to this project will remain free, I do intend a Pro version as a commercial release
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #25  
Old 12-09-2007, 08:35 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

hrmmm gonna give that a try. I think I know what your talking about. We'll see

so change $smarty->assign("main",$main); to $smarty->assign("list_main",$main);

or change both like this: $smarty->assign("list_main",$list_main);
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #26  
Old 12-09-2007, 08:43 PM
 
intel352 intel352 is offline
 

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

Default Re: Free Sitemap addon, works with XC SEO

Quote:
so change $smarty->assign("main",$main); to $smarty->assign("list_main",$main);

that's correct

and do the same changes in the tpl files. at a minimum, add the prefix into the variables that were defined in the php file. at the maximum, add the prefix to all of the variables (as some variables are dynamically assigned in the tpl files sometimes, so might need prefixing as well)
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #27  
Old 12-09-2007, 08:58 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

Sigh... I'm so lost, I can't seam to know what I should change and what I shouldn't

If I post my code could you do it for me?

I changed all the $smarty->assign and now I'm getting a page not found

$smarty->assign("list_main",$main);
$smarty->assign("list_location", $location);
$smarty->assign('list_products_per_page', $config["Appearance"]["products_per_page"]);
$smarty->assign('list_categories', $categories);
$smarty->assign('list_pages', $pages);

I don't think I need to change the main, and location, and since I'm not using the pages, I don't need to change that one either. I changed those back to default and I get my sitemap back. But its still in the incorrect order and now the categories in my left menu are gone. But then again I could be wrong and they do need to be changed and something else needs to be changed ???
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #28  
Old 12-09-2007, 09:31 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

sitemap.tpl is easy theres only one place to edit:
Code:
{include file='sitemap_recursion.tpl' categories=$list_categories loopname='top'}
I have the page {foreach item='page' from=$pages} commented out because I don't use it.

But then there is the hard part, sitemap_recursion.tpl
Code:
{foreach item='category' key='cat' from=$categories name=$loopname} <li{if ($smarty.foreach.$loopname.last && $last) || $smarty.foreach.top.last} class="last"{/if}> &nbsp;<strong> <a href="{if $category.seo_url ne ''}{$category.seo_url}{else}home.php?cat={$cat}{/if}" title="{$category.category}">{$category.category}</a> </strong> {if $category.products|@count > 0 || $category.subcategories|@count > 0} <ul> {if $category.products|@count > 0} {assign var='catlast' value='false'} {else} {assign var='catlast' value='true'} {/if} {if $category.subcategories|@count > 0} {include file='sitemap_recursion.tpl' categories=$category.subcategories loopname="loop_`$cat`" last=$catlast} {/if} {if $category.products|@count > 0} {assign var='prod_loop' value="`$loopname`_products"} {foreach item='product' from=$category.products name=$prod_loop} <li{if $smarty.foreach.$prod_loop.last && $catlast eq 'false'} class="last"{/if}> <a href="{if $product.seo_url ne ''}{$product.seo_url}{else}product.php?productid={$product.productid}{/if}" title="{$product.product}">{$product.product}</a> </li> {/foreach} {/if} </ul> {/if} </li> {/foreach}

I haven't the slightest clue what to change and what to leave.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #29  
Old 12-09-2007, 10:06 PM
 
intel352 intel352 is offline
 

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

Default Re: Free Sitemap addon, works with XC SEO

change all instances of categories to list_categories (in both files). don't do a mass find/replace tho, so that you don't affect the subcategories variables. just do single Find/Replace, one at a time.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #30  
Old 12-09-2007, 10:21 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

I guess what I don't understand is. Why all the recoding/renaming? Why can't it just reference the existing category.php file (or what ever it is) and order the categories in the sitemap like it does in the left menu bar? like it is in order number in the admin area?


And I went through the sitemap_recursion and found 5 "categories" and 3 of them were subcategories. So I only changed 2 and when I uploaded and viewed the sitemap was missing and my categories in the menu bar were still out of order.

Have you been able to correct this on your end?
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 08:18 PM.

   

 
X-Cart forums © 2001-2020