X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Display HTML in Extra fields (https://forum.x-cart.com/showthread.php?t=21979)

designtheweb 03-02-2008 02:37 AM

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.

designtheweb 03-02-2008 02:53 AM

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?

Plug 04-10-2008 03:40 AM

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?

designtheweb 06-08-2008 05:49 PM

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?

artuli 09-09-2008 11:38 AM

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'>

:)

designtheweb 09-15-2008 04:40 AM

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.

Learner 12-20-2009 06:42 AM

Re: Display HTML in Extra fields
 
Anyone for 4.1.9 and 4.1.11 !!!!!

jphillips 04-07-2010 11:55 AM

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 :-)


All times are GMT -8. The time now is 01:08 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.