Grant
Not seeing anything in admin. here is code i have input:
Quote:
modifier.extrafield.php
<?php
if (!defined('XCART_START')) { header("Location: ../../../"); die("Access denied"); }
function smarty_modifier_extrafield($value, $mode) {
global $config, $sql_tbl;
$return = func_query_first_cell("SELECT value FROM ".$sql_tbl["extra_field_values"]." WHERE productid = $value AND fieldid= $mode");
if ($return)
return $return;
else
return "";
}
?>
|
Quote:
products.tpl
{$products[product].descr|truncate:300:"...":true}
{assign var="name" value=$products[product].productid|extrafield:5} {if $name ne ""}
name: {$name} {/if}
|
Quote:
products_t.tpl
{assign var="name" value=$products[product].productid|extrafield:5} {if $name ne ""}
name: {$name} {/if}
|
Quote:
product_modify.tpl
{if $extra_fields[field].field eq "name"}
<TEXTAREA name="efields[{$extra_fields[field].fieldid}]" rows="10" cols="45">{if $extra_fields[field].is_value eq 'Y'}{$extra_fields[field].field_value|escape: "html"}{else}{$extra_fields[field].value|escape:"html"}{/if}</TEXTAREA>
{else}
<INPUT type="text" name="efields[{$extra_fields[field].fieldid}]" size="24" value="{if $extra_fields[field].is_value eq 'Y'}{$extra_fields[field].field_value|escape: "html"}{else}{$extra_fields[field].value|escape:"html"}{/if}">
{/if}
|
Obviously coded wrong somewhere as it isn't showing frontend or adminend. but cannot see it. BTW name is the vaiable in extrafield and 5 is the number. Thanks