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

Need manufacturer link to open in new window

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-09-2005, 10:09 AM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default Need manufacturer link to open in new window

When customers are in my store, and click on a manufacturer in the Manufacturer list, that manufacturer's logo and products come up. The logo is clickable and takes the customer directly to their website. I just want this website to open in a new window. I know how to do this, but not where! Which file do I add the code to?

Thanks!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #2  
Old 02-09-2005, 10:18 AM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

Nevermind, figured it out!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #3  
Old 02-09-2005, 10:37 PM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

Could you tell us what you did
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #4  
Old 02-09-2005, 10:43 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

Oh sure...lol! I always forget that it would be good to post the solution!

OK, go to Modules/Manufacturers/customer_manufacturer_products.tpl.

I am just going to cut and paste my code and bold the changes, I think that is the easiest way to show what I did...

Quote:
{* $Id: customer_manufacturer_products.tpl,v 1.3.2.2 2004/10/13 11:21:45 max Exp $ *}
{if $manufacturer.image ne '' || $manufacturer.descr ne '' || $manufacturer.url ne ''}
<TABLE border="0">
<TR>
{if $manufacturer.image ne ''}
<TD valign="top">{if $manufacturer.url ne ''}{/if}[img]{$xcart_web_dir}/mlogo.php?manufacturerid={$manufacturer.manufactur erid}[/img]{if $manufacturer.url ne ''}{/if}</TD>
{elseif $manufacturer.url ne ''}
<TD>{$lng.lbl_url}: {$manufacturer.url}</TD>
</TR>
<TR>
{/if}
<TD valign="top">{$manufacturer.descr|escape}</TD>
</TR>
</TABLE>


{/if}
{capture name=dialog}
{if $products ne ''}
{if $sort_fields}
<DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction}</DIV>


{/if}
{ include file="customer/main/navigation.tpl" }
{include file="customer/main/products.tpl" products=$products}
{else}
{$lng.txt_no_products_in_man}
{/if}
{/capture}
{include file="dialog.tpl" title=$manufacturer.manufacturer content=$smarty.capture.dialog extra="width=100%"}
{ include file="customer/main/navigation.tpl" }
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #5  
Old 02-09-2005, 10:45 PM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

Excellent thank you was just what I was looking for.

Last think I want is my customers leaving my shop for the manufacturers website!

Off to try it now
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #6  
Old 02-09-2005, 10:48 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

I know!!! I can't believe that wasn't just built in! I just discovered it and had to get it fixed!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #7  
Old 02-19-2005, 12:28 AM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

Worked perfectly thanks Danielle
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #8  
Old 02-19-2005, 06:54 AM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

No problem I'm glad it worked for you!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #9  
Old 07-09-2007, 05:59 PM
 
buck buck is offline
 

Member
  
Join Date: Apr 2007
Location: Calgary, Alberta, Canada
Posts: 25
 

Default Re: Need manufacturer link to open in new window

Hi Danielle,

I tried to incorporate in my code, but it didn't work. Here is my code. Can you tell why it won't work for me?

Code:
{* $Id: customer_manufacturer_products.tpl,v 1.12 2005/12/29 08:43:52 max Exp $ *} {if $manufacturer.is_image eq 'Y' || $manufacturer.descr ne '' || $manufacturer.url ne ''} <table> <tr> {if $manufacturer.is_image eq 'Y'} {* NEW CODE*} <TD valign="top">{if $manufacturer.url ne ''}{/if}[img]{$xcart_web_dir}/mlogo.php?manufacturerid={$manufacturer.manufactur erid}[/img]{if $manufacturer.url ne ''}{/if}</TD> {elseif $manufacturer.url ne ''} <TD>{$lng.lbl_url}: {$manufacturer.url}</TD> {* END NEW CODE*} {* replaced code to open new window with manufacturer's logo <td valign="top">{if $manufacturer.url ne ''}<a href="{$manufacturer.url}">{/if}<img src="{if $manufacturer.image_path ne ''}{$manufacturer.image_path}{else}{$xcart_web_dir}/image.php?id={$manufacturer.manufacturerid}&amp;type=M{/if}" alt="{$manufacturer.manufacturer|escape}" />{if $manufacturer.url ne ''}</a>{/if}</td> {elseif $manufacturer.url ne ''} <td>{$lng.lbl_url}: <a href="{$manufacturer.url}">{$manufacturer.url}</a></td> *} </tr> <tr> {/if} <td valign="top">{$manufacturer.descr}</td> </tr> </table> <br /> {/if} {capture name=dialog} {if $products ne ''} {if $sort_fields} <div align="right">{include file="main/search_sort_by.tpl" url="manufacturers.php?manufacturerid=`$manufacturer.manufacturerid`&page=`$navigation_page`&" sort_fields=$sort_fields selected=$sort direction=$sort_direction}</div> <br /> {/if} { include file="customer/main/navigation.tpl" } {include file="customer/main/products.tpl" products=$products} {else} {$lng.txt_no_products_in_man} {/if} {/capture} {include file="dialog.tpl" title=$manufacturer.manufacturer content=$smarty.capture.dialog extra='width="100%"'} { include file="customer/main/navigation.tpl" }


thank you,
Kara

Quote:
Originally Posted by Danielle
Oh sure...lol! I always forget that it would be good to post the solution!

OK, go to Modules/Manufacturers/customer_manufacturer_products.tpl.

I am just going to cut and paste my code and bold the changes, I think that is the easiest way to show what I did...
__________________
Kara
http://www.tipsproshop.com/store
xcart v4.7.8 [windows]
Reply With Quote
  #10  
Old 07-09-2007, 06:45 PM
 
buck buck is offline
 

Member
  
Join Date: Apr 2007
Location: Calgary, Alberta, Canada
Posts: 25
 

Default Re: Need manufacturer link to open in new window

I found the solution: The following HTML code will enable you to open all of your links in a new window. Place this code between your <HEAD> and </HEAD> tags in your /customer/home.tpl
<base target="main">
__________________
Kara
http://www.tipsproshop.com/store
xcart v4.7.8 [windows]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:55 AM.

   

 
X-Cart forums © 2001-2020