Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 593 posts 1434 karma points c-trib
    May 29, 2017 @ 17:29
    Rasmus Fjord
    0

    Stock goes to "-1" also a case where a stock goes from "0" to ""

    Hey there

    A customer of ours reports the following, he sets the stock of a product to "0", saves and publishes, 10 min later he comes back to the product, but now the field says "" like it didnt have a value. Have you heard about this?

    Also the customer reports a similar case where has 0 in stock an order made puts it to "-1". We are doing checks to ensure this shouldnt be possible, but is there a way to check what a stock was before, like rolling it back, or is it only the current level we can check?

    TC 3.1.3

  • Anders Burla Johansen 2534 posts 8126 karma points
    May 30, 2017 @ 07:56
    Anders Burla Johansen
    0

    Only current level is saved in DB. TC doesn't do checks for stock - it just allows people to buy as many as they like. Don't know how it suddently can be "" instead of 0. Have you tried to save 0 and check in the DB if it says 0?

    Kind regards

    Anders

  • Rasmus Fjord 593 posts 1434 karma points c-trib
    May 30, 2017 @ 12:37
    Rasmus Fjord
    0

    Roger then we might be looking at a frontend thing.

    Just tried the thing by saving a 1 or 0 get saved great without any issues.

    But i tried playing around with changing the SKU, and the stock field, and tried a few plays with different combos, it seemed to work until i actually saw the bug occur. The stock field went empty and and the line also dissapeared from the table. But how i provoked it i dont know.

    There is no errors in the logs or anything but I saw it occur.

    Is there any way i can hook into the event where stock is changed, by using the NotificationCenter or some other event? Cant find anything. Then i would log it.

  • Anders Burla Johansen 2534 posts 8126 karma points
    May 30, 2017 @ 13:16
    Anders Burla Johansen
    0

    No event for that - Maybe make an issue on GitHub to add it :)

  • Rasmus Fjord 593 posts 1434 karma points c-trib
    May 31, 2017 @ 14:11
    Rasmus Fjord
    0

    Ill do that :)

    Actually i saw the bug happen where the stock field inside umbraco suddenly went empty, i looked in the db and the it actually was gone the line.

    Ive been looking into your stock datatype, and it sends data to your custom controller which saves it. But this is dependent on the sku. Im guessing if a delay occurs somewhere here where the sku should looked up and it isnt there it will fail silently. I cannot reproduce the error on a consistent basis but im guessing its somewhere along these lines.

Please Sign in or register to post replies

Write your reply to:

Draft