Announcement

Collapse
No announcement yet.

Miva 10.03

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

    #16
    Hi Jim,

    Try creating an item with:
    • Code: runtimejs
    • Module: cmp-mv-runtimejs
    Matt Zimmermann

    Holistic Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    https://www.dev4web.net | Twitter

    Comment


      #17
      Originally posted by Kent Multer View Post
      I looked at that page, and some of the pages that it links to. I found a few mentions of viewing and updating the selected payment method, but no details on how to actually do it. Sorry if I'm missing something ...

      Thanks --
      I don't do this stuff, but I didn't understand it either. The previous, highlighted "Before" and "After" method made a lot more sense to me.

      BTW Kent, I sent you an email last week.

      Comment


        #18
        Originally posted by Matt Zimmermann View Post
        Hi Jim,

        Try creating an item with:
        • Code: runtimejs
        • Module: cmp-mv-runtimejs
        Hi Matt, thank you, it does now seem to work. There is a quirk though. The edit button is shown for every product, whether or not the product has attributes. While the edit button is displayed, it does nothing if the product does not have attributes. However if there is a product in the cart that does have attributes and a product that does not have attributes the edit button will work for both products.
        Highly caffeinated
        http://www.coffeehouseexpress.com

        Comment


          #19
          Originally posted by TheTeaTable View Post
          BTW Kent, I sent you an email last week.
          Hi John, I was out of town for a few days. I'll be replying to you shortly.

          Kent Multer
          Magic Metal Productions
          http://TheMagicM.com
          * Web developer/designer
          * E-commerce and Miva
          * Author, The Official Miva Web Scripting Book -- available on-line:
          http://www.amazon.com/exec/obidos/IS...icmetalproducA

          Comment


            #20
            Originally posted by Brennan View Post
            I'll add the links to that page but here is the new function:

            https://docs.miva.com/json-api/funct...ethodlist_load
            Thanks, Brennan. That function does the "view," but not the "update" part. Is there another function for that?

            No hurry; I don't have an immediate need for this functionality. Being a writer as well as a programmer, I tend to notice these things; and I figured I should bring it to someone's attention.

            Thanks --
            Kent Multer
            Magic Metal Productions
            http://TheMagicM.com
            * Web developer/designer
            * E-commerce and Miva
            * Author, The Official Miva Web Scripting Book -- available on-line:
            http://www.amazon.com/exec/obidos/IS...icmetalproducA

            Comment


              #21
              Originally posted by Jim Cockerham View Post

              Hi Matt, thank you, it does now seem to work. There is a quirk though. The edit button is shown for every product, whether or not the product has attributes. While the edit button is displayed, it does nothing if the product does not have attributes. However if there is a product in the cart that does have attributes and a product that does not have attributes the edit button will work for both products.
              Hi Jim,

              Under User Interface -> Templates -> Pages -> BASK -> Basket Contents, insert
              Code:
              <mvt:assign name="l.settings:has_attributes" value="0" />
              right below
              Code:
              <mvt:assign name="g.basket_subtotal" value="0" />
              That should do the trick.
              Matt Zimmermann

              Holistic Web Developer
              Alchemy Web Development
              https://www.alchemywebdev.com
              Site Development - Maintenance - Consultation

              https://www.dev4web.net | Twitter

              Comment


                #22
                Originally posted by Matt Zimmermann View Post

                Hi Jim,

                Under User Interface -> Templates -> Pages -> BASK -> Basket Contents, insert
                Code:
                <mvt:assign name="l.settings:has_attributes" value="0" />
                right below
                Code:
                <mvt:assign name="g.basket_subtotal" value="0" />
                That should do the trick.
                Hi Matt, Were close. Now the Edit button is gone on products without attributes. Products with subscriptions still get the edit button, but it doesn't do anything, unless a different product with an attribute is also in the Basket.
                Highly caffeinated
                http://www.coffeehouseexpress.com

                Comment


                  #23
                  Hi Jim,

                  Under User Interface -> Templates -> Pages -> BASK -> Contents, replace the MVT:IF statement with this:
                  Code:
                  <mvt:if expr="l.settings:group:product:productsubscriptionsettings:enabled OR miva_array_elements(l.settings:has_attributes) GT 0">
                  Matt Zimmermann

                  Holistic Web Developer
                  Alchemy Web Development
                  https://www.alchemywebdev.com
                  Site Development - Maintenance - Consultation

                  https://www.dev4web.net | Twitter

                  Comment


                    #24
                    Kent Multer The function to apply shipping, payment or calculate tax to an order it this one:

                    https://docs.miva.com/json-api/funct...lculatecharges

                    In most cases, you're going to be calling it from a Miva page. In that case you use the helper function we provide in Runtime.js here:

                    Code:
                    Runction Runtime_CalculateCharges( shipping_method, payment_method, callback, delegator )
                    {
                    return AJAX_Call_JSON( callback, 'runtime', 'Runtime_CalculateCharges',
                    {
                    ShippingMethod: shipping_method,
                    PaymentMethod: payment_method
                    }, delegator );
                    }
                    https://docs.miva.com/miva10/referen...mejs-reference

                    Here is an example of its usage:

                    Code:
                    Runtime_CalculateCharges('flatrate:overnight', 'check:check',
                    function(response) {
                    //update basket contents on page to reflect changes
                    });
                    Tax is always re-calculated anytime this function runs.
                    Brennan Heyde
                    VP Product
                    Miva, Inc.
                    [email protected]
                    https://www.miva.com

                    Comment


                      #25
                      Originally posted by Matt Zimmermann View Post
                      Hi Jim,

                      Under User Interface -> Templates -> Pages -> BASK -> Contents, replace the MVT:IF statement with this:
                      Code:
                      <mvt:if expr="l.settings:group:product:productsubscriptionsettings:enabled OR miva_array_elements(l.settings:has_attributes) GT 0">
                      Hi Matt, thank you for all of your help with this. Now it's a little unpredictable. If I add a product with an attribute to the Basket first and then add a product without an attribute to the Basket, both will have the Edit link, but if I add the product without an attribute to the Basket first it will not have the Edit link.
                      Highly caffeinated
                      http://www.coffeehouseexpress.com

                      Comment


                        #26
                        Hi Jim,

                        I am working through a potential fix for that and will have more details a little later today.
                        Matt Zimmermann

                        Holistic Web Developer
                        Alchemy Web Development
                        https://www.alchemywebdev.com
                        Site Development - Maintenance - Consultation

                        https://www.dev4web.net | Twitter

                        Comment


                          #27
                          Originally posted by Jim Cockerham View Post
                          Is the the new feature "Edit Product Attributes on the Basket Page" working for most of you? I followed the instruction here: https://github.com/mivaecommerce/rea...ows/issues/127 . I am only using single attributes for my products and I am seeing the "Edit" button on the BASK page , but it does nothing. Does it only work if you have multiple attributes? I have gone over the instructions twice and it all looks good.
                          Hi Jim,

                          I have updated the instructions. There are three areas that need to be updated, edit-basket-attributes.js, Basket -> Basket Contents, and Basket -> Content.
                          Matt Zimmermann

                          Holistic Web Developer
                          Alchemy Web Development
                          https://www.alchemywebdev.com
                          Site Development - Maintenance - Consultation

                          https://www.dev4web.net | Twitter

                          Comment


                            #28
                            Originally posted by Matt Zimmermann View Post

                            Hi Jim,

                            I have updated the instructions. There are three areas that need to be updated, edit-basket-attributes.js, Basket -> Basket Contents, and Basket -> Content.
                            Hi Matt, As far as I can tell that seems to fix everything :) Thanks so much for your help!
                            Highly caffeinated
                            http://www.coffeehouseexpress.com

                            Comment

                            Working...
                            X