No announcement yet.

Customer Custom Fields

  • Filter
  • Time
  • Show
Clear All
new posts

    Not trying to redirect the discussion, but it looks like a solution is presented.

    There is a school of thought that you shouldn't need to assign an item to a page if the component item is valid. IOW, especially for a Miva module, Customfields, adding the Read_Customer_ID should be all that was needed for the function to run.

    So, are there other systematic concerns with Component ITEMs?


    Need to offer Shipping Insurance?
    Interactive Design Solutions
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!


      Originally posted by Nick View Post
      Sorry all, I got a little ahead of myself and forgot to add some code:

      <mvt:do file="g.Module_Library_DB" name="l.loaded_module" value="Module_Load_Code_Cached( 'customfields', l.customfields_module )" />
      <mvt:if expr="l.loaded_module">
      <mvt:do file="g.Module_Root $ l.customfields_module:module" name="l.success" value="CustomerFieldValue_Load_CodeAndCustomer( '
      customer_customfield_code', l.settings:order:cust_id, l.customfield:field, l.customfield:value )" />
      <mvt:eval expr="decodeattribute(glosub(miva_array_serialize( l.customfield), ',', '<br>'))" />
      All that being said the most optimized way of getting the customer custom field would be to assign the custom field item to the page then run the Read_Customer_ID function:

      <mvt:item name="customfields" param="Read_Customer_ID( CUST_ID, 'custom_field_code', l.settings:customfields )" />
      More information can be found here:
      The custom field item has been assigned to this page all along. It was one of the first things I did.

      Please keep in mind, that I'm an integrator who takes the bits and pieces and then puts them together to make it work. I have looked at the docs numerous times over.

      Obviously, this didn't work for me:

      <mvt:item name="customfields" param="Read_Customer_ID( CUST_ID, 'test', l.settings:customfields )" />
      but the code you posted did spit out this:

      :field:info=Field for message
      :value:value=This is just a test.
      The last line, the "value" is what I need.

      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr