Announcement

Collapse
No announcement yet.

Need to see if data is already in database

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

    Need to see if data is already in database

    Let me see if I can word this so it will make sense

    The store is using the EmporiumPlus Order Custom Fields to allow a customer to join an exchange program that has a one time fee. The fee is collected at checkout using the EP Order Custom Fields module. The module also inserts a field in the Customers section (which can also be included in the columns display to identify which customers are part of the program). The module adds a tab to the customer screen which enables the store owner to add the identifiable content that she wants for the customer. She uses the same word "EXCHANGE" for everyone in the program (but does add some additional information).

    How can I check to see if that word EXCHANGE is associated with a customer to be able to hide the Order Custom Field on the OSEL screen if the customer is already part of the program?

    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

    #2
    Easy to do with the standard custom fields...but otherwise??? Isn't there a way to read those fields based on 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


      #3
      Originally posted by Bruce - PhosphorMedia View Post
      Easy to do with the standard custom fields...but otherwise??? Isn't there a way to read those fields based on customer id.
      I don't know, is there? That's my question.
      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


        #4
        The module itself only stores data at the order level. You can lookup order custom field using this code:


        Code:
        <mvt:item name="ordercfm" param="get|l.all_settings:order:id|OrderCFM1" />
        <mvt:if expr="NOT ISNULL l.settings:OrderCFM:value">
        <br>&mvt:OrderCFM:name; &mvte:OrderCFM:value;
        </mvt:if>
        What do you mean by the data was inserted into the customer section? As a custom customer field? If so you can use the built in custom customer fields functions to read the data.
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Originally posted by Brennan View Post
          The module itself only stores data at the order level. You can lookup order custom field using this code:


          Code:
          <mvt:item name="ordercfm" param="get|l.all_settings:order:id|OrderCFM1" />
          <mvt:if expr="NOT ISNULL l.settings:OrderCFM:value">
          <br>&mvt:OrderCFM:name; &mvte:OrderCFM:value;
          </mvt:if>
          What do you mean by the data was inserted into the customer section? As a custom customer field? If so you can use the built in custom customer fields functions to read the data.


          Can the built-in custom customer fields charge (collect) an amount (fee)? This item is used to collect a fee, but once that fee is collected for that customer, the store owner goes into the admin and puts a note in the EP Order Custom Field. That note begins with EXCHANGE for every entry. What I'd like to be able to do is see in that field has the entry that starts EXCHANGE when a customer is logged in. If the field has an entry do not display the particular CFM. The reason being is that everytime a customer check the box at checkout, they are charged the fee again, even though they have already paid the one-time fee. The store owner then has to go back in and refund the fee that was collected.
          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


            #6
            if you've already loaded the string, just compare first 8 chars against 'exchange'
            Code:
            <mvt:assign name="g.myvar" value="'Exchange' $ 'AND-some additional info'" />
            <mvt:if expr="TOUPPER(SUBSTRING(g.myvar,1,8)) EQ 'EXCHANGE'">
            ...
            </mvt:if>

            Comment

            Working...
            X