Announcement

Collapse
No announcement yet.

EmporiumPlus Addendum g.addendumproductsok

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

    EmporiumPlus Addendum g.addendumproductsok

    I'm trying to figure out what this little diddy was used for

    Code:
    <mvt:if expr="g.addendumproductsok">
    I thought it might have been used to conditionally display one of the addendum questions based on if product codes had been entered into the "Display ONLY with these Product Codes" field. At some point in time, I think this conditional stopped working but I'm not sure because and another point in time the store owner didn't need the addendum question that it was set up for and the coding was removed.

    Now the store owner needs to trigger an addendum question for a number of products if they are ordered. And not display that question it they are not. I could go the route of creating a custom field and I most likely will have to but before I do, has anyone seen this expression in use?

    Thanks,
    Leslie
    Last edited by lesliekirk; 02-05-15, 01:58 PM.
    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
    Re: EmporiumPlus Addendum g.addendumproductsok

    If one or more of the products in that "display only" are in the basket that variable will be set to 1 (ie true). It is not needed to hide the questions. It is just an extra variable set so you can use it for other purposes besides hiding or showing the questions.
    Last edited by lesliekirk; 02-05-15, 01:58 PM.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: EmporiumPlus Addendum g.addendumproductsok

      Ahhh, so for example - I have 3 questions. I need to display 2 of them for every order, but the third question is only to be displayed in one of the "display only" products has been added to the basket - displaying a total of 3 questions at checkout.

      Would something like this work

      Code:
      <mvt:if expr="g.AddendumErrorMessage"><font color="red">
      <b>Required</b>
      </font><br />
      </mvt:if>
      <mvt:if expr="g.addendumproductsok">
      
      
      <!-- SET ONE -->
      <div id="1stset"><input type="checkbox" name="question1" value="Yes" /><p>I understand that all Sale/Discounted Items are final sale.</p></div>
      <div id="2ndset"><input type="checkbox" name="question2" value="Yes" />
      <p>Please click here to confirm you have read <a href="http://www.domain
      
      .com/policies.html" target="_blank">our policies regarding online orders, returns etc.</a></p>
      </div>
      
      
      
      
       <div id="3ndset">
              <input type="checkbox" name="question3" value="Yes" />
              <p>Do Not Require A Signature.</p>
          </div>
          
          
          <input type="hidden" name="AddendumRequired" value="1|2|">
          <input type="hidden" name="maxquestions" value="3" />
      
      
      <mvt:else>
      
      
      <!-- SET TWO -->
      <div id="2ndset"><input type="checkbox" name="question2" value="Yes" /><p>Please click here to confirm you have read <a href="http://www.domain.com/policies.html" target="_blank">our policies regarding online orders, returns etc.</a></p></div>
       <div id="3ndset">
              <input type="checkbox" name="question3" value="Yes" />
              <p>Do Not Require A Signature.</p>
          </div>
      
      
      <input type="hidden" name="AddendumRequired" value="2|">
      <input type="hidden" name="maxquestions" value="2" />
      </mvt:if>
      Last edited by lesliekirk; 02-05-15, 02:01 PM.
      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
        Re: EmporiumPlus Addendum g.addendumproductsok

        Maxquestions should be 3 since both conditions have a question3.
        Last edited by lesliekirk; 02-05-15, 02:01 PM.
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment


          #5
          Re: EmporiumPlus Coupon Redemption g.addendumproductsok

          That makes sense, but why would "SET ONE" not display even when the product in the Display ONLY is in the BASK? The only one that will display is the "SET TWO" - the one with Maxquestions of 2.

          I can't get "SET ONE" to display
          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
            Re: EmporiumPlus Coupon Redemption g.addendumproductsok

            If the product is not in the basket, none of the questions should display. Are you putting the addendum token on the page and is addendum assigned to the items list of the page?
            Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
            Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
            Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
            Facebook http://www.facebook.com/EmporiumPlus
            Twitter http://twitter.com/emporiumplus

            Comment


              #7
              Re: EmporiumPlus Addendum g.addendumproductsok

              Product is in the basket. The Addendum token is not on the page the code I showed above is and the addendum is assigned to the items list. Only the mvt:else portion of the conditional is displaying on the page even if one of the products that is in the "display only" section of the Addendum admin is in the basket.

              It's like the g.addendumproductsok (display only) token is being ignored and only the second half of the conditional works.
              Last edited by lesliekirk; 02-05-15, 02:02 PM.
              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


                #8
                Re: EmporiumPlus Addedum g.addendumproductsok

                g.addendumproductsok is not a token. It is a variable. That variable is not created unless you have the addendum token on the page. So without the token, the variable will always be false.
                Last edited by lesliekirk; 02-05-15, 02:02 PM.
                Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                Facebook http://www.facebook.com/EmporiumPlus
                Twitter http://twitter.com/emporiumplus

                Comment


                  #9
                  Re: EmporiumPlus Addendum g.addendumproductsok

                  So the ah-ha moment has arrived. There are a couple of things going on. The site uses Miva's One Page Checkout configuration. There was no token on the page, which made sense at the time because the addendum questions had been coded on to the page. The questions were displaying as expected until the store wanted to revert back to the third question being conditionally displayed. When I added the token to the page, it produced a double display of all 3 questions. So I hid the token and also made sure it was the one that matched the setting in the Addendum module admin. The questions do now seem to be appearing as needed.

                  Thank you Bill! I miss you!!!
                  Leslie
                  Last edited by lesliekirk; 02-05-15, 02:03 PM.
                  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


                    #10
                    Re: EmporiumPlus Addendum g.addendumproductsok

                    I need to follow up on this and probably open a support ticket. Now that the conditional is working the Addendum Modified Email Merchant Notification is doing something very odd. It enumerates the first three responses followed by 97 additional blank responses:

                    1. YES I understand that sales on all Sale items are final

                    2. Yes,YES I have read and agree to the online return and exchange policies

                    3. YES I Waive a Signature Requirement

                    4.

                    5.

                    6.

                    7.

                    8.

                    9.

                    10.

                    11.

                    12.

                    ect. all the way to 100.
                    I'm wondering is there is some sort of loop being cause by having both the hidden <mvt:item name="addendum" param="ocst" /> token and the conditional on the page are causing issues.
                    Last edited by lesliekirk; 02-05-15, 02:04 PM.
                    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


                      #11
                      Re: EmporiumPlus Addendum g.addendumproductsok

                      Make sure the maxquestions input is not removed. It should be part of the form.
                      Last edited by wcw; 02-05-15, 05:32 PM.
                      Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                      Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                      Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                      Facebook http://www.facebook.com/EmporiumPlus
                      Twitter http://twitter.com/emporiumplus

                      Comment


                        #12
                        Re: EmporiumPlus Addendum g.addendumproductsok

                        Yes, that maxquestions is part of the form
                        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


                          #13
                          Re: EmporiumPlus Addendum g.addendumproductsok

                          What is the value of maxquestions? There is code that if the value is higher than 100, cap it at 100.
                          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                          Facebook http://www.facebook.com/EmporiumPlus
                          Twitter http://twitter.com/emporiumplus

                          Comment


                            #14
                            Re: EmporiumPlus Addendum g.addendumproductsok

                            Originally posted by wcw View Post
                            What is the value of maxquestions? There is code that if the value is higher than 100, cap it at 100.
                            The maxquestions value is 3
                            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


                              #15
                              Re: EmporiumPlus Addendum g.addendumproductsok

                              Apparently it is not by the time it gets to that email in the processing. Don't use that old email. Rather use the template emails. Test to see if maxquestions already has a value. It it does, simply display the responses, eg &mvte:global:question1; etc. If it does not, then use the token to retrieve the responses.
                              Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                              Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                              Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                              Facebook http://www.facebook.com/EmporiumPlus
                              Twitter http://twitter.com/emporiumplus

                              Comment

                              Working...
                              X