Announcement

Collapse
No announcement yet.

Replacement for Toolkit Basket Quantity

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

    Replacement for Toolkit Basket Quantity

    Code:
    <mvt:item name="toolkit" param="basket|itemcount"/>
    How do I replace the Toolkit function to get the total quantity in the basket with native functionality?

    #2
    I figured it out. Let me know if there is a better way.
    1. Install the Miva module Mini-Basket
    2. Add the Mini-Basket item to the page template
    Code:
    <mvt:assign name="g.itemCount" value="l.settings:global_minibasket:basket_count" />

    Comment


      #3
      If you're concerned about performance, this will be faster than adding an entire basket component to the page:
      Code:
      <mvt:do file="g.Module_Library_DB" name="l.settings:total_quantity"
        value="Basket_Quantity_All(g.Basket:basket_id)" />
      The number in l.settings:total_quantity will be the total number of items in the basket; e.g. if a person has qty. 3 of a single item, this function will return 3, not 1.

      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


        #4
        Thank you Kent! This is a much better solution. I appreciate you took the time to respond.

        Comment

        Working...
        X