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)
-   -   Larger Text Area For Product Options (https://forum.x-cart.com/showthread.php?t=20773)

johnoc 03-28-2006 06:31 AM

Larger Text Area For Product Options
 
We have been trawling the forum for a clear answer to this question but as yet we have not found one.

We are currently upgrading to Version 4.0.16.
We would like to make the text area larger in the product options so that customers can add a gift message and be able to view their entire message as they type. We are sure it requires code in the template area but what the code is and more to the point where to put it is a small mystery! Our option class is Message with a text field as it's option.

balinor 03-28-2006 07:17 AM

You need to edit skin1/modules/Product_Options/customer_options.tpl. Change this bit of code to text field:

Code:

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

johnoc 03-28-2006 07:40 AM

Thanks for the swift reply Balinor -

We only want to create a larger text area for one option class which is the "Message" the other option classes that require text are fine as the standard issue text box.
Is this possible or will we need to make all the text boxes the same size in this area?
If this is possible, do you have any advice on the code we need to use.

Thanks.

balinor 03-28-2006 10:11 AM

Ok, try this. Replace this:

Code:


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


with this:

Code:

{if $v.classtext eq 'option text here'}

<textarea id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" cols="60" rows="10"></textarea>

{else}

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


replace 'option text here' with the actual Option text of the option you want to display the text field for. Let me know if it works for you.

johnoc 03-29-2006 06:47 AM

Tried the code out and it worked thank you so much - you helped resolve a very agrivating problem that was sending us all here a little crazy!!! - Alison.

:D

yages 09-08-2006 07:51 PM

Re: Larger Text Area For Product Options
 
How do you stop the text from continuing on the same line
I want it to auto drop to the next line when it comes to the end of the box

inebriate 09-08-2006 08:33 PM

Re: Larger Text Area For Product Options
 
in textarea add wrap=hard, or soft...depending if you want the carriage return to be included or not, also this may not work on all browsers

yages 09-08-2006 09:00 PM

Re: Larger Text Area For Product Options
 
add the word wrap=hard in text area, did not work
I am using firefox browser

inebriate 09-08-2006 09:41 PM

Re: Larger Text Area For Product Options
 
dont think wrapping works in firefox
probably possible to make it compatible with all 3 using javascript


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

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