price error fixed

This commit is contained in:
magepeopleteam 2021-01-07 05:08:49 +00:00
parent 4189fbe341
commit 0f06e33ec7
1 changed files with 4 additions and 2 deletions

View File

@ -2792,8 +2792,9 @@ return $p;
function mep_get_ticket_type_price_arr($ticket_type,$event_id){ function mep_get_ticket_type_price_arr($ticket_type,$event_id){
$price = []; $price = [];
foreach($ticket_type as $ticket){ foreach($ticket_type as $ticket){
$price[] = mep_get_ticket_type_price_by_name($ticket,$event_id); $price[] = mep_get_ticket_type_price_by_name(stripslashes($ticket),$event_id);
} }
return $price; return $price;
} }
@ -2810,11 +2811,12 @@ function mep_cart_ticket_type($type,$total_price,$product_id){
$count = count( $names ); $count = count( $names );
$ticket_type_arr = []; $ticket_type_arr = [];
$vald = 0; $vald = 0;
if(sizeof($names) > 0){ if(sizeof($names) > 0){
for ( $i = 0; $i < $count; $i++ ) { for ( $i = 0; $i < $count; $i++ ) {
if($qty[$i] > 0){ if($qty[$i] > 0){
$ticket_type_arr[$i]['ticket_name'] = !empty($names[$i]) ? strip_tags($names[$i]) : ''; $ticket_type_arr[$i]['ticket_name'] = !empty($names[$i]) ? stripslashes(strip_tags($names[$i])) : '';
$ticket_type_arr[$i]['ticket_price'] = !empty($price[$i]) ? stripslashes( strip_tags( $price[$i] ) ) : ''; $ticket_type_arr[$i]['ticket_price'] = !empty($price[$i]) ? stripslashes( strip_tags( $price[$i] ) ) : '';
$ticket_type_arr[$i]['ticket_qty'] = !empty($qty[$i]) ? stripslashes( strip_tags( $qty[$i] ) ) : ''; $ticket_type_arr[$i]['ticket_qty'] = !empty($qty[$i]) ? stripslashes( strip_tags( $qty[$i] ) ) : '';