Originally posted by lesliekirk
View Post
Announcement
Collapse
No announcement yet.
Customer Custom Fields
Collapse
X
-
Can you show me what you added? Are you sure the variables customer ID and custom field are correct?
-
It didn't seem to pull anything in.Originally posted by Nick View PostYou could add this to the Printable Invoice template:
This will pull the value for the customer custom field and output if it is available.Code:<mvt:do file="l.customfields_module:module" name="l.success" value="CustomerFieldValue_Load_CodeAndCustomer( 'customer_customfield_code', l.settings:order:cust_id, l.settings:customer_customfield_code:field, l.settings:customer_customfield_code:value )" /> <mvt:if expr="l.settings:customer_customfield_code:value"> &mvt:customer_customfield_code:value; </mvt:if>
Let me know if you have trouble implementing.
Leave a comment:
-
well, that makes some sense. and as much as i try to keep my own code 'syntax' orthogonal, i have many a 'bad' moment.
Leave a comment:
-
Bruce - PhosphorMedia I do not think there is a specific reason but if I were to guess it would be because of the name of the function: CustomerFieldValue_Load_CodeAndCustomer
Code comes first in the order of the name.
Leave a comment:
-
totally apropos of nothing, and this may be totally outside your realm, but why is the primary key 'l.settings:order:cust_id' not first? (otherwise, cool API call to know about).
Leave a comment:
-
Kent Multer No the only caveat with using the item tag is that you need to assign the item to the template. I was just being lazy and did not want to explain assigning the item to the template.
- 1 like
Leave a comment:
-
Hi Nick,
Is there some reason why the usual mvt:item tag won't work on this template? E.g.Code:<mvt:item name="customfields" param="Read_Customer_ID( g.Customer:id, 'custom_field_code', l.settings:MyDestination )" />
Leave a comment:
-
You could add this to the Printable Invoice template:
This will pull the value for the customer custom field and output if it is available.Code:<mvt:do file="l.customfields_module:module" name="l.success" value="CustomerFieldValue_Load_CodeAndCustomer( 'customer_customfield_code', l.settings:order:cust_id, l.settings:customer_customfield_code:field, l.settings:customer_customfield_code:value )" /> <mvt:if expr="l.settings:customer_customfield_code:value"> &mvt:customer_customfield_code:value; </mvt:if>
Let me know if you have trouble implementing.
Leave a comment:
-
Customer Custom Fields
My custom field condition foo is weak. I would like to be able to check to see if any customer might have a Customer Custom Field and then if it does be able to display the content of that field in the Printable Invoice used in the batch reports.
I'm trying to display a message for someone processing the order that a customer may have specific needs such as drop shipping, special labels, etc. This would be a constant that the customer should not have to enter in the Order Information type custom field. It would not be part of the checkout process but retained in the Customer Information.Tags: None
Leave a comment: