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
  #61  
Old 02-05-2005, 09:02 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

WOW, I think I found my answer to the template issue.

Allow end user to pick from a line up of templates that are pre defined and allow them to edit in order to personalize them.

I will be working on this for the next little while and when I get it done, if anyone interested I will let you know.

Also found a way to load images for the end user to pick from list and insert into their cards, invites etc.

This will definately be a huge hit for end users using the Gift Registry and know absolutley nothing about HTML.

Now it will appear they know much more...
__________________
vs 4.1.12
Reply With Quote
  #62  
Old 02-14-2005, 04:48 PM
 
SugarFreeGum SugarFreeGum is offline
 

Newbie
  
Join Date: Nov 2004
Location: Australia
Posts: 8
 

Default

Hi,

How do i get this mod woking in 4.0.11?

Thanks!
__________________
X-Cart v4
Reply With Quote
  #63  
Old 02-14-2005, 04:53 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by SugarFreeGum
Hi,

How do i get this mod woking in 4.0.11?

Thanks!

Read the thread.

Implement the code.

Test your work.

AND BACK UP! In case Murphey Sticks his ugly nose in it.
__________________
vs 4.1.12
Reply With Quote
  #64  
Old 02-14-2005, 07:26 PM
 
SugarFreeGum SugarFreeGum is offline
 

Newbie
  
Join Date: Nov 2004
Location: Australia
Posts: 8
 

Default

I have read the thread - On the 3rd page is code for v4.0.4 but i can not find "/main/product_details.tpl"


Quote:
Originally Posted by markwhoo
Quote:
Originally Posted by SugarFreeGum
Hi,

How do i get this mod woking in 4.0.11?

Thanks!

Read the thread.

Implement the code.

Test your work.

AND BACK UP! In case Murphey Sticks his ugly nose in it.
__________________
X-Cart v4
Reply With Quote
  #65  
Old 02-14-2005, 08:11 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by SugarFreeGum
I have read the thread - On the 3rd page is code for v4.0.4 but i can not find "/main/product_details.tpl"


Quote:
Originally Posted by markwhoo
Quote:
Originally Posted by SugarFreeGum
Hi,

How do i get this mod woking in 4.0.11?

Thanks!

Read the thread.

Implement the code.

Test your work.

AND BACK UP! In case Murphey Sticks his ugly nose in it.

Actually, this code works all the way through the thread for all versions, you just need to know what you want and apply it.

Where are you wanting to place this editor?

Anywhere else you want to place this code, just look for the references, and apply the code, it will work.

Any questions, place a post. I am not in your version, but I may be able to help. I am sure others may chime in as well.
__________________
vs 4.1.12
Reply With Quote
  #66  
Old 02-14-2005, 08:31 PM
 
SugarFreeGum SugarFreeGum is offline
 

Newbie
  
Join Date: Nov 2004
Location: Australia
Posts: 8
 

Default

Hi,

I want it for the detailed descriptions when adding/modifying an item.

I gave placed the original code into product_modify.tpl but had no luck.
(very new to php/xcart)
__________________
X-Cart v4
Reply With Quote
  #67  
Old 02-14-2005, 09:24 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by SugarFreeGum
Hi,

I want it for the detailed descriptions when adding/modifying an item.

I gave placed the original code into product_modify.tpl but had no luck.
(very new to php/xcart)

Did you find the xcart/skin1/main/product_details.tpl ?
__________________
vs 4.1.12
Reply With Quote
  #68  
Old 02-15-2005, 05:14 PM
 
SugarFreeGum SugarFreeGum is offline
 

Newbie
  
Join Date: Nov 2004
Location: Australia
Posts: 8
 

Default

Quote:
Originally Posted by markwhoo
Quote:
Originally Posted by SugarFreeGum
Hi,

I want it for the detailed descriptions when adding/modifying an item.

I gave placed the original code into product_modify.tpl but had no luck.
(very new to php/xcart)

Did you find the xcart/skin1/main/product_details.tpl ?

Yes i have found that, what code do i place in this file? Also does the code have to be in a particular spot?

Thanks again
__________________
X-Cart v4
Reply With Quote
  #69  
Old 02-15-2005, 06:55 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by SugarFreeGum
Quote:
Originally Posted by markwhoo
Quote:
Originally Posted by SugarFreeGum
Hi,

I want it for the detailed descriptions when adding/modifying an item.

I gave placed the original code into product_modify.tpl but had no luck.
(very new to php/xcart)

Did you find the xcart/skin1/main/product_details.tpl ?

Yes i have found that, what code do i place in this file? Also does the code have to be in a particular spot?

Thanks again

OK, Here is mine, it is in Version 4.0.11, not sure what your is, may want to edit your details to reflect version if you really want others to help you in the future, it helps due to so many code changes in cart.


Now look at my code close, I have made your changes inside the stars, and don't forget to remove the stars or it won't work.

Code:
{* $Id: product_details.tpl,v 1.15.2.5 2004/11/05 12:48:25 max Exp $ *} ******** {literal} <script language="Javascript1.2"><!-- // load htmlarea _editor_url = "https://www.TheMagickMoon.com/htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } // --></script> {/literal} ******** {capture name=dialog} <TABLE border="0" cellpadding="4" cellspacing="0" width="100%"> <FORM action="product_modify.php" method="POST" name="modifyform"> <INPUT type="hidden" name="productid" value="{$product.productid}"> <INPUT type="hidden" name="section" value="{$section}"> <INPUT type="hidden" name="mode" value="product_modify"> {if $productids ne ''} <TR> <TD width="15" class="TableSubHead"></TD> <TD class="TableSubHead" colspan="2">* {$lng.lbl_note}: {$lng.txt_edit_product_group}</TD> </TR> {/if} {if $config.Appearance.show_thumbnails eq "Y"} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD colspan="2">{include file="main/subheader.tpl" title=$lng.lbl_product_thumbnail}</TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[thumbnail]"></TD>{/if} <TD class="ProductDetails" valign="top"><FONT class="FormButton">{$lng.lbl_thumbnail}</FONT> {$lng.lbl_thumbnail_msg}</TD> <TD class="ProductDetails"> {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product} <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <TD> <INPUT type="button" value="{$lng.lbl_change_image}" onclick='javascript: if (confirm("{$lng.txt_change_image_text|strip_tags}")){ldelim}popup_image_selection("T", "{$product.productid}", "{$query_string}");{rdelim}'> <INPUT type="button" value="{$lng.lbl_delete_image}" onclick='javascript: if (confirm("{$lng.txt_change_image_text|strip_tags}")){ldelim}self.location="product_modify.php?mode=delete_thumbnail&productid={$product.productid}"{rdelim}'> </TD> <TR> {if $file_upload_data.file_path} <TR> <TD> {$lng.txt_save_thumbnail_note} </TD> </TR> {/if} </TABLE> </TD> </TR> {/if} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD colspan="2"> {include file="main/subheader.tpl" title=$lng.lbl_product_owner}</TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD class="FormButton" width="20%" nowrap>{$lng.lbl_provider}:</TD> <TD class="ProductDetails" width="80%"> {if $usertype eq "A" and $new_product eq 1} <SELECT name="provider" class="InputWidth"> {section name=prov loop=$providers} <OPTION value="{$providers[prov].login}">{$providers[prov].login} ({$providers[prov].title} {$providers[prov].lastname} {$providers[prov].firstname})</OPTION> {/section} </SELECT> {else} {$provider_info.title} {$provider_info.lastname} {$provider_info.firstname} ({$provider_info.login}) {/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD colspan="2"> {include file="main/subheader.tpl" title=$lng.lbl_classification}</TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[categoryid]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_main_category}:</TD> <TD class="ProductDetails"> <SELECT name="categoryid" class="InputWidth"> {section name=cat_num loop=$allcategories} <OPTION value="{$allcategories[cat_num].categoryid}" {if $allcategories[cat_num].categoryid eq $product.categoryid or $allcategories[cat_num].categoryid eq $default_categoryid}selected{/if}>{$allcategories[cat_num].category_path}</OPTION> {/section} </SELECT> {if $top_message.fillerror ne "" and $product.categoryid eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[categoryids]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_additional_categories}:</TD> <TD class="ProductDetails"> <SELECT name="categoryids[]" class="InputWidth" multiple size="8"> {section name=cat_num loop=$allcategories} <OPTION value="{$allcategories[cat_num].categoryid}" {if $allcategories[cat_num].productid eq $product.productid and $product.productid ne "" and $allcategories[cat_num].main ne "Y"}selected{/if}>{$allcategories[cat_num].category_path}</OPTION> {/section} </SELECT></TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[forsale]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_availability}:</TD> <TD class="ProductDetails"> <SELECT name="forsale"> <OPTION value="Y" {if $product.forsale eq "Y"}selected{/if}>{$lng.lbl_avail_for_sale}</OPTION> <OPTION value="H" {if $product.forsale eq "H"}selected{/if}>{$lng.lbl_hidden}</OPTION> <OPTION value="N" {if $product.forsale eq "N"}selected{/if}>{$lng.lbl_disabled}</OPTION> {if $active_modules.Product_Configurator} <OPTION value="B" {if $product.forsale eq "B"}selected{/if}>{$lng.lbl_bundled}</OPTION> {/if} </SELECT> </TD> </TR> {if $product.forsale eq 'H'} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[categoryids]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_product_url}:</TD> <TD class="ProductDetails">{$catalogs.customer}/product.php?productid={$product.productid}&cat={$product.categoryid}</TD> </TR> {/if} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD colspan="2"> {include file="main/subheader.tpl" title=$lng.lbl_details}</TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_sku}:</TD> <TD class="ProductDetails"> <INPUT type="text" name="productcode" size="20" value="{$product.productcode}" class="InputWidth"> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[product]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_product_name}:</TD> <TD class="ProductDetails"> <INPUT type="text" name="product" size="45" class="InputWidth" value="{$product.product|escape}"> {if $top_message.fillerror ne "" and $product.product eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {if $active_modules.Egoods ne ""} {include file="modules/Egoods/egoods.tpl"} {/if} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[descr]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_short_description}* :</TD> <TD class="ProductDetails"> <TEXTAREA name="descr" cols="45" rows="6" class="InputWidth">{$product.descr|escape:"html"}</TEXTAREA> {if $top_message.fillerror ne "" and $product.descr eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[fulldescr]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_det_description}* :</TD> <TD class="ProductDetails"> <TEXTAREA name="fulldescr" cols="45" rows="10" class="InputWidth">{$product.fulldescr|escape:"html"}</TEXTAREA> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"></TD>{/if} <TD colspan="2"> {$lng.txt_html_tags_in_description} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead">{if $product.is_variant eq 'Y'}{else}<INPUT type="checkbox" value="Y" name="fields[price]">{/if}</TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_price} ({$config.General.currency_symbol})</TD> <TD class="ProductDetails"> <INPUT type="text" name="price" size="18" value="{if $product.productid eq ""}0.00{else}{ $product.price }{/if}"{if $product.is_variant eq 'Y'} readonly{/if}> {if $top_message.fillerror ne "" and $product.price eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} {if $product.is_variant eq 'Y'} {$lng.lbl_note}: {$lng.txt_pvariant_price_note}{/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[list_price]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_list_price} <SPAN class="Text"> ({$config.General.currency_symbol})</SPAN></TD> <TD class="ProductDetails"> <INPUT type="text" name="list_price" size="18" value="{if $product.productid eq ""}0.00{else}{$product.list_price}{/if}"> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead">{if $product.is_variant eq 'Y'}{else}<INPUT type="checkbox" value="Y" name="fields[avail]">{/if}</TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_quantity_in_stock}</TD> <TD class="ProductDetails"> <INPUT type="text" name="avail" size="18" value="{if $product.productid eq ""}1000{else}{ $product.avail }{/if}"{if $product.is_variant eq 'Y'} readonly{/if}> {if $top_message.fillerror ne "" and $product.avail eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} {if $product.is_variant eq 'Y'} {$lng.lbl_note}: {$lng.txt_pvariant_avail_note}{/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[low_avail_limit]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_lowlimit_in_stock}</TD> <TD class="ProductDetails"> <INPUT type="text" name="low_avail_limit" size="18" value="{if $product.productid eq ""}10{else}{ $product.low_avail_limit }{/if}"> {if $top_message.fillerror ne "" and $product.low_avail_limit le 0}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[min_amount]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_min_order_amount}</TD> <TD class="ProductDetails"> <INPUT type="text" name="min_amount" size="18" value="{if $product.productid eq ""}1{else}{$product.min_amount}{/if}"> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead">{if $product.is_variant eq 'Y'}{else}<INPUT type="checkbox" value="Y" name="fields[weight]">{/if}</TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_weight} ({$config.General.weight_symbol})</TD> <TD class="ProductDetails"> <INPUT type="text" name="weight" size="18" value="{if $product.productid eq ""}0.00{else}{ $product.weight }{/if}"{if $product.is_variant eq 'Y'} readonly{/if}> {if $product.is_variant eq 'Y'} {$lng.lbl_note}: {$lng.txt_pvariant_weight_note}{/if} </TD> </TR> {if $active_modules.RMA ne ''} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[return_time]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_return_time}</TD> <TD class="ProductDetails"> <INPUT type="text" name="return_time" size="18" value="{$product.return_time}"> </TD> </TR> {/if} {if $taxes} <SCRIPT type="text/javascript" language="JavaScript 1.2"> <!-- function ChangeTaxesBoxStatus() {ldelim} if (document.modifyform.free_tax.value=='Y') disabled = true; else disabled = false; document.modifyform.elements('taxes[]').disabled = disabled; {rdelim} --> </SCRIPT> {/if} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[free_tax]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_tax_exempt}</TD> <TD class="ProductDetails"> <SELECT name="free_tax"{if $taxes} onchange="javascript:ChangeTaxesBoxStatus();"{/if}> <OPTION value='N' {if ($product.free_tax eq 'N')} selected {/if}>{$lng.lbl_no}</OPTION> <OPTION value='Y' {if ($product.free_tax eq 'Y')} selected {/if}>{$lng.lbl_yes}</OPTION> </SELECT> </TD> </TR> {if $taxes} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[taxes]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_apply_taxes}</TD> <TD> <SELECT name="taxes[]" multiple{if $product.free_tax eq "Y"} disabled{/if}> {section name=tax loop=$taxes} <OPTION value="{$taxes[tax].taxid}"{if $taxes[tax].selected gt 0 and $product.productid ne ""} selected{/if}>{$taxes[tax].tax_name}</OPTION> {/section} </SELECT> {$lng.lbl_hold_ctrl_key} {if $usertype eq "P" or $active_modules.Simple_Mode ne ""} {$lng.lbl_click_here_to_modify_vat}{/if} </TD> </TR> {/if} <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[free_shipping]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_free_shipping}</TD> <TD class="ProductDetails"> <SELECT name="free_shipping"> <OPTION value='N' {if ($product.free_shipping eq 'N')} selected {/if}>{$lng.lbl_no}</OPTION> <OPTION value='Y' {if ($product.free_shipping eq 'Y')} selected {/if}>{$lng.lbl_yes}</OPTION> </SELECT> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[shipping_freight]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_shipping_freight} ({$config.General.currency_symbol})</TD> <TD class="ProductDetails"> <INPUT type="text" name="shipping_freight" size="18" value="{if $product.shipping_freight eq ""}0.00{else}{$product.shipping_freight}{/if}"> </TD> </TR> <TR> {if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[discount_avail]"></TD>{/if} <TD class="FormButton" nowrap>{$lng.lbl_apply_global_discounts}</TD> <TD class="ProductDetails"> <INPUT type="checkbox" name="discount_avail" value="Y" {if $product.productid eq ""}checked{elseif $product.discount_avail eq "Y"}checked{/if}> </TD> </TR> {if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product_modify.tpl"} {/if} <TR> <TD colspan="3" align="center"> <INPUT type="submit" value=" {$lng.lbl_save} "></TD> </TR> ********* <script language="JavaScript1.2" defer> editor_generate('fulldescr'); </script> <script language="JavaScript1.2" defer> editor_generate('descr'); </script> ********* </FORM> </TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_product_details content=$smarty.capture.dialog extra="width=100%"}


Add what is inside the stars to your file and remove the stars for petes sake, if you don't, it wont work. (BOLD WAS NOT WORKING FOR SOME REASON)

Make sure your HTML Text Area File has been uploaded into the root of your site and is configured properly, then test it.


Hope this works for ya.

Remember to BACK UP ALL FILES!!!
__________________
vs 4.1.12
Reply With Quote
  #70  
Old 02-16-2005, 07:12 PM
 
SugarFreeGum SugarFreeGum is offline
 

Newbie
  
Join Date: Nov 2004
Location: Australia
Posts: 8
 

Default

Thanks heaps, its working now.

Is there a htmlarea version thats compatible with FireFox Browser?
__________________
X-Cart v4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 03:32 PM.

   

 
X-Cart forums © 2001-2020