本文整理汇总了PHP中oledrion_utils::getTTC方法的典型用法代码示例。如果您正苦于以下问题:PHP oledrion_utils::getTTC方法的具体用法?PHP oledrion_utils::getTTC怎么用?PHP oledrion_utils::getTTC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oledrion_utils
的用法示例。
在下文中一共展示了oledrion_utils::getTTC方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($products as $item) {
$content = $newsletterTemplate;
$tblTmp = $tblTmp2 = array();
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('pm_product_id', $item->getVar('product_id'), '='));
$tblTmp = $h_oledrion_productsmanu->getObjects($criteria);
foreach ($tblTmp as $productManufacturer) {
$tblTmp2[] = $productManufacturer->getVar('pm_manu_id');
}
$manufacturers = $h_oledrion_manufacturer->getObjects(new Criteria('manu_id', '(' . implode(',', $tblTmp2) . ')', 'IN'), true);
$tblTmp = array();
foreach ($manufacturers as $manufacturer) {
$tblTmp[] = $manufacturer->getVar('manu_commercialname') . ' ' . $manufacturer->getVar('manu_name');
}
$search = array('%title%', '%category%', '%author%', '%published%', '%price%', '%money%', '%hometext%', '%fulltext%', '%discountprice%', '%link%', '%product_sku%', '%product_extraid%', '%product_width%', '%product_date%', '%product_shipping_price%', '%product_stock%', '%product_unitmeasure1%', '%product_weight%', '%product_unitmeasure2%', '%product_download_url%', '%product_length%');
$replace = array($item->getVar('product_title'), $categories[$item->getVar('product_cid')]->getVar('cat_title'), implode(', ', $tblTmp), formatTimestamp($item->getVar('product_submitted'), 's'), oledrion_utils::getTTC($item->getVar('product_price'), $vats[$item->getVar('product_vat_id')]->getVar('vat_rate')), oledrion_utils::getModuleOption('money_full'), $item->getVar('product_summary'), $item->getVar('product_description'), oledrion_utils::getTTC($item->getVar('product_discount_price'), $vats[$item->getVar('product_vat_id')]->getVar('vat_rate')), $item->getLink(), $item->getVar('product_sku'), $item->getVar('product_extraid'), $item->getVar('product_width'), $item->getVar('product_date'), $item->getVar('product_shipping_price'), $item->getVar('product_stock'), $item->getVar('product_unitmeasure1'), $item->getVar('product_weight'), $item->getVar('product_unitmeasure2'), $item->getVar('product_download_url'), $item->getVar('product_length'));
$content = str_replace($search, $replace, $content);
if ($removeBr) {
$content = str_replace('<br />', "\r\n", $content);
}
if ($removeHtml) {
$content = strip_tags($content);
}
fwrite($fp, $content);
}
if (xoops_trim($footer) != '') {
fwrite($fp, $footer);
}
fclose($fp);
$newsfile = OLEDRION_NEWSLETTER_URL;
echo "<a href='{$newsfile}' target='_blank'>" . _AM_OLEDRION_NEWSLETTER_READY . "</a>";
示例2: array
oledrion_utils::loadLanguageFile('modinfo.php');
$Tpl->assign('details', $details);
$tblAuthors = $tbl_tmp = $tblManufacturersPerProduct = array();
$tblAuthors = $h_oledrion_productsmanu->getObjects(new Criteria('pm_product_id', '(' . implode(',', array_keys($products)) . ')', 'IN'), true);
foreach ($tblAuthors as $item) {
$tbl_tmp[] = $item->getVar('pm_manu_id');
$tblManufacturersPerProduct[$item->getVar('pm_product_id')][] = $item;
}
$tbl_tmp = array_unique($tbl_tmp);
$tblAuthors = $h_oledrion_manufacturer->getObjects(new Criteria('manu_id', '(' . implode(',', $tbl_tmp) . ')', 'IN'), true);
foreach ($products as $item) {
$tbl_tmp = array();
$tbl_tmp = $item->toArray();
$tbl_tmp['product_category'] = isset($tbl_categories[$item->getVar('product_cid')]) ? $tbl_categories[$item->getVar('product_cid')]->toArray() : null;
$tbl_tmp['product_price_ttc'] = oledrion_utils::getTTC($item->getVar('product_price'), $vatArray[$item->getVar('product_vat_id')]->getVar('vat_rate'), false, 's');
$tbl_tmp['product_discount_price_ttc'] = oledrion_utils::getTTC($item->getVar('product_discount_price'), $vatArray[$item->getVar('product_vat_id')]->getVar('vat_rate'), false, 's');
$tbl_join = array();
foreach ($tblManufacturersPerProduct[$item->getVar('product_id')] as $author) {
$auteur = $tblAuthors[$author->getVar('pm_manu_id')];
$tbl_join[] = $auteur->getVar('manu_commercialname') . ' ' . $auteur->getVar('manu_name');
}
if (count($tbl_join) > 0) {
$tbl_tmp['product_joined_manufacturers'] = implode(', ', $tbl_join);
}
$Tpl->append('products', $tbl_tmp);
}
}
$content1 = utf8_encode($Tpl->fetch('db:oledrion_pdf_catalog.html'));
if (oledrion_utils::getModuleOption('use_price')) {
$content2 = utf8_encode($Tpl->fetch('db:oledrion_purchaseorder.html'));
} else {
示例3: array
}
// Deux c'est mieux *******************************************************************************
$count = oledrion_utils::getModuleOption('better_together');
$xoopsTpl->assign('better_together', $count);
if ($count > 0) {
$productWith = 0;
// On recherche le produit qui s'est le plus vendu avec ce produit
$productWith = $h_oledrion_caddy->getBestWith($product->getVar('product_id'));
if ($productWith > 0) {
$tmpProduct = null;
$tmpProduct = $h_oledrion_products->get($productWith);
if (is_object($tmpProduct)) {
$tmp = array();
$tmp = $tmpProduct->toArray();
$tmp['product_price_ttc'] = oledrion_utils::getTTC($tmpProduct->getVar('product_price'), $tblVat[$tmpProduct->getVar('product_vat_id')]->getVar('vat_rate'));
$tmp['product_discount_price_ttc'] = oledrion_utils::getTTC($tmpProduct->getVar('product_discount_price'), $tblVat[$tmpProduct->getVar('product_vat_id')]->getVar('vat_rate'));
$xoopsTpl->assign('bestwith', $tmp);
}
}
}
// Notation produit *********************************************************************************
if (oledrion_utils::getModuleOption('rateproducts') == 1) {
$canRate = true;
if ($currentUser != 0) {
$canRate = !$h_oledrion_votedata->hasUserAlreadyVoted($currentUser, $product->getVar('product_id'));
} else {
$canRate = !$h_oledrion_votedata->hasAnonymousAlreadyVoted('', $product->getVar('product_id'));
}
$xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
oledrion_utils::callJavascriptFile('rateit.js');
oledrion_utils::setCSS(OLEDRION_URL . 'assets/css/rateit.css');
示例4: CriteriaCompo
$ret['product_property6'] = $myrow['product_property6'];
$ret['product_property7'] = $myrow['product_property7'];
$ret['product_property8'] = $myrow['product_property8'];
$ret['product_property9'] = $myrow['product_property9'];
$ret['product_property10'] = $myrow['product_property10'];
$ret['product_price'] = $myrow['product_price'];
if ($myrow['product_price'] == 0) {
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('attribute_product_id', $myrow['product_id']));
$attribute = oledrion_handler::getInstance()->h_oledrion_attributes->getObjects($criteria, false);
foreach ($attribute as $root) {
$ret['product_price'] = $root->getVar('attribute_default_value');
}
}
$ret['product_stock'] = $myrow['product_stock'];
$ret['product_price_ttc'] = oledrion_utils::getTTC($ret['product_price'], '');
$ret['product_count'] = $count;
$ret['product_summary'] = $myrow['product_summary'];
$xoopsTpl->append('products', $ret);
$count++;
}
unset($tempProduct);
} else {
$xoopsTpl->assign('search_results', false);
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_SEARCHFOR)));
oledrion_utils::setMetas(oledrion_utils::getModuleName() . ' - ' . _OLEDRION_SEARCHFOR, oledrion_utils::getModuleName() . ' - ' . _OLEDRION_SEARCHFOR);
}
require_once OLEDRION_PATH . 'include/product_search_form.php';
$sform = oledrion_utils::formMarkRequiredFields($sform);
$xoopsTpl->assign('search_form', $sform->render());