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)
-   -   Incorrect home page link on Nav Bar (https://forum.x-cart.com/showthread.php?t=34596)

scoobie 10-13-2007 09:34 PM

Incorrect home page link on Nav Bar
 
Hi,

I am getting an unexpected url when I click on my home page link from my navigation bar. All my other links work. When I click on my home page link, the following url presents itself and I get a page not found:- http://www.womansworld.com.au/dev/xcart//dev/xcart/

My .htaccess file has:- DirectoryIndex home.php
My config.file has:- $xcart_web_dir ="/dev/xcart";

Here is my code in my head.tpl file.
<div class="hnav">
<ul><li><a href="http://www.womansworld.com.au{$xcart_web_dir}/home.php">Home</a></li>
<li><a href="http://www.womansworld.com.au{$xcart_web_dir}/help.php?section=contactus&mode=update">Contact Us</a></li>
<li><a href="http://www.womansworld.com.au{$xcart_web_dir}/register.php">Register</a></li>
<li><a href="http://www.womansworld.com.au{$xcart_web_dir}/help.php?section=login">My Account</a></li>
</ul>
</div>

If someone wants to see this in action, here is the site:- http://www.womansworld.com.au/dev/xcart/home.php

Does anyone know what has gone wrong?

ozi 10-13-2007 10:10 PM

Re: Incorrect home page link on Nav Bar
 
http://www.womansworld.com.au/dev/xcart//dev/xcart/

I am guessing you have placed the wrong URL in your admin. Look at the 2 forward slashes after /xcart ( /xcart//dev/)

Cheers

scoobie 10-13-2007 10:39 PM

Re: Incorrect home page link on Nav Bar
 
Hi Ozi,

Thanks for replying. I just looked at the xcart directory in the Summary section in Admin (I hope that is what you meant). My xcart directory under environment info is correct. I don't know what I have done to cause this. I click on the home link all the time and have never see this happen before.

mitash 10-14-2007 01:55 AM

Re: Incorrect home page link on Nav Bar
 
have you checked your company settings page..

what's the url in the website address section?

cheers

scoobie 10-14-2007 04:09 AM

Re: Incorrect home page link on Nav Bar
 
Yes I have checked this out. It is www.womansworld.com.au. The main thing I have been doing lately is creating a separate database for my live site because I was only dealing with one database whilst I was developing.

I am thinking really hard as to how this problem only affects the home page link and not any other link that I reference {$xcart_web_dir} with.....

carpeperdiem 10-14-2007 05:38 AM

Re: Incorrect home page link on Nav Bar
 
It is clear that whatever you are using for your navbar has an extra / going on.

Are you using a navbar mod, or is the navbar code in your header template?

Use "webmaster mode" and you'll have this solved in a minute or so.

scoobie 10-15-2007 12:25 AM

Re: Incorrect home page link on Nav Bar
 
Carp,

My nav bar code in my first post is all done by me. I don't believe Webmaster mode will help me solve this issue. This code is in my head.tpl file. I forgot to mention that I had CDSEO installed for me a few weeks back. That is the only major change apart from creating two separate databases. I will take a look at my files again to see if anything stands out.

Regards,
Kylie

carpeperdiem 10-15-2007 06:41 AM

Re: Incorrect home page link on Nav Bar
 
Quote:

I forgot to mention that I had CDSEO installed for me a few weeks back

There you go.

Try this:

INSTEAD OF:

Code:

<ul><li><a href="http://www.womansworld.com.au{$xcart_web_dir}/home.php">Home</a></li>

Try:

Code:

<ul><li><a href="/">Home</a></li>

You do not need the full http:// in every navbar link.

The other code is doing the work.

carpeperdiem 10-15-2007 06:44 AM

Re: Incorrect home page link on Nav Bar
 
while you're at it -- cahnge these links too:

Code:

<li><a href="/help.php?section=contactus&mode=update">Contact Us</a></li>
<li><a href="/register.php">Register</a></li>
<li><a href="/help.php?section=login">My Account</a></li>


scoobie 10-16-2007 03:12 AM

Re: Incorrect home page link on Nav Bar
 
Carp,

The reason why I didn't use a relative url is because my development database is two levels under my live site. I referenced it by {$xcart_web_dir} or rather I did when it worked before.

Your suggested code takes me straight to my live site when I click on the home link.

I tried this and it worked ok for my dev site although the only diff now is the full path is in variable instead of hard coded in the template.

<li><a href="{$http_location}">Home</a></li>
<li><a href="{$http_location}/help.php?section=contactus&mode=update">Contact Us</a></li>
<li><a href="{$http_location}/register.php">Register</a></li>
<li><a href="{$http_location}/help.php?section=login">My Account</a></li>


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

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