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

Incorrect home page link on Nav Bar

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-13-2007, 09:34 PM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default 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?
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
  #2  
Old 10-13-2007, 10:10 PM
 
ozi ozi is offline
 

Member
  
Join Date: Jun 2005
Posts: 23
 

Default 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
__________________
Version 4.1.8
Reply With Quote
  #3  
Old 10-13-2007, 10:39 PM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default 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.
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
  #4  
Old 10-14-2007, 01:55 AM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default 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
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #5  
Old 10-14-2007, 04:09 AM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default 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.....
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
  #6  
Old 10-14-2007, 05:38 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #7  
Old 10-15-2007, 12:25 AM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default 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
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
  #8  
Old 10-15-2007, 06:41 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #9  
Old 10-15-2007, 06:44 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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>
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #10  
Old 10-16-2007, 03:12 AM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default 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>
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 06:03 AM.

   

 
X-Cart forums © 2001-2020