Announcement

Collapse
No announcement yet.

Two more V6.1.2 bugs.

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

    Two more V6.1.2 bugs.

    I found 2 bugs relating to the checking of Quantity limits.

    1) The error message against the product quantity fails to be displayed if the product reference contains an arithmetic character.
    E.g. Use Demo site. Basic Products page. Set the Calculator to have a minimum order of 4 and a maximum of 100. Now try to buy just 1 (with none already in cart). You get the error text "Quantity: The quantity must be a whole number between 4 and 100." displayed just above the Quantity entry box.
    Now change it's product reference to 5-4 (or A-B, etc) and again try to buy just 1 (with none already in cart) and Kaboom - the informative text isn't displayed against the Quantity box.

    2) Quantity on product page fails to allow additional adds if Maximum quantity set.
    E.g. Change that Calculators product reference back to 5 (or whatever it was), set minimum order of 4 and a maximum of 100. Now add 50 to the Cart. All OK. Now you've got 50 in the cart and a limit of 100. Back to product page and try adding 40. Ka-deja-vu-boom. A very confusing error message "Quantity: The quantity must be a whole number between 1 and 50." when there's 40 in the entry field. This bug only affects the Product page. Adding 40 more to an existing 50 in the Cart display page is OK.

    I really needed this error message to work properly so I think I found (and fixed) the bug in ActinicOrder.pm. Locate the line

    Code:
    $nQuantity = $$pProductQuantities{$$pOrderDetails{"PRODUCT_REFERENCE"}} + ($nIndex == -1 ? $$pOrderDetails{"QUANTITY"} : 0);
    and change it to:-

    Code:
    	$nQuantity = $nIndex == -1 ? $$pOrderDetails{"QUANTITY"} : $$pProductQuantities{$$pOrderDetails{"PRODUCT_REFERENCE"}};
    # Norman - bugfix above - this is original Actinic buggy line	$nQuantity = $$pProductQuantities{$$pOrderDetails{"PRODUCT_REFERENCE"}} + ($nIndex == -1 ? $$pOrderDetails{"QUANTITY"} : 0);
    This seems to work correctly in both the Product pages and Cart pages but you may want to check it more than I did.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    Actinic should offer you a job!

    Comment


      #3
      Thanks Norman. These have been reported to the development team. You are a star!

      Comment

      Working...
      X