Announcement

Collapse
No announcement yet.

Volume Pricing

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

    #16
    Re: Volume Pricing

    Originally posted by Brennan View Post
    on CTGY you should see a tab section with a template controlling the volume Pricing table. You can clear out its contents and add the first example code:

    Code:
        <mvt:assign name="g.as_low_as" value="l.settings:volprice:table[ miva_array_elements(l.settings:volprice:table) ]:formatted_price" />
        As Low As: &mvte:global:as_low_as;

    This code totally breaks the page. Not fatal but it does not resolve below the content area. No global footer.

    Comment


      #17
      Re: Volume Pricing

      Sorry my bad I just realized that this is for the CTGY page. I installed it there and get this:

      Runtime error in mm5/5.00/templates/s01/ctgy-volprice.mvc @ [00000002:00000038]: modules/discount/volume.mv: Line 1: (in expression): Array index must be positive integer

      Comment


        #18
        Re: Volume Pricing

        Yes that syntax is incorrect. Use this code instead:

        Code:
        <mvt:assign name="g.lowest" value="miva_array_pop(l.settings:volprice:table)" /> 
        <mvt:if expr="NOT ISNULL g.lowest:formatted_price">
        	As Low As: &mvte:global:lowest:formatted_price;
        </mvt:if>
        @habreu
        That code looks correct, it would print the volume pricing then the as low as. If you don't want the volume pricing table, you can delete the template provided on the CTGY page for it.
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #19
          Re: Volume Pricing

          That works great. Just to make some things clear for future ref.

          This goes in the VP table template:

          <mvt:assign name="g.lowest" value="miva_array_pop(l.settings:volprice:table)" />
          <mvt:if expr="NOT ISNULL g.lowest:formatted_price">
          <p>As Low As: &mvte:global:lowest:formatted_price;</p>
          </mvt:if>


          And this goes in the list layout template: <mvt:item name="volprice" param="product:id" />

          Make sure the item is assigned.

          Thank You for the help!

          Comment


            #20
            Re: Volume Pricing

            Another discovery. You can do this on the PROD page.

            Add an new item using the discount_volume module and code it volpriceas. Assign it to PROD. You will then get second Volume Pricing Table field. Populate it with:

            <mvt:assign name="g.lowest" value="miva_array_pop(l.settings:volpriceas:table) " />
            <mvt:if expr="NOT ISNULL g.lowest:formatted_price">
            <p>Volume Price As Low As: &mvte:global:lowest:formatted_price;</p>
            </mvt:if>

            Then simply add this <mvt:item name="volpriceas" param="product:id" /> to your Display Template and now you can display both the table with <mvt:item name="volprice" param="product:id" /> and also have the as low as.

            mivaman

            Comment


              #21
              Re: Volume Pricing

              Thank you both! I see the issue. I have two Volume Pricing Tables in admin for CTGY. I guess one might be from the old Emporium Plus module.

              Comment

              Working...
              X