Announcement

Collapse
No announcement yet.

Inventory Kits - displaying a list of products in the kit and more questions

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

    Inventory Kits - displaying a list of products in the kit and more questions

    I've stepped through the only docs for the Inventory Kit Building. For the most part, the old instructions work. Maybe it's just how the kit builder works but I'm hoping I am missing something.

    The goal the storeowner wants to achieve is to pull from the existing inventory for the set (kit). The set has 5 products. To "bind" those 5 products together a new product was created but an attribute is needed to bundle them together. The docs use a radio button - does it have to be a radio button if this is the only version of the kit? When you go to the product, you are treated with the "Please select a valid combination of attributes." - how confusing - how do you get by that being displayed? You have to click the radio button to enable the add to cart. Once you get past all of that and add the item to your cart there is no list of what you are getting. How do you include a list of the items in the kit?

    Other suggestions are welcome.
    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
    In the example on https://docs.miva.com/reference-guid...ry-kit-builder the radio button is used to choose between two variants of the kit. If there is only one option for the kit you can utilize the Default Variant functionality.

    First create the product for the kit. Then under the Inventory Variants tab choose the three dots more menu next to the Edit Inventory button and choose Edit Default Variant. Once selected the Edit Variant modal will appear which you can choose the pricing method and which products you want to be included as a default variant. Once parts are added select save and now those products will have inventory removed (if tracking inventory) if the Product Kit is purchased. There is no need to add any attributes if the product kit does not need them.

    Including the list of products contained as a default variant can be done using template code. In the l.settings:basket:groups:parts array you can see all the information about the various parts that are assigned to the product in the loop.

    basket_parts.JPG

    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment


      #3
      OMG - that was so easy (at least the first part). No onward to the next part. Thanks Nick!
      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
        Originally posted by Nick View Post
        In the example on https://docs.miva.com/reference-guid...ry-kit-builder the radio button is used to choose between two variants of the kit. If there is only one option for the kit you can utilize the Default Variant functionality.

        First create the product for the kit. Then under the Inventory Variants tab choose the three dots more menu next to the Edit Inventory button and choose Edit Default Variant. Once selected the Edit Variant modal will appear which you can choose the pricing method and which products you want to be included as a default variant. Once parts are added select save and now those products will have inventory removed (if tracking inventory) if the Product Kit is purchased. There is no need to add any attributes if the product kit does not need them.

        Including the list of products contained as a default variant can be done using template code. In the l.settings:basket:groups:parts array you can see all the information about the various parts that are assigned to the product in the loop.

        basket_parts.JPG
        Question - should I be able to view these using the Token List with values? If so, they are blank.
        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


          #5
          Hi Leslie,

          Are you putting the parts within a foreach loop? I grabbed this from the Shipment Picklist. It displays parts.

          Code:
          <mvt:foreach iterator="part" array="item:parts">
          Part: &mvt:part:code;<br>
          &mvt:part:name;<br>
          &mvt:part:quantity;<br>
          &mvt:part:total_quantity;<br>
          </mvt:foreach>
          You'll probably need to change item:parts to minibasket:groups:parts or something or other.

          Hope this helps.

          Edit: Where Nick mentions l.settings:basket:groups:parts I think should be l.settings:minibasket:groups:parts
          Ron Frigon
          Jedi Webmaster Obi-Ron Kenobi

          Comment


            #6
            Originally posted by Ron Frigon View Post
            You'll probably need to change item:parts to minibasket:groups:parts or something or other.

            Hope this helps.

            Edit: Where Nick mentions l.settings:basket:groups:parts I think should be l.settings:minibasket:groups:parts
            For the tokenlist image that I showed the array is for the global_minibasket however the same values are available in the basket array. Also, both the groups and items array have parts values the only difference is that the group feature will group multiple items in the cart as a single line item when using buy x get 1 free promotions.

            Originally posted by lesliekirk View Post

            Question - should I be able to view these using the Token List with values? If so, they are blank.
            Those values will only be available in the global_minibasket array so if it is not assigned to the page it will not show any values. If you are in the basket array you should be able to create a foreach loop in the basket loop that will output the parts for each basket item:

            Code:
            <mvt:foreach iterator="group" array="basket:groups">
                <mvt:if expr="l.settings:group:part_count GE 1">
                    <mvt:foreach iterator="part" array="group:parts">
                        &mvt:part:active;
                        &mvt:part:agrpcount;
                        &mvt:part:cancat_id;
                        &mvt:part:catcount;
                        &mvt:part:code;
                        &mvt:part:cost;
                        &mvt:part:descrip;
                        &mvt:part:disp_order;
                        &mvt:part:dt_created;
                        &mvt:part:dt_updated;
                        &mvt:part:id;
                        &mvt:part:image;
                        &mvt:part:inv_active;
                        &mvt:part:name;
                        &mvt:part:original_active;
                        &mvt:part:page_id;
                        &mvt:part:page_title;
                        &mvt:part:pgrpcount;
                        &mvt:part:price;
                        &mvt:part:quantity;
                        &mvt:part:sku;
                        &mvt:part:taxable;
                        &mvt:part:thumbnail;
                        &mvt:part:total_quantity;
                        &mvt:part:weight;
                    </mvt:foreach>
                </mvt:if>
            </mvt:foreach>




            Nicholas Adkins
            Technical Training Specialist / Miva, Inc.
            [email protected]
            https://www.miva.com/mivalearn

            Comment


              #7
              Originally posted by Ron Frigon View Post
              Hi Leslie,

              Are you putting the parts within a foreach loop? I grabbed this from the Shipment Picklist. It displays parts.

              Code:
              <mvt:foreach iterator="part" array="item:parts">
              Part: &mvt:part:code;<br>
              &mvt:part:name;<br>
              &mvt:part:quantity;<br>
              &mvt:part:total_quantity;<br>
              </mvt:foreach>
              You'll probably need to change item:parts to minibasket:groups:parts or something or other.

              Hope this helps.

              Edit: Where Nick mentions l.settings:basket:groups:parts I think should be l.settings:minibasket:groups:parts
              Ron Frigon - I was just about to try that when I got pulled away. Thanks. And thanks Nick
              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
                In a nutshell, I'm using this on the BASK page in the Basket Contents

                Code:
                 <mvt:foreach iterator="group" array="basket:groups">
                ...
                
                <mvt:if expr="l.settings:group:part_count GE 1">
                <mvt:foreach iterator="part" array="group:parts">
                <div class="t-basket__product-sku">Includes: &mvt:part:name;</div>
                </mvt:foreach>
                </mvt:if>
                
                
                ...
                </mvt:foreach>
                I haven't tried adding anything to the mini-basket yet, perhaps that is why the token list shows a part count of 0.

                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


                  #9
                  lesliekirk what template are you running this code? The code that I posted requires the basket item to be assigned to the template.
                  Nicholas Adkins
                  Technical Training Specialist / Miva, Inc.
                  [email protected]
                  https://www.miva.com/mivalearn

                  Comment


                    #10
                    Originally posted by Nick View Post
                    lesliekirk what template are you running this code? The code that I posted requires the basket item to be assigned to the template.
                    Shadows ReadyTheme 10.05.00

                    basket ​​​​​​CSSUI Basket Contents is assigned.
                    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
                      lesliekirk can you send me the URL so I can take a look. You should be seeing those values if the product is set up to use the default variant correctly.
                      Nicholas Adkins
                      Technical Training Specialist / Miva, Inc.
                      [email protected]
                      https://www.miva.com/mivalearn

                      Comment


                        #12
                        Originally posted by Nick View Post
                        lesliekirk can you send me the URL so I can take a look. You should be seeing those values if the product is set up to use the default variant correctly.
                        Will do. I'm truly wondering if the product is configured correctly because the l.settings:group:part_count is reporting 0 (zero).
                        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
                          because the l.settings:group:part_count is reporting 0 (zero)
                          Your example shows that if statement outside the foreach loop. I believe that needs to be within the foreach loop or it would be null.
                          Ron Frigon
                          Jedi Webmaster Obi-Ron Kenobi

                          Comment


                            #14
                            Originally posted by Ron Frigon View Post

                            Your example shows that if statement outside the foreach loop. I believe that needs to be within the foreach loop or it would be null.
                            I have tried it without the if statement and it's still not displaying anything.
                            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
                              Looks like I have a nasty case of Firefox browser caching. Nick was able to see the list (thanks Nick) so I tried a different browser and boom there is was! Now to clear all the stuff out of Firefox so I can see it there too. Thanks too Ron Frigon !
                              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

                              Working...
                              X