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

Order: Incorrect price may be selected when configuring a product

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.3.0-b1, 3.3.0
    • Component/s: Plugins
    • Labels:
      None

      Description

      This issue affects the "config.pdt" template for the standard order forms.

      After choosing a term/price, continuing to the configuration step may show the wrong term selected than what was chosen on the first step.

      This issue appears to only occur when multiple package IDs begin with the same integer, as shown in the image, i.e. pricing ID 17 and pricing ID 1 both begin with "1". While pricing ID 17 was selected on step 1, pricing ID 1 is selected on the page because it appears later in the list, and both are marked 'selected'.

      The fix is simple: update
      $this->Form->fieldSelect("pricing_id", $prices, $selected_price, array('class' => "form-control"));

      to

      $this->Form->fieldSelect("pricing_id", $prices, $selected_price->id, array('class' => "form-control"));

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Attachment order_bug.png [ 10928 ]
        tyson Tyson Phillips (Inactive) made changes -
        Description This issue affects the "config.pdt" template for all order forms.

        After choosing a term/price, continuing to the configuration step may show the wrong term selected than what was chosen on the first step.

        This issue appears to only occur when multiple package IDs begin with the same integer, as shown in the image, i.e. pricing ID 17 and pricing ID 1 both begin with "1". While pricing ID 17 was selected on step 1, pricing ID 1 is selected on the page because it appears later in the list, and both are marked 'selected'.

        The fix is simple: update
        $this->Form->fieldSelect("pricing_id", $prices, $selected_price, array('class' => "form-control"));

        to

        $this->Form->fieldSelect("pricing_id", $prices, $selected_price->id, array('class' => "form-control"));
        This issue affects the "config.pdt" template for the standard order forms.

        After choosing a term/price, continuing to the configuration step may show the wrong term selected than what was chosen on the first step.

        This issue appears to only occur when multiple package IDs begin with the same integer, as shown in the image, i.e. pricing ID 17 and pricing ID 1 both begin with "1". While pricing ID 17 was selected on step 1, pricing ID 1 is selected on the page because it appears later in the list, and both are marked 'selected'.

        The fix is simple: update
        $this->Form->fieldSelect("pricing_id", $prices, $selected_price, array('class' => "form-control"));

        to

        $this->Form->fieldSelect("pricing_id", $prices, $selected_price->id, array('class' => "form-control"));
        tyson Tyson Phillips (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        admin Paul Phillips made changes -
        Fix Version/s 3.3.0 [ 10508 ]
        Fix Version/s 3.2.3 [ 10506 ]

          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:
              27/Aug/14