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

Display HTML in Extra fields

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 03-02-2008, 02:37 AM
  designtheweb's Avatar 
designtheweb designtheweb is offline
 

Senior Member
  
Join Date: Mar 2005
Location: Sydney Australia
Posts: 132
 

Default Re: Display HTML in Extra fields

Grant

In step 5 you state to Open modules/Extra/product_modify.tpl and find :

I would suggest you mean skin1/modules/Extra_Fields/product_modify.tpl as the directory "Extra" does not exist - can you please confirm because my admin is not showing up the html part.
__________________
"The more you know - the less you pay"

Various websites using

4.66 Pro & 5
Reply With Quote
  #22  
Old 03-02-2008, 02:53 AM
  designtheweb's Avatar 
designtheweb designtheweb is offline
 

Senior Member
  
Join Date: Mar 2005
Location: Sydney Australia
Posts: 132
 

Default Re: Display HTML in Extra fields

Having issues of the html box showing up in the Admin section. Am wondering if there are any issues with 4.1.9?
__________________
"The more you know - the less you pay"

Various websites using

4.66 Pro & 5
Reply With Quote
  #23  
Old 04-10-2008, 03:40 AM
 
Plug Plug is offline
 

Member
  
Join Date: Oct 2006
Posts: 14
 

Default Re: Display HTML in Extra fields

I have this working fine but I want something a little extra and I can't seem to get it to work.

In the administration I want to be able to see the extra field in the product list.

The file to modify is main/products.tpl

I have tried

Code:
{$products[product].descr|truncate:300:"...":true}{assign var="itunes" value=$products[product].productid|extrafield:5} {if $itunes ne ""}{$itunes} {/if}

but i get this error

Code:
INVALID SQL: 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND fieldid= 5' at line 1 SQL QUERY FAILURE: SELECT value FROM xcart_extra_field_values WHERE productid = AND fieldid= 5

Does anyone have any suggestions?
__________________
x-cart 4.0.19 Gold
www.the-plug.com
Reply With Quote
  #24  
Old 06-08-2008, 05:49 PM
  designtheweb's Avatar 
designtheweb designtheweb is offline
 

Senior Member
  
Join Date: Mar 2005
Location: Sydney Australia
Posts: 132
 

Default Re: Display HTML in Extra fields

I can't get this to work on 4.1.9. It just blanks out the contents of the fields. In "admin" is the wysiwyg on top of the box supposed to come up or do you need to write the html code in the small box?
__________________
"The more you know - the less you pay"

Various websites using

4.66 Pro & 5
Reply With Quote
  #25  
Old 09-09-2008, 11:38 AM
 
artuli artuli is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 32
 

Default Re: Display HTML in Extra fields

Can anyone figure out how to get this to work on 4.1+?

EDIT: Got it! You dont need ANY of this code editing at all. Thanks B00MER

Quote:
Originally Posted by B00MER
Use ' instead of " or \"


example: <img src='http://www.yourwebsite.com/image.jpg'>

__________________
Young Reinette: What do monsters have nightmares about?
The Doctor: Me!

X-Cart Gold 4.1.10
X-Cart Gold 4.2
Mac OS X 10.5.7
Reply With Quote
  #26  
Old 09-15-2008, 04:40 AM
  designtheweb's Avatar 
designtheweb designtheweb is offline
 

Senior Member
  
Join Date: Mar 2005
Location: Sydney Australia
Posts: 132
 

Default Re: Display HTML in Extra fields

Has anyone got this working in 4.1.9 Pro. I have followed all the instructions and it still is not showing up, would really appreciate some help here.
__________________
"The more you know - the less you pay"

Various websites using

4.66 Pro & 5
Reply With Quote
  #27  
Old 12-20-2009, 06:42 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Display HTML in Extra fields

Anyone for 4.1.9 and 4.1.11 !!!!!
__________________
4.6.1 Platinum


Reply With Quote
  #28  
Old 04-07-2010, 11:55 AM
 
jphillips jphillips is offline
 

Advanced Member
  
Join Date: Feb 2010
Posts: 33
 

Default Re: Display HTML in Extra fields

Go into your MySQL database and do the following:

Quote:
As of v 4.1.5 the field you want (to increase the extra field capacity) is in the 'xcart_extra_field_values' table and you'll want to change the 'value' fields datatype to text, blob, etc

Change the value "type" to something else. I used "text."

Under "/modules/Extra_Fields/product_modify.tpl"

Change:

Quote:
<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[efields][{$ef.fieldid}]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$ef.field}:</td>
<td class="ProductDetails"><input type="text" name="efields[{$ef.fieldid}]" size="24" value="{if $ef.is_value eq 'Y'}{$ef.field_value|escape:"html"}{else}{$ef.valu e|escape:"html"}{/if}" /></td>
</tr>

To the following:

Quote:
<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[efields][{$ef.fieldid}]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$ef.field}:</td>
<td class="ProductDetails"><textarea class="InputWidth InputWidth" rows="12" cols="45"name="efields[{$ef.fieldid}]" value="{$ef.field_value}" </textarea></td>
</tr>

This should provide a large text area to type things in under the product admin page for extra fields, as well as display the current values for those fields if there are any.

Your mileage may vary
__________________
4.3 Gold
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 07:32 PM.

   

 
X-Cart forums © 2001-2020