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

Adding links/pages to Special.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-01-2010, 11:37 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default 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
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #2  
Old 12-01-2010, 03:42 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 12-02-2010, 05:39 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default 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}
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #4  
Old 12-02-2010, 02:15 PM
 
peddler peddler is offline
 

Senior Member
  
Join Date: May 2007
Posts: 140
 

Default 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.
__________________
Ralph
X-Cart v4.4.2 Gold (still buggy, some are new ones)
PHP 5.2.13
Reply With Quote
  #5  
Old 02-22-2011, 06:24 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default 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?
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #6  
Old 02-22-2011, 08:19 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default 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.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #7  
Old 02-22-2011, 09:07 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default Re: Adding links/pages to Special.tpl

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>
Attached Thumbnails
Click image for larger version

Name:	pdfError.jpg
Views:	96
Size:	308.9 KB
ID:	2450  
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #8  
Old 02-22-2011, 10:16 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default 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.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #9  
Old 02-22-2011, 10:27 AM
  AIEGaming's Avatar 
AIEGaming AIEGaming is offline
 

Advanced Member
  
Join Date: Nov 2010
Posts: 41
 

Default 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.
__________________
version 4.4.2
Reply With Quote
  #10  
Old 02-22-2011, 11:19 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default 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.
__________________
X-Cart 4.4.4 Gold
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 03:19 PM.

   

 
X-Cart forums © 2001-2020