Announcement

Collapse
No announcement yet.

Get Basket Total - Before Discount

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

    Get Basket Total - Before Discount

    Ok I give up... All I'm trying to do is get the basket total before discounts are applied. I would like to use this on pages other than BASK.

    I'm using this to display some wholesale information based on the full basket value before discount. I can't use l.settings:global_minibasket:total because that value changes once the discount is applied. And subtotal seems to be only available for line items.
    Ron Frigon
    Jedi Webmaster Obi-Ron Kenobi

    #2
    Ron Frigon What type of discounts are you using. Product discounts are added on the line item so the basket total will never include the base amount without discounts.

    You could loop through the basket items and calculate the total by doing something like this:

    Code:
    <mvt:foreach iterator="group" array="basket:groups">
        <mvt:assign name="l.settings:calculated_basket_subtotal" value="l.settings:calculated_basket_subtotal + l.settings:group:base_price" />
        ...
    </mvt:foreach>
    Calcualted Basket Subtotal: &mvt:calculated_basket_subtotal;
    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment


      #3
      Thanks Nick. I'll see what I can do with that but using global_minibasket groups instead so I can use it globally. Currently we're using a product discount for specific customers. Maybe I can simplify this by changing to a basket discount instead...
      Ron Frigon
      Jedi Webmaster Obi-Ron Kenobi

      Comment

      Working...
      X