Announcement

Collapse
No announcement yet.

custom customer field for sales rep and additional email

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

    custom customer field for sales rep and additional email

    I'm new to miva, trying to help someone witha miva store.

    He wants to keep track of the sales rep for a customer. The sales rep field should be in the email sent to the store for the sale. And, an email should be sent to the sales rep.

    I'm not sure the best place for the customer to indicate the sales rep. At customer set up seems logical. Although, if the sales reps will change frequently maybe somewhere in the shopping cart.

    From searching, it looks like miva won't do this out of the box, but perhaps a module from emporium plus can do this.

    Can someone tell me if that is the right direction to go? And if so, exactly which modules would I need?

    Thanks.

    #2
    Re: custom customer field for sales rep and additional email

    You can do this out of the box a few ways.

    The most common way I see it done (and how we do it in our store) is to use Product Attributes.

    You can also use Custom Fields.
    Thanks,

    Rick Wilson
    CEO
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: custom customer field for sales rep and additional email

      After watching the video about product attributes, I'm not sure I follow. My understanding is they allow you to set something at the product level. I need the ability for the customer to select his sales rep. There will not be a different rep for each product.

      You also mentioned custom fields. Are they per product, per customer, or something else?

      Comment


        #4
        Re: custom customer field for sales rep and additional email

        Take a look at the Miva Users Guide. http://www.mivamerchant.com/pdf/MivaPR8_10-30-13.pdf It's a great resource and might help explain some things.
        Keith Oratz
        PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
        www.preparesmart.com

        Comment


          #5
          Re: custom customer field for sales rep and additional email

          It seems like it would make the most sense to have the customer enter this information during checkout, perhaps on OCST, and use a Custom Order Field (the data will be saved to each individual Order itself). Note that the store will need to be on Production Release 8 Update 9 or newer.


          1) Click Utilities and verify that the Custom Fields tab exists at the top of this screen. If it doesn't then check the box next to it in the list and click Update. Click the Custom Fields tab.

          2) Click the New Field button in the top right, give it a Type of "Order Field", Code of "salesRep", Name of "Sales Rep" (or whatever you prefer), leave the rest default and click Add.

          3) Edit the OCST page in your admin and add this just above the continue button (or wherever else you prefer):
          Code:
          Sales Representative: <input type="text" name="salesRep" value="" />
          4) Add the following just above </form> on both the OSEL and OPAY pages:
          Code:
          <input type="hidden" name="salesRep" value="&mvt:global:salesRep;" />


          5) Edit the INVC page in your admin, assign the "customfields" item to it (Items tab), and add this to the top of the page code:
          Code:
          
          <mvt:item name="customfields" param="Write_Order(l.settings:order:id,'salesRep',g.salesRep)" />


          6) Edit the email template "Order Confirmation: Merchant" and add this where you'd like the sales rep to appear:
          Code:
          <mvt:if expr="g.salesRep">
            Sales Rep: &mvt:global:salesRep;<br />
          <mvt:else>
           <mvt:item name="customfields" param="Read_Order(l.settings:order:id,'salesRep',l.settings:salesRep)" />
           <mvt:if expr="l.settings:salesRep">
             Payment Type: &mvt:salesRep; <br />
           </mvt:if>
          </mvt:if>



          Last edited by KNewbrough; 02-05-14, 10:07 AM.
          Kyle Newbrough
          Technical Support / Web Developer
          Miva Merchant

          Comment


            #6
            Re: custom customer field for sales rep and additional email

            Kyle, I got this working throughout checkout for a "comments" field to attach to each order. It works all the way through INVC. However, I tried putting the same code I have on the INVC page on the ORDS page and it won't draw the comments into the ORDS page. Does something need to change for it to work on ORDS?
            Ted Hust
            AarcMediaGroup.com

            Celebrating 13 Years of Outstanding Service & Support
            Miva Merchant Design

            Comment


              #7
              Re: custom customer field for sales rep and additional email

              This should work:

              Code:
              <mvt:item name="customfields" param="Read_Order(l.settings:order:id,'comments',g.comments)" />
              
              Comments: &mvt:global:comments;
              Where 'comments' in the argument is your custom order field's code. Make sure the customfields item is assigned to the ORDS page as well.
              Kyle Newbrough
              Technical Support / Web Developer
              Miva Merchant

              Comment

              Working...
              X