如果没有报价,如何删除$ -symbol并在报价出现时显示并占用空间? [英] How to remove that $-symbol in case if no offer is present and show and take it space when offer is present?

查看:53
本文介绍了如果没有报价,如何删除$ -symbol并在报价出现时显示并占用空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果没有优惠,如何删除$ -symbol并在优惠时显示并占用空间?我想将原价移到中心,由于存在S符号,我不可能我怎么能这样做?我想在Laravel解决方案。



我尝试了什么:



foreach($ restaurant->类别为$ category){

foreach($ category->菜肴为$ dish){

foreach ($ offer $ key => $ offer){

$ dishes = json_decode($ offer->菜肴);

foreach($ dishes as $ offer_dish) {



if($ offer_dish == $ dish-> id){

foreach($ dish->包装为$ pack) ){

if($ offer-> discount_type =='percentage'){

$ pack-> mrp = $ pack-& gt;价格;

$ pack-> offers = $ offer-> name;



$ pack-> price = $ pack-> price - (($ offer-> discount_quantity * $ pack-> price)/ 100);

$ pack-> price = $ pack-> price;

如果($ offer->激活== 1){



}否则{

$ offer-> ;激活= 1;

}



}

else {

$ pack-> mrp = $ pack->价格;

$ pack-> price = $ pack-> price - $ offer-> discount_quantity; $ pack-> price = $ pack->价格 - (($ offer-> discount_quantity * $ pack->价格)/ 100);

$ pack-> price = $ pack-> price - (($ offer-> discount_quantity * $ pack-> price)/ 100);

$ pack-> offers = $ offer-> minimum_price;

}

}

}





< br $>
}

}

}

}

解决方案

< blockquote> -symbol以防万一没有报价,并在报价出现时显示并占用空间?我想将原价置于中心位置,由于存在S符号,我不可能。我怎么能这样做?我想在Laravel找到解决方案。



我尝试过:



foreach(


restaurant-> category as


category){

foreach(


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;
}
}
}



}
}
}
}

解决方案

-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(


这篇关于如果没有报价,如何删除$ -symbol并在报价出现时显示并占用空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆