Announcement

Collapse
No announcement yet.

basket quantity?

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

    basket quantity?

    Sorry for the newbie question, but I'm having trouble finding this.

    I'd like to output the total contents of ALL the items in a basket.

    Is there a single variable that will show this?

    I have tried these without any luck:

    &mvt:global_minibasket:basket_count;
    &mvt:global_minibasket:items;

    I've also tried to find documentation which describes all the public variables and exactly what it is and struck out there. Is something available for this too?

    #2
    Re: basket quantity?

    If your trying to do this on the basket page the variable is:

    &mvt:basket:formatted_total;

    If you want it on pages other than basket (say globally) then you'll need to use the global mini basket variables:

    &mvt:global_minibasket:formatted_total;

    You can use this on any page the mini-basket is assigned.

    There is a built in tool called token list which will show you which variables are available on which pages:

    http://www.miva.com/videos/web_devel...enlist-feature
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: basket quantity?

      Thanks Brennan! Is there any way for me to use this (or something similar) on the INVC page? I'm trying to show the total number of items that were included with an order but it's not showing anything. I'm not sure if it's because the basket is already emptied at this point.

      Comment


        #4
        Re: basket quantity?

        On INVC the basket has already been converted to an order so the variable changes:

        &mvte:order:formatted_total;

        You can also use token list to view the INVC page. Go to Pages, INVC, then open token list and click View All Tokens. This will load INVC so you can see how the page looks and the available tokens.

        http://www.miva.com/videos/web_devel...the-token-list
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: basket quantity?

          Originally posted by benjamintr View Post
          Sorry for the newbie question, but I'm having trouble finding this.

          I'd like to output the total contents of ALL the items in a basket.

          Is there a single variable that will show this?

          I have tried these without any luck:

          &mvt:global_minibasket:basket_count;
          &mvt:global_minibasket:items;

          I've also tried to find documentation which describes all the public variables and exactly what it is and struck out there. Is something available for this too?
          You might also want to look at our "Inspector" module which not only shows the standard variables, but will show the Actual and Current variables and values. For example, the actual variable and value for the current basket weight.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Re: basket quantity?

            Hi Brennan,

            &mvte:order:formatted_total; seems to bring up the dollar amount of the order.

            I'm trying to get the total number of items in an order.

            Example:

            blue shoes - 1
            red shoes - 3

            The total number I'm looking for here is 4. That's the number I'm trying to get but I don't see it in the token list. Is this available?

            thanks!

            Comment


              #7
              Re: basket quantity?

              In the list of Items, do:

              <mvt:assign name="g.totalProducts" value="g.totalProducts + 1" />


              Then, wherever you want the number use &mvt:global:totalProducts;
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment

              Working...
              X