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

Want a WYSIWYG detailed description text area?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #121  
Old 04-14-2006, 05:27 AM
 
gallica gallica is offline
 

Member
  
Join Date: Aug 2005
Posts: 26
 

Default

To get this one working you might do the following :

Extract content of archive into /provider/

Modify single/home.tpl, and right after the </HEAD> put
Code:
<script language="JavaScript" type="text/javascript" src="wysiwyg.js">

and then finaly, amend the skin1/main/product_details.tpl like that for product detail description
Code:
<TEXTAREA id="textarea1" name="fulldescr" cols="45" rows="12" class="InputWidth" id="wysiwyg1">{$product.fulldescr|escape:"html"}</TEXTAREA> <script language="javascript1.2"> generate_wysiwyg('textarea1'); </script>
__________________
Xcart 4.018
Heavily moded
http://www.france-modelisme.com
Reply With Quote
  #122  
Old 05-13-2006, 03:04 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

In my case, the install was on an X-Cart Pro package and you can edit products in admin. If you are a "provder", then you just need to apply the mod to those respective files.

- Mike
__________________
4.1.9
Reply With Quote
  #123  
Old 05-14-2006, 02:01 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 302
 

Default

I have just installed htmlarea and it is working fairly well. I am using it on detailed desc. and static pages.

Is there a way to use the editor for short descriptions and detailed? I found the code for detailed, but I can't make them both work.

Also has anybody ever figured out a fix on the multiple refreshing that is sometimes required?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #124  
Old 05-14-2006, 02:53 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Quote:
Add the id="wysiwyg1" to the TEXTAREA to correspond. Change the ID for multiple instances.
That should solve your issue (the change ID part)... make the first one wysiwyg1 and the second one wysiwyg2 and change the call in both instances per usage.

- Mike
__________________
4.1.9
Reply With Quote
  #125  
Old 05-14-2006, 03:41 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 302
 

Default

Here is what I ended up doing and it seems to have worked. I first removed the code from the top of product_modify.tpl that I had added during original install. Then I added this code to product_details.tpl.

Code:
<TD colspan="3" align="center"> <INPUT type="submit" value=" {$lng.lbl_save} "></TD> </TR> *******ADDED******** <script language="JavaScript1.2" defer> editor_generate('descr'); </script> <script language="JavaScript1.2" defer> editor_generate('fulldescr'); </script> ********************* </FORM> </TABLE>

I now have the editor for both descriptions and no errors. I also have this coded for the static pages and I did have to refresh that a few times, but that is a much less used area, so the hassle factor is minor to me.
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #126  
Old 05-14-2006, 04:54 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

It may help to just remove the "template cache" as the editor just takes a few clicks to install... and the vanilla code should work for most versions.

- Mike
__________________
4.1.9
Reply With Quote
  #127  
Old 05-20-2006, 06:28 PM
 
jsa jsa is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 197
 

Default Languages WYSIWYG editor + Firefox question for OpenWYSIWYG

Thanks mffowler for the awesome OpenWYSIWYG solution! Nice!

If you want to use this in your languages area, it's a little more complex. Here's what you do.

open up skin1/admin/main/languages.tpl

After:
Code:
<TD align="left"><TEXTAREA cols="35" rows="6" name=var_value[{$data[di].name}]>{$data[di].value|escape:html}</TEXTAREA>

Add:
Code:
<script language="JavaScript"> generate_wysiwyg('var_value[{$data[di].name}]'); </script>

Also, I have a question.

Oddly, this doesn't work in Firefox for me, just IE. It's weird, because example.html shows the WYSIWYG box in all browsers for me.

Anybody have any guesses as to why that may be?
__________________
Building: X-Cart GoldPlus 4.6.1
Old cart:
XC 4.0.17 FComp-RMA-AOM-OFF-Affil
BCSE: Referral Pts-Surveys-BatchUp-OrderEZ- Reviews-RSS
FT: Glossary-OptCopt-AdvSrch-Recently Viewed-Also Bought
CM: eZConversion
XP: SalesRecovery, MultCrncy
Reply With Quote
  #128  
Old 05-20-2006, 06:33 PM
 
jsa jsa is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 197
 

Default

This also works super duper great for static content. Add the "vanilla" code mffolwer gives to admin/main/page_edit.tpl

like this:

Code:
<script language="JavaScript"> generate_wysiwyg('pagecontent'); </script>

You can't believe how much easier this makes 4.0.17 to use.

Now if only there was a spell checker built-in to double check my work
__________________
Building: X-Cart GoldPlus 4.6.1
Old cart:
XC 4.0.17 FComp-RMA-AOM-OFF-Affil
BCSE: Referral Pts-Surveys-BatchUp-OrderEZ- Reviews-RSS
FT: Glossary-OptCopt-AdvSrch-Recently Viewed-Also Bought
CM: eZConversion
XP: SalesRecovery, MultCrncy
Reply With Quote
  #129  
Old 05-20-2006, 07:02 PM
 
jsa jsa is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 197
 

Default

Ooops - spoke too soon.

While the HTML editor shows up everywhere, it's not saving my edits. I think I may have misread something somewhere, or made a wrong assumption. I'll keep working on it.
__________________
Building: X-Cart GoldPlus 4.6.1
Old cart:
XC 4.0.17 FComp-RMA-AOM-OFF-Affil
BCSE: Referral Pts-Surveys-BatchUp-OrderEZ- Reviews-RSS
FT: Glossary-OptCopt-AdvSrch-Recently Viewed-Also Bought
CM: eZConversion
XP: SalesRecovery, MultCrncy
Reply With Quote
  #130  
Old 09-23-2006, 06:09 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default Re: Want a WYSIWYG detailed description text area?

Yes, in hindsight- my original post wasn't very complete. Although this is a simple mod that most can install... there are a few version differences that I have noted.

But, with most Gold pre-4.1.x installs, you simply need to put the contents of the "wysiwyg_beta" folder into your root "admin" directory. Then add the previously mentioned code. I was just also just able to do it for the new modify tpl which makes a client very happy..

- Mike
__________________
4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 06:48 AM.

   

 
X-Cart forums © 2001-2020