View Single Post
  #5  
Old 05-30-2006, 02:02 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default Re: I can't get this mode to work...

Quote:
Originally Posted by Chris B
I keep getting the following error:

Quote:
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= 2' at line 1
SQL QUERY FAILURE: SELECT value FROM xcart_extra_field_values WHERE productid = AND fieldid= 2


I'm probably not doing something right in the display code. (I just arbitrarily used the number 2 as the field I wanted displayed.)


Code:
{assign var="shirtcolors" value=$products[product].productid|extrafield:2} {if $shirtcolors ne ""} Shirt Colors : {$shirtcolors} {/if}

Thanks,
Chris

Version 4.0.18

Is 2 the correct field number for the shirtcolors field?

Every field you create has it's own number starting with 1 being the first field that you created.

Go into your admin backend and open Products > Extra fields.
The field right at the top will be number 1 and then they go down in numerical order.

Really to make things easier there should be a field number display next to each field name - this is probably quite a simple mod if one of the experts fancies having a go at knocking it up
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote