Announcement

Collapse
No announcement yet.

Order Line Totals Causing Strange (but repeatable) Crashing

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

  • brucet
    replied
    This problem was due to a PHP bug. It is resolved by a PHP upgrade embedded in v16.0.2, released yesterday.

    This change could affect any plugins or custom code using PHP. So when installing the upgrade, please check carefully in test mode if you have either or both of these, before making the site live.

    Leave a comment:


  • Air-Tech
    replied
    A bit late to the party, but we had the same issue with £217.27 in V16.0.1 on Win7 Pro/64.

    Luckily it was a PP Express order, so the line items, delivery details & seller protection status were easily found & the order could be completed without issue from right click / complete order.

    The fix suggested by Bruce has worked in this particular scenario.

    Leave a comment:


  • Dealec
    replied
    I'm guessing you'd need to go through each instance of SetAttributeValue which loads in a rounded value and make the same change for all levels to work.

    Might be something to play with, but at least this fix seems to work.

    Leave a comment:


  • Andy@codepath
    replied
    Originally posted by Dealec View Post
    That worked! not to test it on the live version.
    Obviously, each rounding level will produce slightly different order totals in some situations so as long as you are happy with that it sounds like a workaround for now.

    Leave a comment:


  • Dealec
    replied
    Originally posted by Andy@codepath View Post
    I don't think you did Andrew. Further investigation indicates that Bruce's fix works only for an "Order" rounding Level. With the old PHP code, all three "Rounding Levels" produced the error. Now the error only occurs when LINE or ITEM rounding are used; ORDER rounding successfully adds the item to the cart.

    Andrew, I suggest you change your rounding level to ORDER, with the new PHP code and see if that works.
    That worked! not to test it on the live version.

    Leave a comment:


  • Andy@codepath
    replied
    Originally posted by Dealec View Post
    I'm starting to think i did something wrong. Let me start again....
    I don't think you did Andrew. Further investigation indicates that Bruce's fix works only for an "Order" rounding Level. With the old PHP code, all three "Rounding Levels" produced the error. Now the error only occurs when LINE or ITEM rounding are used; ORDER rounding successfully adds the item to the cart.

    Andrew, I suggest you change your rounding level to ORDER, with the new PHP code and see if that works.

    Leave a comment:


  • Dealec
    replied
    Originally posted by Andy@codepath View Post
    I tried Bruce's PHP modification and can confirm that it does correct the problem for my implementation. I have confirmed this by switching the old and new PHP files in and out and the results are predictable: Error with old file, item successfully added to cart with new file.

    I'm not sure where that leaves you Bruce. If you need any setup info from my site, please ask.

    (v16.01 / Win8.1 / demo site.)
    I'm starting to think i did something wrong. Let me start again....

    Leave a comment:


  • Andy@codepath
    replied
    I tried Bruce's PHP modification and can confirm that it does correct the problem for my implementation. I have confirmed this by switching the old and new PHP files in and out and the results are predictable: Error with old file, item successfully added to cart with new file.

    I'm not sure where that leaves you Bruce. If you need any setup info from my site, please ask.

    (v16.01 / Win8.1 / demo site.)

    Leave a comment:


  • Dealec
    replied
    Originally posted by NormanRouxel View Post
    Dammit - cannot get it to crash here. 16.0.1 / Win7 Pro 64bit.
    That is extremely strange. only other thing i can suggest is possibly trying it on the demo site?

    Leave a comment:


  • NormanRouxel
    replied
    Step 1. Create a product with a selling value of £72.56 and a standard VAT rate of 20% (the VAT is important as it seems to be the cause of the crash)

    Step 2. in Sellerdeck open the "+ New Order" tab and add the product to a new order.

    At this point sellerdeck 16.0 crashes...
    Dammit - cannot get it to crash here. 16.0.1 / Win7 Pro 64bit.

    Leave a comment:


  • Dealec
    replied
    After installing 16.01 it still crash, but it had reset the php files. Sadly after making the change Bruce suggested it still crashed.

    Interestingly commenting out the line I mentioned above only made a difference after the change Bruce posted, it didn't prevent the crash before hand.

    Leave a comment:


  • Dealec
    replied
    a little more digging and I've got to this line:

    $fOrderLineTax1Rounded += $oLBNode->GetAttributeValue(null, 'tax1rounded',XML_ATTRIBUTE_TYPE_FLOAT, 0.0);

    in the ProcessOrderLine function. It's here my lack of any PHP experience gets in the way.

    Leave a comment:


  • Dealec
    replied
    Originally posted by NormanRouxel View Post
    I tried to make my 16.0.1 crash but failed. I note that others can't get the crash either, so I'm also wondering if it may be Windows version specific.

    It may be worth posting an exact set of steps to follow that cause said crash so we can see who does / doesn't get it.
    No problem.

    Step 1. Create a product with a selling value of £72.56 and a standard VAT rate of 20% (the VAT is important as it seems to be the cause of the crash)

    Step 2. in Sellerdeck open the "+ New Order" tab and add the product to a new order.

    At this point sellerdeck 16.0 crashes, I have tried this on windows 7, 8, and 10 with the same problem. i'll try installing the 16.01 update to see if i can stop the problem.

    Leave a comment:


  • NormanRouxel
    replied
    I tried to make my 16.0.1 crash but failed. I note that others can't get the crash either, so I'm also wondering if it may be Windows version specific.

    It may be worth posting an exact set of steps to follow that cause said crash so we can see who does / doesn't get it.

    Leave a comment:


  • Dealec
    replied
    Originally posted by NormanRouxel View Post
    Note that many of the the SD PHP files are loaded once when SD starts up. So changes made to them won't take effect until you restart SD.
    I suspected that might be the case, so i've made sure it's fully closed before, and re-opened after every change.

    Leave a comment:

Working...
X