当前位置: 首页>>代码示例>>PHP>>正文


PHP BFCHelper::priceFormat方法代码示例

本文整理汇总了PHP中BFCHelper::priceFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::priceFormat方法的具体用法?PHP BFCHelper::priceFormat怎么用?PHP BFCHelper::priceFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BFCHelper的用法示例。


在下文中一共展示了BFCHelper::priceFormat方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

						<?php 
        }
        ?>
						<div class="com_bookingforconnector_merchantdetails-resource-stay-price">
							<?php 
        if ($totalDiscounted < $total) {
            ?>
								<span class="com_bookingforconnector_merchantdetails-resource-stay-discount">&euro; <?php 
            echo BFCHelper::priceFormat($total);
            ?>
</span>
							<?php 
        }
        ?>
							&euro; <span class="com_bookingforconnector_merchantdetails-resource-stay-total"><?php 
        echo BFCHelper::priceFormat($totalDiscounted);
        ?>
</span>
						</div>
					</div>
<!-- bottone Continua -->
					<div>
						<a class="btn btn-info" href="javascript:void(0);" onclick="showOptionalPackages(jQuery);return false;"><?php 
        echo JTEXT::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_CONTINUE');
        ?>
</a>
					</div>
				</div>
				<?php 
    } else {
        ?>
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:form_calculator_rateplan.php

示例2: pushStay

function pushStay($arr, $resourceid, $resStay, $defaultResource = null, &$staysuggesteds)
{
    $selected = array_values(array_filter($arr, function ($itm) use($resourceid) {
        return $itm->ResourceId == $resourceid;
    }));
    $index = 0;
    if (count($selected) == 0) {
        $obj = new stdClass();
        $obj->ResourceId = $resourceid;
        if (isset($defaultResource) && $defaultResource->ResourceId == $resourceid) {
            $obj->MinCapacityPaxes = $defaultResource->MinCapacityPaxes;
            $obj->MaxCapacityPaxes = $defaultResource->MaxCapacityPaxes;
            $obj->Name = $defaultResource->Name;
            $obj->ImageUrl = $defaultResource->ImageUrl;
            $obj->Availability = $defaultResource->Availability;
            $obj->Policy = $resStay->Policy;
        } else {
            $obj->MinCapacityPaxes = $resStay->MinCapacityPaxes;
            $obj->MaxCapacityPaxes = $resStay->MaxCapacityPaxes;
            $obj->Availability = $resStay->Availability;
            $obj->Name = $resStay->ResName;
            $obj->ImageUrl = $resStay->ImageUrl;
            $obj->Policy = $resStay->Policy;
        }
        $obj->RatePlans = array();
        //$obj->Policy = $completestay->Policy;
        //$obj->Description = $singleRateplan->Description;
        $arr[] = $obj;
        $index = count($arr) - 1;
    } else {
        $index = array_search($selected[0], $arr);
        //$obj = $selected[0];
    }
    $rt = new stdClass();
    $rt->RatePlanId = $resStay->RatePlanId;
    $rt->Name = $resStay->Name;
    $rt->PercentVariation = $resStay->PercentVariation;
    $rt->TotalPrice = 0;
    $rt->TotalPriceString = "";
    $rt->Days = 0;
    $rt->BookingType = $resStay->BookingType;
    $rt->IsBase = $resStay->IsBase;
    $rt->CalculatedPricesDetails = $resStay->CalculatedPricesDetails;
    $rt->SelectablePrices = $resStay->SelectablePrices;
    $rt->Variations = $resStay->Variations;
    $rt->SimpleDiscountIds = implode(',', $resStay->SimpleDiscountIds);
    if (!empty($resStay->SuggestedStay->DiscountedPrice)) {
        $rt->TotalPrice = (double) $resStay->SuggestedStay->TotalPrice;
        $rt->TotalPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->TotalPrice);
        $rt->Days = $resStay->SuggestedStay->Days;
        $rt->DiscountedPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->DiscountedPrice);
        $rt->DiscountedPrice = (double) $resStay->SuggestedStay->DiscountedPrice;
    }
    //	$rt->SuggestedStay = $resStay->SuggestedStay;
    $rt->originalStay = $resStay;
    $rt->DiscountVariation = $resStay->DiscountVariation;
    $rt->SupplementVariation = $resStay->SupplementVariation;
    $arr[$index]->RatePlans[] = $rt;
    $currstaysuggested = "";
    if (!empty($resStay->SuggestedStay)) {
        $tmpcurrstay = $resStay->SuggestedStay;
        $tmpcurrstay->DiscountedPrice = (double) $resStay->SuggestedStay->DiscountedPrice;
        $tmpcurrstay->RatePlanStay = $resStay;
        unset($tmpcurrstay->RatePlanStay->SuggestedStay);
        $tmpcurrstay->CalculatedPricesDetails = $resStay->CalculatedPricesDetails;
        //	$tmpcurrstay->Variations = $selVariation;
        $tmpcurrstay->DiscountVariation = $resStay->DiscountVariation;
        $tmpcurrstay->SupplementVariation = $resStay->SupplementVariation;
        $currstaysuggested = htmlspecialchars(json_encode($tmpcurrstay), ENT_COMPAT, 'UTF-8');
    }
    //echo "<pre>currstaysuggested:<br />";
    //echo print_r($currstaysuggested);
    //echo "</pre>";
    $staysuggesteds[$resStay->BookingType] = $currstaysuggested;
    return $arr;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:76,代码来源:form.php

示例3: pushStay

function pushStay($arr, $resourceid, $resStay, $defaultResource = null)
{
    $selected = array_values(array_filter($arr, function ($itm) use($resourceid) {
        return $itm->ResourceId == $resourceid;
    }));
    $index = 0;
    if (count($selected) == 0) {
        $obj = new stdClass();
        $obj->ResourceId = $resourceid;
        if (isset($defaultResource) && $defaultResource->ResourceId == $resourceid) {
            $obj->MerchantName = $defaultResource->MerchantName;
            $obj->MinCapacityPaxes = $defaultResource->MinCapacityPaxes;
            $obj->MaxCapacityPaxes = $defaultResource->MaxCapacityPaxes;
            $obj->Name = $defaultResource->Name;
            $obj->MrcCategoryName = $defaultResource->MerchantCategoryName;
            $obj->ImageUrl = $defaultResource->ImageUrl;
            $obj->Availability = $defaultResource->Availability;
            $obj->Policy = $resStay->Policy;
        } else {
            $obj->MerchantName = $resStay->MrcName;
            $obj->MinCapacityPaxes = $resStay->MinCapacityPaxes;
            $obj->MaxCapacityPaxes = $resStay->MaxCapacityPaxes;
            $obj->Availability = $resStay->Availability;
            $obj->Name = $resStay->ResName;
            $obj->MrcCategoryName = $resStay->MrcCategoryName;
            $obj->ImageUrl = $resStay->ImageUrl;
            $obj->Policy = $resStay->Policy;
        }
        $obj->RatePlans = array();
        //$obj->Policy = $completestay->Policy;
        //$obj->Description = $singleRateplan->Description;
        $arr[] = $obj;
        $index = count($arr) - 1;
    } else {
        $index = array_search($selected[0], $arr);
        //$obj = $selected[0];
    }
    $rt = new stdClass();
    $rt->RatePlanId = $resStay->RatePlanId;
    $rt->Name = $resStay->Name;
    $rt->RatePlanRefId = isset($resStay->RefId) ? $resStay->RefId : "";
    $rt->PercentVariation = $resStay->PercentVariation;
    $rt->TotalPrice = 0;
    $rt->TotalPriceString = "";
    $rt->Days = 0;
    $rt->BookingType = $resStay->BookingType;
    $rt->IsBookable = $resStay->IsBookable;
    $rt->CheckIn = BFCHelper::parseJsonDate($resStay->CheckIn);
    $rt->CheckOut = BFCHelper::parseJsonDate($resStay->CheckOut);
    $rt->CalculatedPricesDetails = $resStay->CalculatedPricesDetails;
    $rt->SelectablePrices = $resStay->SelectablePrices;
    $rt->Variations = $resStay->Variations;
    $rt->SimpleDiscountIds = implode(',', $resStay->SimpleDiscountIds);
    if (!empty($resStay->SuggestedStay->DiscountedPrice)) {
        $rt->TotalPrice = (double) $resStay->SuggestedStay->TotalPrice;
        $rt->TotalPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->TotalPrice);
        $rt->Days = $resStay->SuggestedStay->Days;
        $rt->DiscountedPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->DiscountedPrice);
        $rt->DiscountedPrice = (double) $resStay->SuggestedStay->DiscountedPrice;
    }
    $arr[$index]->RatePlans[] = $rt;
    return $arr;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:63,代码来源:default_calculator_rateplan.php

示例4:

            }
            ?>
																													</div>
																												<?php 
        } else {
            ?>
																													<div class="com_bookingforconnector-gray-highlight">
																														<span class="com_bookingforconnector-item-secondary-stay-total">&euro; <?php 
            echo BFCHelper::priceFormat($totalDiscounted);
            ?>
</span>
																														<?php 
            if ($totalDiscounted < $total) {
                ?>
																															<span class="com_bookingforconnector_strikethrough">&euro; <?php 
                echo BFCHelper::priceFormat($total);
                ?>
</span>
																														<?php 
            }
            ?>
																													</div>
																													<div class="clearboth"></div>
																												<?php 
        }
        ?>
						
						<?php 
    }
    ?>
					</div>
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:form_calculator_rateplan.php

示例5: unset

    if ($stays->RatePlanId == $active_plan_id) {
        $selected = ' selected';
    }
    $price_type_options_string = $price_type_options_string . '<option' . $selected . ' value="' . $stays->RatePlanId . '">' . $stays->Name . '</option>';
}
$price_string = '';
$discount_id = '';
if (isset($price_types[$active_plan_id])) {
    $active_plan = $price_types[$active_plan_id];
    $suggested_stay = $active_plan->SuggestedStay;
    unset($active_plan->SuggestedStay);
    $suggested_stay->RatePlanStay = $active_plan;
    $suggested_day_json = json_encode($suggested_stay);
    $_SESSION['search.params']['suggestedstay'] = $suggested_day_json;
    $total = $price_final = BFCHelper::priceFormat($active_plan->TotalAmount);
    $total_discounted = BFCHelper::priceFormat($active_plan->TotalDiscounted);
    $_SESSION['search.params']['totalDiscounted'] = $active_plan->TotalDiscounted;
    $is_discounted = FALSE;
    if ($total != $total_discounted) {
        $is_discounted = TRUE;
        //$discount_name = $active_plan->Discount->Name;
        //$discount_id = $active_plan->Discount->VariationPlanId;
        if (!empty($active_plan->Variations)) {
            $discount_name = $active_plan->Variations[0]->Name;
            $discount_id = $active_plan->Variations[0]->VariationPlanId;
        }
        $price_string = $price_string . '<span class="com_bookingforconnector_merchantdetails-resource-stay-discount">€' . $total . '</span>';
    }
    $price_string = $price_string . '<span class="com_bookingforconnector_merchantdetails-resource-stay-total">€' . $total_discounted . '</span>';
}
//echo isset($_SESSION['search.params']['suggestedstay']);
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:31,代码来源:rate-calculator.php

示例6: _e

        </div>
</div>
		<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
" id="totaldepositrequested">
            <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
12">
              <br>
              <?php 
_e('Total deposit : €', 'bfi');
?>
			  <span class="totaldeposit" id="totaldeposit"><?php 
echo BFCHelper::priceFormat($deposit);
?>
</span> 
            </div>
        </div>
	<div style="display:none;" id="ccInformations">
		<br><hr>
		<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">   
			<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
8" style="border-right:1px solid #cccccc">
				<?php 
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:31,代码来源:payment-form.php

示例7: sprintf

										<?php 
                    echo sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RESOURCE_TOTALDAYS'), $rateplan->SuggestedStay->Days);
                    ?>
										<div class="com_bookingforconnector_merchantdetails-resource-stay-price">
											<?php 
                    if ($rateplan->SuggestedStay->DiscountedPrice < $rateplan->SuggestedStay->TotalPrice) {
                        ?>
												<span class="com_bookingforconnector_merchantdetails-resource-stay-discount">&euro; <?php 
                        echo BFCHelper::priceFormat($rateplan->SuggestedStay->TotalPrice);
                        ?>
</span>
											<?php 
                    }
                    ?>
											&euro; <span class="com_bookingforconnector_merchantdetails-resource-stay-total"><?php 
                    echo BFCHelper::priceFormat($rateplan->SuggestedStay->DiscountedPrice);
                    ?>
</span>
										</div>
									</div>
									<div class="<?php 
                    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
                    ?>
2 alignvertical">
										<a class="btn btn-success " href="<?php 
                    echo $resourceRoute;
                    ?>
?pricetype=<?php 
                    echo $rateplan->RatePlanId;
                    ?>
"><?php 
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:default_merchants_multirateplans.php


注:本文中的BFCHelper::priceFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。