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

Order System: Packages with a quantity available of 0 are still available for order

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.3, 3.2.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      Packages with a quantity available of 0 should not appear on order forms or be orderable.

        Activity

        Hide
        cody Cody Phillips (Inactive) added a comment -

        Steps to duplicate?

        There's already an error check in Services (Services::decrementQuantity()) which handles decrementing quantity if, and only if, there is quantity to be decremented. If quantity can not be consumed an error is returned.

        Show
        cody Cody Phillips (Inactive) added a comment - Steps to duplicate? There's already an error check in Services (Services::decrementQuantity()) which handles decrementing quantity if, and only if, there is quantity to be decremented. If quantity can not be consumed an error is returned.
        Hide
        admin Paul Phillips added a comment -

        Set a package quantity to 0. Go to order form, add to cart.

        Where does the check occur? The user should not even see the package during checkout if it's not available.

        Show
        admin Paul Phillips added a comment - Set a package quantity to 0. Go to order form, add to cart. Where does the check occur? The user should not even see the package during checkout if it's not available.
        Hide
        cody Cody Phillips (Inactive) added a comment -

        The error check occurs when the service is added.

        Regarding display of packages that have no remaining quantity, we discussed this previously and the decision was that packages should appear when no quantity is available. I think if we're going to prevent users from adding an item to the cart that has no quantity available at that time, it should still be shown but instead say "OUT OF STOCK". If someone doesn't want a particular package shown they can remove it from the order form.

        Anything outside the scope of fixing the issue related to adding services to the system when quantity is unavailable should be added as a separate task as it is not bug related.

        Show
        cody Cody Phillips (Inactive) added a comment - The error check occurs when the service is added. Regarding display of packages that have no remaining quantity, we discussed this previously and the decision was that packages should appear when no quantity is available. I think if we're going to prevent users from adding an item to the cart that has no quantity available at that time, it should still be shown but instead say "OUT OF STOCK". If someone doesn't want a particular package shown they can remove it from the order form. Anything outside the scope of fixing the issue related to adding services to the system when quantity is unavailable should be added as a separate task as it is not bug related.
        Hide
        cody Cody Phillips (Inactive) added a comment -

        I'm not able to duplicate this. Attempting to checkout results in an error.

        Paul says we might want to perform the quantity check before adding to cart. If so, a new task should be created for adding that feature.

        Show
        cody Cody Phillips (Inactive) added a comment - I'm not able to duplicate this. Attempting to checkout results in an error. Paul says we might want to perform the quantity check before adding to cart. If so, a new task should be created for adding that feature.

          People

          • Assignee:
            cody Cody Phillips (Inactive)
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              27/Mar/14