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)
-   -   PROBLEM: $location array issue on homepage (https://forum.x-cart.com/showthread.php?t=27639)

btomasie 12-28-2006 08:36 AM

PROBLEM: $location array issue on homepage
 
All,
I am getting a very weird thing happening on my homepage: the TITLE is showing a category name along with the Company Name.

I changed smarty.php to show the tags, and the array is being built much differently than my other store, but can't figure out what is causing it to build this way.

Typical way in debug:
(using "..." to make it broken down better below)

{$location}
...Array(1)
......0 = Array (2)
............0 = the store name
............1 = home.php


But on my website, it's showing in debug as:

{$location}
...Array(3)
......0 = Array (2)
............0 = the store name
............1 = home.php
......1 = Array (2)
............0 = Name of cateogry ***** this is showing up in the TITLE *****
............1 = CDSEO name of the category
......2 = Array (2)
............0 = forgot to write this down, not shown in TITLE though
............1 = forgot to write this down, not shown in TITLE though


This issue is JUST with the homepage.... when I start going into categories, subcategories, checkout, etc. etc., it's perfect.

The code inside the TITLE tag is the default X-Cart code.

This is driving me nuts... hoping someone can assist with this!!! This is one of my final "cleanups" before going live. Thanks very much all !!!!

Brian

Jon 12-28-2006 10:29 AM

Re: PROBLEM: $location array issue on homepage
 
There may have been a mis-edit in your categories.php.

As a "quick" fix, you can do this:

Open skin1/customer/home.tpl

FIND:

Code:

<title>

AFTER ADD:

Code:

{if $main eq "catalog" AND $cat eq ""}
YOUR CUSTOM TITLE HERE
{else}


FIND:

Code:

</title>

BEFORE ADD:

Code:

{/if}

btomasie 12-28-2006 12:21 PM

Re: PROBLEM: $location array issue on homepage
 
Thanks Jon.... the issue now is in debug, it shows that my homepage has $cat = 468.... which is the name of the cat that is showing up.


Is categories.php a file that is editted it (I assume so) when doing the CDSEO self-install? I can't remember.... I did it so long ago and then this website project died for numerous months and I am just now getting back into it.

Where is the $cat set originally, do you know?

Thanks much!
Brian

Jon 12-28-2006 12:39 PM

Re: PROBLEM: $location array issue on homepage
 
The $cat variable is usually only set in the query string and shouldn't be specified in CDSEO in any way. If you send FTP info to support@websitecm.com I'll see if I can help you out.


All times are GMT -8. The time now is 06:08 AM.

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