Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
VirtueMart ForumVirtueMart Dev/Coding CentralVirtueMart Dev/Coding Central (Moderators: Soeren, aravot, gregdev)Adding textarea with wysiwyg editor to product.
Pages: [1]   Go Down
Print
Author Topic: Adding textarea with wysiwyg editor to product.  (Read 374 times)
alek9a1
Newbie
*
Posts: 4


« on: June 12, 2011, 02:23:12 AM »

Hello
I have a problem. I want to have a simple textarea with simple wysiwyg editor to each product.

What I do until now:

in addtocart_custom_attribute.tpl.php ( components/virtuemart/themes/templates/product_details/includes/)

I'm change:
   
Code:
<input type="text" class="inputboxattrib" id="<?php echo $attribute['titlevar'?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" />


to
   
Code:
<textarea type="text" class="inputboxattrib" rows="5" id="<?php echo $attribute['titlevar'?>_field" cols="45" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" style="margin-left: 5px; margin-bottom: 10px;"> </textarea>



Then i put wysiwyg edito (nicEdit) into it.


so now I have:

   
Code:
<script type="text/javascript" src="nicEdit.js"></script>
    <script type="text/javascript">
       bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
    </script>
    <textarea type="text" class="inputboxattrib" id="<?php echo $attribute['titlevar'?>_field" cols="45" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" style="margin-left: 5px; margin-bottom: 10px; width: 200px;"> Tutaj wpisz tekst swojej pieczątki</textarea>



The problem is when I put the product to a cart formatting dissappear, and there is only text without breaks or any formatting. How can i move both product and formatting to a cart. Thanks.

Virtuemart 1.1.8
Logged
Pages: [1]   Go Up
Print
Jump to: