For an advanced Django developer it should be easy.
>From the simplest to the more complicated:
1) Have you disabled the NO_STOCK_CHECKOUT in livesettings?
2) Verify the bug with disabled javascript.
3) How big is the probability of intentional reproducing out-of-stock
bug? 100% 50% 0.01%?
4) Is it finally blocked on -1 or -2 or unlimited?
You can answer it easy and It could eliminate great areas to check.
I foresee eventually further steps if we say no Eureka!
5) You find all checks of stock by grepping NO_STOCK_CHECKOUT in the
original source and looking for a derived local variable - easy. You
see very near logging commands, sending signals, that's all. Relative
readable. (But the code for javascript I skipped out now completely
before answer 2)
6) Did not you customized any of these places? e.g.
class MyProduct(Product):
- Did you added a new listener for these signals?
7) Be familiar with how the plain new Satchmo works on a local
computer.
8) Copy the buggy project with the whole db to other virtualenv in the
development computer
9) Enable Debug level logging. Clear logs exactly before checkout.
After checkout grep out db from the log, strip time, compare the rest
of logs from good and bad configurated development server, especially
lines about stock.
10) Try debugging/logging around places with NO_STOCK_CHECKOUT.
Thanks if you find something useful for the community.
-- Hynek
On 17 lis, 14:17, Mark <[email protected]> wrote:
> Hi Chris, thanks a lot for the info. I'm fairly sure this patch has
> already been applied, but I'll double-check. If I remember rightly it
> had to be implemented in two different payment modules, one for PayPal
> and the other for our SagePay integration.
>
> On Nov 9, 7:23 pm, Chris Moffitt <[email protected]> wrote:
>
>
>
>
>
>
>
> > There was an issue a while back where a user could have an item in their
> > cart for a period of time, then have inventory fall below 0. Since it
> > wasn't checked again before they checked out this behavior could be seen.
> > However, I thought I put in a patch a while ago that did a check of the
> > inventory right before purchase in order to prevent this issue.
>
> >https://bitbucket.org/chris1610/satchmo/changeset/21981db3d322
>
> > You could try to figure out if this code is not catching a case for you.
>
> > -Chris
>
> > On Wed, Nov 9, 2011 at 6:24 AM, Mark <[email protected]> wrote:
> > > Hi.
>
> > > I'm a longstanding Django developer with a client running Satchmo
> > > v0.9.2. They're having an intermittent problem which we're having
> > > difficulty pinning down.
>
> > > It seems that it's possible to order items that are out-of-stock. I've
> > > implemented various fixes mentioned on this group and elsewhere, and
> > > when I try it, the correct behaviour happens, however they've had
> > > multiple users who've been able to order items which have a Number in
> > > Stock value of 0. The order goes through successfully, then the Number
> > > in Stock value for that product is decremented, so it comes up as -1.
>
> > > I understand it's nigh-on impossible to diagnose a problem you can't
> > > see - that's the situation we're in right now! - but I'm just hoping
> > > that someone else might have encountered a similar issue and has a
> > > fix. Cluthing at draws? Maybe :)
>
> > > Would really appreciate your help with this.
>
> > > Many thanks,
> > > -Mark
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Satchmo users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group at
> > >http://groups.google.com/group/satchmo-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.