Announcement

Collapse
No announcement yet.

Problem Displaying a Custom Customer Field in a Template Based Email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Bruce - PhosphorMedia View Post
    usually this is a 'race' condition.

    quick test: resend email from admin. if the info is there, its a race condition and you need to add "basketRead() = g.thisvalue" then orderWrite() = g;thisvalue and use OrderRead() in the emails. otherwise, beyond the usual suspects, i'd first debug the actual values


    <mvt:eval expr="file_create('/custom_debug.dat', 'script', l.setting(or g.)the_value_being_read_in_the_template)"/>
    I don't think the data is making it into the database. I should at least be able to see it in the Customer info, but it's not there. If it's not there then there is no sense in resending the email.
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

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

    Comment


      #17
      true...so where are you writing the custom customer data? that would appear to be where the problem is. (oh, and are we sure they are logged in?)
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #18
        Originally posted by lesliekirk View Post

        I don't think the data is making it into the database. I should at least be able to see it in the Customer info, but it's not there. If it's not there then there is no sense in resending the email.
        To answer your second question first - I am 100% sure they are not logged in because the ACAD page is where this data needs to be collected. This was a non-issue when using EmporiumPlus modules to collect and pass on the data.

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

        Email me: [email protected]
        www.lesliekirk.com

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

        Comment


          #19
          Originally posted by lesliekirk View Post

          To answer your second question first - I am 100% sure they are not logged in because the ACAD page is where this data needs to be collected. This was a non-issue when using EmporiumPlus modules to collect and pass on the data.
          Well then I think that is the issue because if they are not logged in, then there is no "customer id" for miva to use to assign the custom field to the customer. (That is, if you are really using custom CUSTOMER fields. Couldn't this be a custom ORDER field? (And I don't think there would be anyway Toolkit could have done it based on customer if they didn't have a customer id.)
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #20
            Originally posted by Bruce - PhosphorMedia View Post

            Well then I think that is the issue because if they are not logged in, then there is no "customer id" for miva to use to assign the custom field to the customer. (That is, if you are really using custom CUSTOMER fields. Couldn't this be a custom ORDER field? (And I don't think there would be anyway Toolkit could have done it based on customer if they didn't have a customer id.)
            So, Bill's module could send/include a custom customer field from the ACAD screen. It needs to be a custom customer field because it is part of the Customer account info.

            Bill had this brilliant module called Custom Customer Fields Interface that could easily do this. I would use it and his Mail Manager module but isn't the whole goal to move away from his no longer supported brilliance?
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

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

            Comment


              #21
              How could anything be associated with a miva 'customer' without a customer id? Even if you had say, a bill to email, it would be prone to errors cause customer's create multiple accounts.
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #22
                Originally posted by Bruce - PhosphorMedia View Post
                How could anything be associated with a miva 'customer' without a customer id? Even if you had say, a bill to email, it would be prone to errors cause customer's create multiple accounts.
                So are you saying that it IMPOSSIBLE to add Custom Customer Fields to the ACAD screen? Doesn't creating the customer account create the customer ID? You saying that none of this code will work with that form?

                Code:
                 <div class="form_row">
                <label class="required" for="customer_business_type">Business Type:</label>
                <select name="customer_business_type" id="Business_Type" class="input" required onchange="leaveChange()">
                <option value="">&lt;Select One&gt;</option>
                <mvt:if expr="g.customer_business_type EQ 'Restaurant'">
                <option value="Restaurant" selected>Restaurant</option>
                <mvt:else>
                <option value="Restaurant">Restaurant</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_type EQ 'Deli'">
                <option value="Deli" selected>Deli</option>
                <mvt:else>
                <option value="Deli">Deli</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_type EQ 'Supermarket'">
                <option value="Supermarket" selected>Supermarket</option>
                <mvt:else>
                <option value="Supermarket">Supermarket</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_type EQ 'Gift'">
                <option value="Gift" selected>Gift Store</option>
                <mvt:else>
                <option value="Gift">Gift Store</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_type EQ 'Mail'">
                <option value="Mail" selected>Mail Order</option>
                <mvt:else>
                <option value="Mail">Mail Order</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_type EQ 'Other'">
                <option value="Other" selected>Other</option>
                <mvt:else>
                <option value="Other">Other</option>
                </mvt:if>
                </select>
                </div>
                
                <mvt:if expr="g.customer_business_type EQ 'Other'">
                <mvt:assign name="l.settings:display_other_opt" value="''" />
                <mvt:else>
                <mvt:assign name="l.settings:display_other_opt" value="'hide'" />
                </mvt:if>
                
                <div class="form_row &mvt:display_other_opt;" id="customer_other_business_desc_field">
                <label class="required" for="customer_other_business_desc">Other:</label>
                <input type="text" name="customer_other_business_desc" id="customer_other_business_desc" value="&mvte:global:customer_other_business_desc;" class="textfield" />
                </div>
                
                <div class="form_row">
                <label class="required" for="customer_business_years">Years in business:</label>
                <select name="customer_business_years" id="Business_Type" class="input" required>
                <option value="">&lt;Select One&gt;</option>
                <mvt:if expr="g.customer_business_years EQ 'LessThan1'">
                <option value="LessThan1" selected>Less Than 1 Year</option>
                <mvt:else>
                <option value="LessThan1">Less Than 1 Year</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_years EQ '1-2'">
                <option value="1-2" selected>1-2</option>
                <mvt:else>
                <option value="1-2">1-2</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_years EQ '3-5'">
                <option value="3-5" selected>3-5</option>
                <mvt:else>
                <option value="3-5">3-5</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_years EQ '6-10'">
                <option value="6-10" selected>6-10</option>
                <mvt:else>
                <option value="6-10">6-10</option>
                </mvt:if>
                <mvt:if expr="g.customer_business_years EQ 'Over10'">
                <option value="Over10" selected>Over 10</option>
                <mvt:else>
                <option value="Over10">Over 10</option>
                </mvt:if>
                </select>
                </div>
                
                <div class="form_row">
                <label class="required" for="customer_state_tax_id">
                Tax ID #<br/>
                I certify that I am registered to collect sales tax in the 'Ship to' state.
                </label>
                <input type="text" name="customer_state_tax_id" id="customer_state_tax_id" value="&mvte:global:customer_state_tax_id;" class="textfield" required/>
                </div>
                
                <div class="form_row">
                <label class="required" for="customer_irish_food_check">Do you sell Irish / English Foods</label>
                <select name="customer_irish_food_check" id="customer_irish_food_check" class="input" required>
                <option value="">&lt;Select One&gt;</option>
                <mvt:if expr="g.customer_irish_food_check EQ 'Yes'">
                <option value="Yes" selected>Yes</option>
                <mvt:else>
                <option value="Yes">Yes</option>
                </mvt:if>
                <mvt:if expr="g.customer_irish_food_check EQ 'No'">
                <option value="No" selected>No</option>
                <mvt:else>
                <option value="No">No</option>
                </mvt:if>
                </select>
                </div>
                
                <div class="form_row">
                <label class="required" for="customer_business_desc">Brief Description of your business</label>
                <textarea name="customer_business_desc" id="customer_business_desc" class="textfield" rows="4" required>&mvte:global:customer_business_desc;</textarea>
                </div>
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

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

                Comment


                  #23
                  If you have custom customer info on ACAD (Add Customer) you Write that data on the ACED screen (or wherever the framework sends them too) that would work. I was going off reading your comment as "no one" was logged in when capturing that data.

                  So, to test, where you are writing the data, put the variable names from the fields you are using for the custom data into html comments (or just on the page if this is a dev site to be sure you are collecting the data). Might also be good to test the 'id' variable you are also using in the WriteCustomer() function.
                  Bruce Golub
                  Phosphor Media - "Your Success is our Business"

                  Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                  phosphormedia.com

                  Comment


                    #24
                    Originally posted by Bruce - PhosphorMedia View Post
                    If you have custom customer info on ACAD (Add Customer) you Write that data on the ACED screen (or wherever the framework sends them too) that would work. I was going off reading your comment as "no one" was logged in when capturing that data.

                    So, to test, where you are writing the data, put the variable names from the fields you are using for the custom data into html comments (or just on the page if this is a dev site to be sure you are collecting the data). Might also be good to test the 'id' variable you are also using in the WriteCustomer() function.
                    Can you provide a sample / example snippet of what you are saying here? I think I understand that you are saying the Custom Customer Field information should be passed on to the ACED screen at the same time it's passed on to the email template but I'm not following what you are suggesting be done. (Or I haven't had enough coffee).
                    Leslie Kirk
                    Miva Certified Developer
                    Miva Merchant Specialist since 1997
                    Previously of Webs Your Way
                    (aka Leslie Nord leslienord)

                    Email me: [email protected]
                    www.lesliekirk.com

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

                    Comment


                      #25
                      Can you post the whole form from ACAD and the code to capture on ACED?
                      Bruce Golub
                      Phosphor Media - "Your Success is our Business"

                      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                      phosphormedia.com

                      Comment


                        #26
                        Originally posted by Bruce - PhosphorMedia View Post
                        Can you post the whole form from ACAD and the code to capture on ACED?
                        I can, but I noticed when looking at the code this morning that the original developer had commented out most of the fields that would display the content. Then the question came up that the Custom Customer codes may have too many characters in them. After what happened this morning, I'm going to let this one mellow out a bit before I come back to it.
                        Leslie Kirk
                        Miva Certified Developer
                        Miva Merchant Specialist since 1997
                        Previously of Webs Your Way
                        (aka Leslie Nord leslienord)

                        Email me: [email protected]
                        www.lesliekirk.com

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

                        Comment


                          #27
                          FYI: Custom Custom field codes can be 50 characters long, Name, 100 characters long.
                          Bruce Golub
                          Phosphor Media - "Your Success is our Business"

                          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                          phosphormedia.com

                          Comment

                          Working...
                          X