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 with links on head.tpl (https://forum.x-cart.com/showthread.php?t=112)

egypt13 09-26-2002 01:44 PM

problem with links on head.tpl
 
I added links for "About Us/Contact/Help" on the head.tpl...The links work on all the other pages/catagories/cart/checkout ect. but for some reason they don't work at the home page. Does anyone know why or how to fix it?

B00MER 09-27-2002 06:55 AM

post your code/template? :)

B00MER 09-27-2002 06:58 AM

contact link: help.php?section=contactus&mode=update
help link: help.php
about link: help.php?section=about

Anonymous 09-27-2002 06:59 AM

Code:

<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=TableTop width=100%>
  <TR>
    <TD bgcolor="#6397fc" width="41%">[img]../{#ImagesDir#}/logo.gif[/img]</TD>
    <TD bgcolor="#6397fc" width="58%" align="right" valign="bottom">[img]http://cddream.com/images/top.gif[/img]</TD>
    <TD bgcolor="#6397fc" colspan=2 width="0%"></TD>
  </TR>
  {if $usertype eq "C"}
  <TR>
    <TD class=TableLeft colspan="3">
      <TABLE width=100% border=0 cellpadding=0 cellspacing=0>
        <TR>
          <FORM method=GET action="search.php" name=s_form>
            <TD class=TableLeft align=right width=90%> Search by:
              <SELECT name=search_by>
                <OPTION value="artist"{if $smarty.get.search_by eq "artist"} selected{/if}>Artist</OPTION>
                <OPTION value="title"{if $smarty.get.search_by eq "title"} selected{/if}>Title</OPTION>
              </SELECT>
             
              <INPUT type=text size=24 name=substring value="{$smarty.get.substring}">
              {include file="buttons/search.tpl"}
            </TD>
          </FORM>
          <TD class=TableLeft align=left rowspan=2 width=240> [img]../{#ImagesDir#}/null.gif[/img]
            <TABLE width=100% border=0 cellpadding=2 cellspacing=0 class=MenuTitleLine>
              <TR>
                <TD align=center nowrap> VIEW CART

                  CHECKOUT </TD>
                <TD align=center> {if $minicart_total_items > 0}You have {$minicart_total_items}
                  {if $minicart_total_items eq "1"}item{else}items{/if} in your
                  cart{else}Your cart is empty{/if}
</TD>
              </TR>
            </TABLE>
          </TD>
        </TR>
        <TR>
          <TD class=TableTop align=right></TD>
        </TR>
      </TABLE>
    </TD>
  </TR>
  {/if}
</TABLE>


<map name="Map">
  <area shape="rect" coords="2,2,71,50" href="http://www.CDdream.com/xcart/customer/help.php?section=about">
  <area shape="rect" coords="72,2,122,49" href="http://www.CDdream.com/xcart/customer/help.php">
  <area shape="rect" coords="125,2,189,49" href="http://www.CDdream.com/xcart/customer/help.php?section=contactus&mode=update">
</map>


minorgod 09-27-2002 04:18 PM

use absolute urls to everything
 
This can sometimes be considered bad programming, but it often solves problems if you make your navbar image and link references into absolute URLs (eg. http://www.yourdomain.com/directory/image.gif). This will keep your images and links from breaking if your using a secure server for your store. Hope that helps.

Anonymous 09-27-2002 06:52 PM

The Image I am using is absolute...any othe ideas?

Code:

<TD bgcolor="#6397fc" width="58%" align="right" valign="bottom">[img]http://cddream.com/images/top.gif[/img]</TD>
б═ б═ <TD bgcolor="#6397fc" colspan=2 width="0%"></TD>


minorgod 10-01-2002 07:54 AM

oops...
 
I think I might have mislead you in my last post. The images should probably remain relative references, but you might consider making the actual hrefs absolute addresses to keep the secure store from having broken links or keep it from redirecting to your server's IP address rather than your named web address.

I'm not sure why your images are breaking. You've probably just got the wrong path to your graphics. Look at the original templates that came with X-cart. Put your images in the same place. Reference them the same way. That's about the only advice I can offer. Sorry.

shan 10-01-2002 09:22 AM

If your having problems with your extra images (i did) then the answer is pretty simple.

All you need to do is create a directory inside skin1_images folder and call it say my_images.

drop all your extra images in there and upload the lot to the server.

When you want to use any of the new images you must refer to the as follows ...

[img]../{ #ImagesDir# }/my_images/my_pic.gif[/img]

Because you have prefixed the location with ../{ #ImagesDir# }/ it works on either the normal or secure server as the ="../{ #ImagesDir# }/ gets replaced with the right address.

I tried it and it works fine .

I had hard coded my extra images to all load through my secure server address to start with which worked but would have been much slower then doing it this way.


All times are GMT -8. The time now is 01:17 AM.

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