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)
-   -   Adding links/pages to Special.tpl (https://forum.x-cart.com/showthread.php?t=56832)

mizNRG 12-01-2010 11:37 AM

Adding links/pages to Special.tpl
 
Does anyone know how I can add links and static pages to Special.tpl? I've changed the name of the section to read "Extras" instead of "Special" and would like to include a link to our pdf version of our catalog and also a static page that would contain links to product manuals, among other things. I tried using the code suggestion below and nothing changed. If anyone can point me in the right direction I would appreciate it. Thanks!

Quote:

<a href="home.php?cat=xxx" title=".....">Your cat name here</a>

xxx is the categoryid


cflsystems 12-01-2010 03:42 PM

Re: Adding links/pages to Special.tpl
 
Make sure you change the correct template, in 4.4.x if file exists in the skin you are using it overwrites the common_files template. You may also need to clear your cache - cleanup.php

mizNRG 12-02-2010 05:39 AM

Re: Adding links/pages to Special.tpl
 
Thanks for your reply. I cleared my cache as suggested w/ no results. I also checked my skin files and there are none (I'm using the basic 3-column skin). Below is the code I'm working with in
/common_files/customer/special.tpl. The red type is what I added. I'm trying to create a link to a pdf file. Chances are I could be missing something basic here so I apologize ahead of time if I am. Thanks for any help!
Code:


{*
$Id: special.tpl,v 1.2 2010/06/28 05:07:29 slam Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=submenu}
  {if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y"}
    <li><a href="manufacturers.php">{$lng.lbl_manufacturers}</a></li>
  {/if}
  <li><a href="/admin/getfile.php?file=%2Fpdf%2FK-Line%20Catalog%20212.pdf>K-Line Catalog 212</a></li>
  {if $active_modules.Gift_Certificates ne ""}
    {include file="modules/Gift_Certificates/gc_menu.tpl"}
  {/if}
  {if $active_modules.Gift_Registry ne ""}
    {include file="modules/Gift_Registry/giftreg_menu.tpl"}
  {/if}
  {if $active_modules.Feature_Comparison ne ""}
    {include file="modules/Feature_Comparison/customer_menu.tpl"}
  {/if}
  {if $active_modules.Survey ne ""}
    {include file="modules/Survey/menu_special.tpl"}
  {/if}
  {if $active_modules.Special_Offers ne ""}
    {include file="modules/Special_Offers/menu_special.tpl"}
  {/if}
  {if $active_modules.Sitemap ne ""}
    {include file="modules/Sitemap/menu_item.tpl"}
  {/if}
  {if $active_modules.Products_Map ne ""}
    {include file="modules/Products_Map/menu_item.tpl"}
  {/if}
{/capture}
{if $smarty.capture.submenu|trim}
  {capture name=menu}
    <ul>
      {$smarty.capture.submenu|trim}
    </ul>
  {/capture}
  {include file="customer/menu_dialog.tpl" title=$lng.lbl_special content=$smarty.capture.menu additional_class="menu-special"}
{/if}


peddler 12-02-2010 02:15 PM

Re: Adding links/pages to Special.tpl
 
Quote:

<li><a href="/admin/getfile.php?file=%2Fpdf%2FK-Line%20Catalog%20212.pdf>K-Line Catalog 212</a></li>



Missing a closing quotes mark on the href attribute?

Otherwise, looks good. ;-)

mizNRG 02-22-2011 06:24 AM

Re: Adding links/pages to Special.tpl
 
Okay, a lot of time has passed with this, but I just realized something. Apparently I have the pdf linked wrong because whenever someone clicks on the link it brings them to the admin login screen. Anyone know how to fix this?

Sunray Sales 02-22-2011 08:19 AM

Re: Adding links/pages to Special.tpl
 
Can you show us what you mean? Take a screen shot?

You created your own hard coded link in the Special's box and you would like it to link to a pdf?

Can you provide an updated version of the code that you are using do this.

mizNRG 02-22-2011 09:07 AM

Re: Adding links/pages to Special.tpl
 
1 Attachment(s)
I have links to various pdf files within some of my product descriptions as well. All of my pdf files are doing the same thing. A screen shot is attached.

The code I added to Special.tpl:

Code:


<li><a href="/admin/getfile.php?file=%2Fpdf%2FK-Line_Catalog_212.pdf">K-Line Catalog 212</a></li>


Code to a pdf file within a product description:

Code:


<a href="/admin/getfile.php?file=%2Fpdf%2FAT3600-6.pdf">AT3600 RECOMMENDED ADAPTERS</a>


Sunray Sales 02-22-2011 10:16 AM

Re: Adding links/pages to Special.tpl
 
I am a little confused at what your trying to do, but I have an idea if I am on the correct path.

You want clients/customers to click on these links in the Specials.tpl to take them to pdfs?

If so, make a copy of your PDF and put it into the images folder.

So that would be xcart/images/something.pdf

Now when you type our <li> put the full path to your pdf file.
<li><a href="http://www.YOURWEBSITE.com/xcart/images/somthing.pdf"</a></li>

If you xcart installation is on your root, then you can omit the folder xcart and just have "http://www.website.com/images/something.pdg"

The possible reason why you are thrown to the admin page is because the PDF is located admin section?

If you want something to be public, I wouldn't put it in the admin folder.

Hope this helps.

AIEGaming 02-22-2011 10:27 AM

Re: Adding links/pages to Special.tpl
 
As Sunray Sales mentioned, if you want the pdf files to be public you shouldn't put them in the admin folder. Creating a folder called "documents" in the root directory for PDF and Word files would be a good solution. Are you trying to have the links open the PDF file so it can be viewed/downloaded or are you trying to embed it within your page? If you're looking for the viewing/downloading option, Sunray Sales' solution should work.

mizNRG 02-22-2011 11:19 AM

Re: Adding links/pages to Special.tpl
 
My pdf files are located in files/pdf/ which I can then access by going to Files in the admin section. This is where I copied the link and placed in either the Special.tpl or the product description. I wasn't having any problems with this method prior to switching from our test site to our new site.

I placed the pdf in the Images folder as suggested and it seems to be working fine. I really don't understand what the difference is between the two folders. They are both listed in the same location. Could it have to do with the .htaccess?

BTW - Most of the pdf files are product manuals, adapter lists and downloadable catalogs/product lists. They are not embeded.


All times are GMT -8. The time now is 11:19 PM.

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