Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to remove that $-symbol in case if no offer is present and show and take it space when offer is present?I want to shift my original price in center and due to presence of S sign it is not possible for me.How can I do this?I want solution in Laravel.

What I have tried:

foreach($restaurant->categories as $category) {
foreach($category->dishes as $dish) {
foreach ($offers as $key => $offer) {
$dishes = json_decode($offer->dishes);
foreach($dishes as $offer_dish) {

if($offer_dish == $dish->id){
foreach($dish->packs as $pack) {
if($offer->discount_type == 'percentage'){
$pack->mrp = $pack->price;
$pack->offers = $offer->name;

$pack->price = $pack->price - (($offer->discount_quantity * $pack->price)/100);
$pack->price = $pack->price;
if($offer->activated == 1){

} else{
$offer->activated = 1;
}

}
else{
$pack->mrp = $pack->price;
$pack->price = $pack->price - $offer->discount_quantity; $pack->price = $pack->price - (($offer->discount_quantity * $pack->price)/100);
$pack->price = $pack->price - (($offer->discount_quantity * $pack->price)/100);
$pack->offers = $offer->minimum_price;
}
}
}



}
}
}
}
Posted
Updated 23-Jun-16 21:59pm
Comments
Sergey Alexandrovich Kryukov 24-Jun-16 10:12am    
What "$ symbol", where?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900