本文整理汇总了PHP中Isotope\Isotope::formatPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Isotope::formatPrice方法的具体用法?PHP Isotope::formatPrice怎么用?PHP Isotope::formatPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Isotope\Isotope
的用法示例。
在下文中一共展示了Isotope::formatPrice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDailySummary
/**
* Generate a daily summary for the overview page
* @return array
*/
protected function getDailySummary()
{
$strBuffer = '
<div class="tl_formbody_edit be_iso_overview">
<fieldset class="tl_tbox">
<legend style="cursor: default;">' . $GLOBALS['TL_LANG']['ISO_REPORT']['24h_summary'] . '</legend>';
$arrAllowedProducts = \Isotope\Backend\Product\Permission::getAllowedIds();
$objOrders = \Database::getInstance()->prepare("\n SELECT\n c.id AS config_id,\n c.name AS config_name,\n c.currency,\n COUNT(DISTINCT o.id) AS total_orders,\n SUM(i.tax_free_price * i.quantity) AS total_sales,\n SUM(i.quantity) AS total_items\n FROM tl_iso_product_collection o\n LEFT JOIN tl_iso_product_collection_item i ON o.id=i.pid\n LEFT OUTER JOIN tl_iso_config c ON o.config_id=c.id\n WHERE o.type='order' AND o.order_status>0 AND o.locked>=?\n " . Report::getProductProcedure('i', 'product_id') . "\n " . Report::getConfigProcedure('o', 'config_id') . "\n GROUP BY config_id\n ")->execute(strtotime('-24 hours'));
if (!$objOrders->numRows) {
$strBuffer .= '
<p class="tl_info" style="margin-top:10px">' . $GLOBALS['TL_LANG']['ISO_REPORT']['24h_empty'] . '</p>';
} else {
$i = -1;
$strBuffer .= '
<br>
<table class="tl_listing">
<tr>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['shop_config'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['currency'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['orders#'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['products#'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['sales#'] . '</th>
</tr>';
while ($objOrders->next()) {
$strBuffer .= '
<tr class="row_' . ++$i . ($i % 2 ? 'odd' : 'even') . '">
<td class="tl_file_list">' . $objOrders->config_name . '</td>
<td class="tl_file_list">' . $objOrders->currency . '</td>
<td class="tl_file_list">' . $objOrders->total_orders . '</td>
<td class="tl_file_list">' . $objOrders->total_items . '</td>
<td class="tl_file_list">' . Isotope::formatPrice($objOrders->total_sales) . '</td>
</tr>';
}
$strBuffer .= '
</table>';
}
$strBuffer .= '
</fieldset>
</div>';
return $strBuffer;
}
示例2: generateProductOptionWidget
/**
* Return a widget object based on a product attribute's properties
* @param string
* @param boolean
* @return string
*/
protected function generateProductOptionWidget($strField, &$arrVariantOptions, &$arrAjaxOptions)
{
\Controller::loadDataContainer(ProductModel::getTable());
$GLOBALS['TL_DCA'][ProductModel::getTable()]['fields']['gift_amount']['default'] = $GLOBALS['TL_DCA'][ProductModel::getTable()]['fields']['gift_amount']['default'] ?: Isotope::formatPrice($this->getPrice()->getAmount());
return parent::generateProductOptionWidget($strField, $arrVariantOptions, $arrAjaxOptions);
}