Pull Out Specific Quantity Price in EP's Volume Discount

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wcw
    Developer Partner

    • Mar 2006
    • 11329

    #16
    Re: Pull Out Specific Quantity Price in EP's Volume Discount

    The variable is l.all_settings:volume:price You removed the word all_ in this latest try. You also are using volume2:price which is not a valid variable. the variable is volume:price.
    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

    • amecca
      Mivite

      • Oct 2007
      • 106

      #17
      Re: Pull Out Specific Quantity Price in EP's Volume Discount

      Here is the latest...still $0.00. How does vassign differentiate between pos1 and pos2?

      <mvt:item name="cim_vol" param="tablearray" />
      <mvt:if expr="l.settings:volprice_rows GT 0">
      <mvt:foreach iterator="volume" array="volprice">
      <mvt:if expr="pos1 EQ 2">
      &mvt:volume:price;
      <mvt:item name="toolkit" param="vassign|qnty1|l.all_settings:volume:price" />
      </mvt:if>
      </mvt:foreach>
      </mvt:if>
      +
      <mvt:item name="cim_vol" param="tablearray" />
      <mvt:if expr="l.settings:volprice_rows GT 0">
      <mvt:foreach iterator="volume" array="volprice">
      <mvt:if expr="pos1 EQ 1">
      &mvt:volume:price;
      <mvt:item name="toolkit" param="vassign|qnty2|l.all_settings:volume:price" />
      </mvt:if>
      </mvt:foreach>
      </mvt:if>
      <mvt:item name="toolkit" param="math_add|add|qnty1|qnty2" />
      <mvt:item name="toolkit" param="currencyformat|formatted_volume|add" />
      =
      &mvte:global:formatted_volume;
      </H3>
      Alan Mecca
      President
      8:30-5:00 M-Th, 8:30-4:30 F
      T: 800-899-0620
      E: [email protected]
      www.personalizeddoormats.com

      Comment

      • wcw
        Developer Partner

        • Mar 2006
        • 11329

        #18
        Re: Pull Out Specific Quantity Price in EP's Volume Discount

        As I said before pos2 is for the CTGY, SRCH pages. pos1 is for the PROD page. Is the &mvt:volume:price; displaying the price?
        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

        • amecca
          Mivite

          • Oct 2007
          • 106

          #19
          Re: Pull Out Specific Quantity Price in EP's Volume Discount

          My bad. I am using pos1 in both I meant EQ 1 and EQ 2. And yes it is displaying the price just not the added amounts. You can see it here:

          Last edited by amecca; 04-10-12, 11:49 AM.
          Alan Mecca
          President
          8:30-5:00 M-Th, 8:30-4:30 F
          T: 800-899-0620
          E: [email protected]
          www.personalizeddoormats.com

          Comment

          • wcw
            Developer Partner

            • Mar 2006
            • 11329

            #20
            Re: Pull Out Specific Quantity Price in EP's Volume Discount

            You need to learn how to debug each line of code. For example on the line immediately after
            <mvt:item name="toolkit" param="vassign|qnty1|l.all_settings:volume:price" />
            put
            Debug: &mvte:global:qnty1;

            By doing this you can see exactly where your logic is failing. You won't need to spend hours on the forum, you simply trace down the specific variable that is not getting created and fix it.
            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

            • amecca
              Mivite

              • Oct 2007
              • 106

              #21
              Re: Pull Out Specific Quantity Price in EP's Volume Discount

              The problem I am having is that it is creating the variables. The numbers are being outputed correctly. You can go back to this page:



              and see the debug. So I think the problem is in the math_add line of code. I changed the variable to "sum" thinking maybe "add" was incorrect for some reason.

              <mvt:item name="toolkit" param="math_add|sum|qnty1|qnty2" />
              <mvt:item name="toolkit" param="currencyformat|formatted_volume|sum" />
              =
              &mvt:global:formatted_volume;

              I did notice that I didn't have to pull the "$" from the volume table. So is the math_add reading the field as text instead of a number? Just a thought
              Alan Mecca
              President
              8:30-5:00 M-Th, 8:30-4:30 F
              T: 800-899-0620
              E: [email protected]
              www.personalizeddoormats.com

              Comment

              • wcw
                Developer Partner

                • Mar 2006
                • 11329

                #22
                Re: Pull Out Specific Quantity Price in EP's Volume Discount

                That would be it. If there is a $ in there automatically, it thinks that is a text string. You should be able to use the vglosub function to strip the $.
                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

                • amecca
                  Mivite

                  • Oct 2007
                  • 106

                  #23
                  Re: Pull Out Specific Quantity Price in EP's Volume Discount

                  It worked. Thanks for all your help. In case anyone else is trying this here is the code that did it. Thanks for all your help.

                  <mvt:item name="cim_vol" param="tablearray" />
                  <mvt:if expr="l.settings:volprice_rows GT 0">
                  <mvt:foreach iterator="volume" array="volprice">
                  <mvt:if expr="pos1 EQ 2">
                  <mvt:item name="toolkit" param="vassign|qnty1|l.all_settings:volume:price" />
                  <mvt:item name="toolkit" param="vglosub|qnty1,$," />
                  <mvt:item name="toolkit" param="math_add|sum|qnty1|qnty1" />
                  </mvt:if>
                  </mvt:foreach>
                  </mvt:if>
                  <mvt:item name="cim_vol" param="tablearray" />
                  <mvt:if expr="l.settings:volprice_rows GT 0">
                  <mvt:foreach iterator="volume" array="volprice">
                  <mvt:if expr="pos1 EQ 1">
                  <mvt:item name="toolkit" param="vassign|qnty2|l.all_settings:volume:price" />
                  <mvt:item name="toolkit" param="vglosub|qnty2,$," />
                  </mvt:if>
                  </mvt:foreach>
                  </mvt:if>
                  <mvt:item name="toolkit" param="math_subtract|difference|sum|qnty2" />
                  <mvt:item name="toolkit" param="currencyformat|formatted_volume|difference" />
                  Ordering only 1 mat? <br>
                  Order 2 for only &mvt:global:formatted_volume; more.
                  Alan Mecca
                  President
                  8:30-5:00 M-Th, 8:30-4:30 F
                  T: 800-899-0620
                  E: [email protected]
                  www.personalizeddoormats.com

                  Comment

                  Working...
                  X