I think this part is your problem:
>>
  if($ACTION = "UPDATE_BASKET"){
      //get quanity available for this SKU
      $Query = "SELECT i.Available, i.Reserve, i.Backorder ";
      $Query .= "FROM inventory i, session_sku ss ";
      $Query .= "WHERE ss.ID = $sku_ID ";
      $Query .= "AND i.SKU = ss.SKU ";
    }elseif{$ACTION = "UPDATE_INVOICE_SKU"){
      //get quanity available for this SKU
      $Query = "SELECT i.Available, i.Reserve, i.Backorder ";
      $Query .= "FROM inventory i, invoice_sku is ";
      $Query .= "WHERE is.ID = $sku_ID ";
      $Query .= "AND is.SKU = i.SKU ";
    }

<<
in the above code you actually set $ACTION equal to UPDATE_BASKET and you will
automatically execute the first if statement, you will never execute the part
you are trying to, I think you need to change the code to be if $ACTION ==
"UPDATE_BASKET" and $ACTION == "UPDATE_INVOICE_SKU", your odds will improve 100%
on this working. I don't know if it will work the way you want, but it at least
will execute for you.

Kelley


Chuck Gartland wrote:

> I still have not been able to debug my function.  I have though been
> reminded by a store owner of another problem.
>
> Among other things this store sells collectable trading card singles.  It is
> quite possible that the quantity available to the store may only be one.  We
> have a invoice sitting in the queue where someone order 6 of a card that
> there is only one of.  The order could not be placed by changing the order
> qty of the basket or invoice since I have implemented my bugged fix to get
> the basket working right and hobble the ability to change quantity in the
> invoice.  But FreeTrade will allow someone to hit the ADD button on an item
> any number of times.  FreeTrade will never complain about this regardless of
> inventory levels.
>
> It seems to me that FreeTrade needs to hold inventory that is placed in a
> basket.  Then if the basket is abandoned release the inventory back to the
> store.  Any one else have any opinion about this?  Or is this situation
> uncommon and I should just fork the code for this store?
>
> Chuck
>
> -------------------------------------------------
> Chuck Gartland          ||      [EMAIL PROTECTED]
> Project 27                      ||      www.project27.com
> 1836 Palm Avenue                ||      808 465-1381
> Pearl City, HI  96782   ||      GMT -10:00 hours
> -------------------------------------------------
>
> _______________________________________________
> FreeTrade-dev mailing list
> [EMAIL PROTECTED]
> http://share.whichever.com/mailman/listinfo/freetrade-dev

_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev

Reply via email to