VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: dsrpmedia on January 23, 2017, 23:35:05 PM

Title: add more rows to customer note area
Post by: dsrpmedia on January 23, 2017, 23:35:05 PM
Hi I am treying to add more notes to the customer note area

I found this in the 'script.virtuemart.php' file in the install folder - but that does not seem like a good place to be editing

$data = array ('type' => 'textarea'
         , 'maxlength' => 2500
         , 'cols' => 60
         , 'rows' => 1
         , 'name' => 'customer_note'
         , 'title' => 'COM_VIRTUEMART_CNOTES_CART'
         , 'description' => ''
         , 'default' => ''
         , 'required' => 0
         , 'cart' => 1
         , 'account' => 0
         , 'shipment' => 0
         , 'readonly' => 0
         , 'published' => 1
         );

is this where I should changing rows from '1' to say '5' or is there a better place this could be done (say in a template override)

thank you!
Title: Re: add more rows to customer note area
Post by: Studio 42 on January 24, 2017, 16:07:35 PM
add more notes to the customer note area ?
YOu mean bigger ?
Else simply copy current customer note field should work
Title: Re: add more rows to customer note area
Post by: GJC Web Design on January 24, 2017, 17:02:41 PM
or if u mean the box size just set it with css
Title: Re: add more rows to customer note area
Post by: dsrpmedia on January 24, 2017, 18:21:06 PM
css can set how many rows high the comment area is?

I thought the actual form itself would have to be edited - I found that section in script.virtuemart.php which clearly sets the textarea for COM_VIRTUEMART_CNOTES_CART @ 1 row

I need to find the page that generates this code

<textarea id="customer_note_field" name="customer_note" cols="60" rows="1" class="inputbox"  maxlength="2500"></textarea>

so that I can change the rows="1" to rows="5"

how would I change this with css?
Title: Re: add more rows to customer note area
Post by: jenkinhill on January 24, 2017, 18:55:23 PM
Notes and special requests  is a shopper field textarea, customer_note, and can be edited in the shopper fields list to add more rows.
Title: Re: add more rows to customer note area
Post by: dsrpmedia on January 24, 2017, 19:00:11 PM
SWEEET!

you rock jenkinhill, thank you so much (once again)

I will mark this one solved
Title: Re: add more rows to customer note area
Post by: GJC Web Design on January 24, 2017, 21:30:14 PM
does "rows" do anything?

#customer_note_field {height:150px;} certainly does and over rides rows
Title: Re: add more rows to customer note area
Post by: Studio 42 on January 24, 2017, 23:43:55 PM
Quote from: GJC Web Design on January 24, 2017, 21:30:14 PM
does "rows" do anything?

#customer_note_field {height:150px;} certainly does and over rides rows
rows is obselete, CSS should overide HTML rows or cols Eg width:100%;height:400px
Title: Re: add more rows to customer note area
Post by: jenkinhill on January 24, 2017, 23:50:52 PM
css is too complicated for some users but if a simple config is available then so much the better - for them.
Title: Re: add more rows to customer note area
Post by: dsrpmedia on January 24, 2017, 23:56:30 PM
I really liked being able to set this in the backend (Once I was pointed in the right direction)