From c72f845ef79b6806d219b6d528dbd5a2c5592614 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 27 Sep 2015 20:56:51 +0200 Subject: [PATCH] fix order bug: check flags of eventprice (corrected) instead of pricecategory (wrong) --- www/inc/wext/cart.php | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/www/inc/wext/cart.php b/www/inc/wext/cart.php index 718d271..0ac1b9d 100644 --- a/www/inc/wext/cart.php +++ b/www/inc/wext/cart.php @@ -232,14 +232,16 @@ class WOCartOrder extends WOCartOrderAbstract $ret=false; continue; } - //check that we have the right to sell this category - if(!array_key_exists($pcid,$pcat)) - $pcat[$pcid]=$session->checkFlags(WTpricecategory::getFromDB($pcid)->flags); - if(!$pcat[$pcid]){ - $tick->setstatus(WOCartTicket::Invalid); - $ret=false; - continue; - } + //check that we have the right to sell this category for this event + if(!array_key_exists($evid,$pcat)) + $pcat[$evid]=array(); + if(!array_key_exists($pcid,$pcat[$evid])) + $pcat[$evid][$pcid]=$session->checkFlags($tick->geteventprice()->getflags()); + if(!$pcat[$evid][$pcid]){ + $tick->setstatus(WOCartTicket::Invalid); + $ret=false; + continue; + } //set the price $tick->setprice($evprice[$evid][$pcid]); //check enough seats for event -- 1.7.2.5