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

How do I increase the size of a text field in "customer options"???

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-31-2008, 04:20 PM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Exclamation How do I increase the size of a text field in "customer options"???

For one of the options I want a multiple line text field instead of the single line. I know I need to modify /modules/Product_Options/customer_options.tpl but I'm unsure of exactly the code I need to use. I want to use an "if" statement so that only the customer option named Description shows up as a multiple line text field.

If anyone could help me out that would be awesome...thanks!
__________________
Version 4.1.9
Reply With Quote
  #2  
Old 08-07-2008, 08:48 AM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

Does anyone know?? I really need to launch a new product with larger text fields for customer options. I'll even pay someone to help me out.....
__________________
Version 4.1.9
Reply With Quote
  #3  
Old 08-07-2008, 09:22 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: How do I increase the size of a text field in "customer options"???

{if $v.is_modifier eq 'T' & $v.classtext eq 'Notes'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" />

{else $v.is_modifier eq 'T'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" />

Change Notes to wahtever you named you field, and just placve a style in the box.
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 08-13-2008, 11:21 AM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

I placed this in customer_options.tpl :

{elseif $v.is_modifier eq 'T' & $v.classtext eq 'Keywords'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" />
{else $v.is_modifier eq 'T'}

<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" />


The option that I named Keywords is still displaying the regular text field. Did I enter something wrong? Thanks
__________________
Version 4.1.9
Reply With Quote
  #5  
Old 08-13-2008, 11:54 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: How do I increase the size of a text field in "customer options"???

post the contents of your customer_options.tpl
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 08-17-2008, 03:32 PM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

Code:
{* $Id: customer_options.tpl,v 1.24 2006/04/07 05:19:21 svowl Exp $ *} {if $product_options ne ''} {if $nojs ne 'Y'} <tr style="display: none;"><td> <script type="text/javascript" language="JavaScript 1.2"> <!-- var alert_msg = '{$alert_msg}'; --> </script> {include file="modules/Product_Options/check_options.tpl"} </td></tr> {/if} {foreach from=$product_options item=v} {if $v.options ne '' || $v.is_modifier eq 'T'} <tr> <td valign="middle" height="25">{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class}{/if}</td> <td valign="middle"> {if $cname ne ""} {assign var="poname" value="$cname[`$v.classid`]"} {else} {assign var="poname" value="product_options[`$v.classid`]"} {/if} {if $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="http://" /> {else} <select id="po{$v.classid}" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}> {foreach from=$v.options item=o} <option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}</option> {/foreach} </select> {if $v.classtext eq 'Country/Region:'} <A HREF="javascript:popUp('http://www.mysitecom/cart/o1.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Category:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o2.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Campaign Length:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o3.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Your URL:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o4.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Search Engine Submission:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o5.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.is_modifier eq 'T' & $v.classtext eq 'Keywords'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" /> {else $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" /> {/if} {/if} </td> </tr> {/if} {/foreach} {/if} {if $product_options_ex ne ""} <tr> <td colspan="2"><font id="exception_msg" color="red"></font></td> </tr> {if $err ne ''} <tr> <td colspan="2"><font class="CustomerMessage">{$lng.txt_product_options_combinations_warn}:</font></td> </tr> {foreach from=$product_options_ex item=v} <tr> <td>{foreach from=$v item=o}{if $usertype eq "A"}{$o.class}{else}{$o.classtext}{/if}: {$o.option_name}<br />{/foreach}<br /></td> </tr> {/foreach} {/if} {/if}
__________________
Version 4.1.9
Reply With Quote
  #7  
Old 08-17-2008, 05:28 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: How do I increase the size of a text field in "customer options"???

try this.... I just moved it to the top like it is in mine. may work may not. did not test.


!!!!MAKE A BACK UP FIRST!!!!


{* $Id: customer_options.tpl,v 1.24 2006/04/07 05:19:21 svowl Exp $ *}
{if $product_options ne ''}
{if $nojs ne 'Y'}
<tr style="display: none;"><td>
<script type="text/javascript" language="JavaScript 1.2">
<!--
var alert_msg = '{$alert_msg}';
-->
</script>
{include file="modules/Product_Options/check_options.tpl"}
</td></tr>
{/if}
{foreach from=$product_options item=v}
{if $v.options ne '' || $v.is_modifier eq 'T'}
<tr>
<td valign="middle" height="25">{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class }{/if}</td>
<td valign="middle">
{if $cname ne ""}
{assign var="poname" value="$cname[`$v.classid`]"}
{else}
{assign var="poname" value="product_options[`$v.classid`]"}
{/if}


{if $v.is_modifier eq 'T' & $v.classtext eq 'Keywords'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" />

{elseif $v.is_modifier eq 'T'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="http://" />
{else}
<select id="po{$v.classid}" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}>
{foreach from=$v.options item=o}
<option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}</option>
{/foreach}
</select>
{if $v.classtext eq 'Country/Region:'}
<A HREF="javascript:popUp('http://www.mysitecom/cart/o1.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A>
{elseif $v.classtext eq 'Category:'}
<A HREF="javascript:popUp('http://www.mysite.com/cart/o2.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A>
{elseif $v.classtext eq 'Campaign Length:'}
<A HREF="javascript:popUp('http://www.mysite.com/cart/o3.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A>
{elseif $v.classtext eq 'Your URL:'}
<A HREF="javascript:popUp('http://www.mysite.com/cart/o4.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A>
{elseif $v.classtext eq 'Search Engine Submission:'}
<A HREF="javascript:popUp('http://www.mysite.com/cart/o5.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A>
{else $v.is_modifier eq 'T'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" />
{/if}
{/if}
</td>
</tr>
{/if}
{/foreach}
{/if}

{if $product_options_ex ne ""}
<tr>
<td colspan="2"><font id="exception_msg" color="red"></font></td>
</tr>
{if $err ne ''}
<tr>
<td colspan="2"><font class="CustomerMessage">{$lng.txt_product_options_ combinations_warn}:</font></td>
</tr>
{foreach from=$product_options_ex item=v}
<tr>
<td>{foreach from=$v item=o}{if $usertype eq "A"}{$o.class}{else}{$o.classtext}{/if}: {$o.option_name}<br />{/foreach}<br /></td>
</tr>
{/foreach}
{/if}
{/if}
__________________
xcart 5.1.2
Reply With Quote
  #8  
Old 08-17-2008, 09:51 PM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

Thanks so much, it worked....it now displays as a 300x100 text field, but it still functions as a single-lined text field. I'm sure theres an easy to fix this code to make it function like a multi-lined text box (like this: http://www.echoecho.com/htmlforms08.htm)

<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" />
__________________
Version 4.1.9
Reply With Quote
  #9  
Old 08-18-2008, 09:32 AM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

I fixed it.....heres the code I used instead:

{if $v.is_modifier eq 'T' & $v.classtext eq 'Keywords:'}
<textarea type="text" name="{$poname}" value="{$v.default|escape}" cols="35" rows="5"></textarea>
__________________
Version 4.1.9
Reply With Quote
  #10  
Old 08-20-2008, 11:20 AM
 
MattZatus MattZatus is offline
 

Member
  
Join Date: May 2008
Posts: 19
 

Default Re: How do I increase the size of a text field in "customer options"???

I want to add another {if} command to make another option a textarea. How would I do that?

I tried adding this below it and it gives me an error:

{elseif $v.is_modifier eq 'T' & $v.classtext eq 'Description:'}
<textarea type="text" name="{$poname}" value="{$v.default|escape}" cols="35" rows="5"></textarea>
__________________
Version 4.1.9
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 02:28 PM.

   

 
X-Cart forums © 2001-2020