|
|
|
@ -999,7 +999,7 @@ class Information extends CI_Controller
|
|
|
|
|
{
|
|
|
|
|
$price_rule = '#ah-8,st,2#';//'#'.$meta_product_code.',st,2#';
|
|
|
|
|
$tag_price = $this->replace_price_tag($price_rule);
|
|
|
|
|
var_dump($tag_price);
|
|
|
|
|
echo 'Price: '.$tag_price;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
@ -1012,14 +1012,12 @@ class Information extends CI_Controller
|
|
|
|
|
public function replace_price_tag($price_content)
|
|
|
|
|
{
|
|
|
|
|
$price_item_array = $this->price_pregmatch($price_content);
|
|
|
|
|
var_dump($price_item_array);
|
|
|
|
|
if ( ! empty($price_item_array)) {
|
|
|
|
|
foreach ($price_item_array as $price_item) {
|
|
|
|
|
$price_date = !empty($price_item->price_date) ? $price_item->price_date : date('Y-m-d', time() + 86400 * 7); //当前时间7天后的价格
|
|
|
|
|
$price_number = '';
|
|
|
|
|
//优先读取新的价格体系
|
|
|
|
|
$price = $this->PrimeLinePrice_model->search($price_item->cli_no, 1, $price_item->cli_grade, $price_item->person_size, $price_date);
|
|
|
|
|
var_dump($price);
|
|
|
|
|
if (!empty($price)) {
|
|
|
|
|
switch (strtoupper($price_item->price_people)) {
|
|
|
|
|
case 'A':
|
|
|
|
@ -1095,7 +1093,7 @@ class Information extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$site_money = $this->currency->GetSiteMoney($price_number);
|
|
|
|
|
$site_money = $this->currency->GetSiteMoney($price_number, 'USD');
|
|
|
|
|
$site_money = $this->currency->calc_show_price($site_money);
|
|
|
|
|
//把金额格式化为带有逗号(,)方便阅读,如 12,345
|
|
|
|
|
$price_number = is_numeric($price_number) ? number_format($site_money) : $price_number;
|
|
|
|
|