X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to Separate Home Page SEO from CAT & Product pages? (https://forum.x-cart.com/showthread.php?t=34423)

GlobalFusion 03-28-2008 04:38 PM

Re: How to Separate Home Page SEO from CAT & Product pages?
 
It took me all afternoon to figure this out, but after reviewing my smarty ebook it became obvious. This is what worked for 4.1.8:

Your Meta Description and Meta Keywords for categories and sub-categories should be filled in.

In admin, go to General Settings >> SEO Option. Uncheck:
  1. Include categories' META data into the site meta tags:
  2. Include products' META data into the site meta tags:
Open meta.tpl and find lines 27 to 33. Code should be similar to this unless you made some changes:
HTML Code:

{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "Y"}
  {assign var="_meta_descr" value="$_meta_descr`$current_category.meta_descr` "}
  {assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "}
  {/if}
  {assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"}
  {assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}


Change:
HTML Code:

{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "Y"}

For
HTML Code:

{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "N"}
(the only thing that changed here was ⌠Y■ for ⌠N■)

Add
HTML Code:

{else}

After
HTML Code:

{assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "}

Remove
HTML Code:

{/if}

Right after the recently placed
HTML Code:

{else}

Finally, add
HTML Code:

{/if}
After
HTML Code:

{assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}

The new code should look like this:
HTML Code:

{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "N"}
  {assign var="_meta_descr" value="$_meta_descr`$current_category.meta_descr` "}
  {assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "}
  {else}
  {assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"}
  {assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}
  {/if}


Hope this works for you folks

balinor 03-28-2008 04:49 PM

Re: How to Separate Home Page SEO from CAT & Product pages?
 
Sorry, didn't see this post until now :(

GlobalFusion 03-28-2008 04:52 PM

Re: How to Separate Home Page SEO from CAT & Product pages?
 
Too late my friend :) lol. Thanks for pointing out the meta.tpl


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

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