Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1176

Order Plugin: Foreach error attempting to display tax totals on checkout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0-b1
    • Fix Version/s: 3.2.0-b2
    • Component/s: Client Interface
    • Labels:
      None

      Description

      On the wizard/checkout.pdt template, an "invalid argument supplied to foreach" error occurs on line 151.

      It appears that tax totals are iterated over, however, in at least one particular instance (using the BuycPanel module), the tax totals are not an array, but rather a single float value.

      i.e.
      Array
      (
      [subtotal] => Array
      (
      [amount] => 1.2500
      [amount_formatted] => $1.25 USD
      )

      [total] => Array
      (
      [amount] => 1.2500
      [amount_formatted] => $1.25 USD
      )

      [total_w_tax] => Array
      (
      [amount] => 1.7200
      [amount_formatted] => $1.72 USD
      )

      [tax] => 0.47
      [fees] => Array
      (
      [setup] =>
      )

      [discount] => Array
      (
      [amount] =>
      )

      )

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Description On the wizard/checkout template, an "invalid argument supplied to foreach" error occurs on line 151.

        It appears that tax totals are iterated over, however, in at least one particular instance (using the BuycPanel module), the tax totals are not an array, but rather a single float value.

        i.e.
        Array
        (
            [subtotal] => Array
                (
                    [amount] => 1.2500
                    [amount_formatted] => $1.25 USD
                )

            [total] => Array
                (
                    [amount] => 1.2500
                    [amount_formatted] => $1.25 USD
                )

            [total_w_tax] => Array
                (
                    [amount] => 1.7200
                    [amount_formatted] => $1.72 USD
                )

            [tax] => 0.47
            [fees] => Array
                (
                    [setup] =>
                )

            [discount] => Array
                (
                    [amount] =>
                )

        )
        On the wizard/checkout.pdt template, an "invalid argument supplied to foreach" error occurs on line 151.

        It appears that tax totals are iterated over, however, in at least one particular instance (using the BuycPanel module), the tax totals are not an array, but rather a single float value.

        i.e.
        Array
        (
            [subtotal] => Array
                (
                    [amount] => 1.2500
                    [amount_formatted] => $1.25 USD
                )

            [total] => Array
                (
                    [amount] => 1.2500
                    [amount_formatted] => $1.25 USD
                )

            [total_w_tax] => Array
                (
                    [amount] => 1.7200
                    [amount_formatted] => $1.72 USD
                )

            [tax] => 0.47
            [fees] => Array
                (
                    [setup] =>
                )

            [discount] => Array
                (
                    [amount] =>
                )

        )
        tyson Tyson Phillips (Inactive) made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Security Private [ 10000 ]
        tyson Tyson Phillips (Inactive) made changes -
        Summary Order Plugin: Foreach error attempting to display tax totals on wizard checkout Order Plugin: Foreach error attempting to display tax totals on checkout
        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        Fixed

        Show
        tyson Tyson Phillips (Inactive) added a comment - Fixed
        tyson Tyson Phillips (Inactive) made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              2/May/14