本文整理汇总了PHP中producthelper::redunitDecimal方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::redunitDecimal方法的具体用法?PHP producthelper::redunitDecimal怎么用?PHP producthelper::redunitDecimal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::redunitDecimal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
}
$template = str_replace('{discount_start_date}', $exp_div . $disc_start_date . $div_end . $td_end . $td_start . "{discount_start_date}", $template);
}
if (strstr($template, "{discount_end_date}")) {
$disc_end_date = "";
if ($product->discount_enddate) {
$disc_end_date = $config->convertDateFormat($product->discount_enddate);
}
$template = str_replace('{discount_end_date}', $exp_div . $disc_end_date . $div_end . $td_end . $td_start . "{discount_end_date}", $template);
}
$template = str_replace('{product_s_desc}', $exp_div . $product->product_s_desc . $div_end . $td_end . $td_start . "{product_s_desc}", $template);
$template = str_replace('{product_desc}', $exp_div . $product->product_desc . $div_end . $td_end . $td_start . "{product_desc}", $template);
$product_number_output = '<span id="product_number_variable' . $product->product_id . '">' . $product->product_number . '</span>';
$template = str_replace('{product_number}', $exp_div . $product->product_number . $div_end . $td_end . $td_start . "{product_number}", $template);
$product_weight_unit = '<span class="product_unit_variable">' . DEFAULT_WEIGHT_UNIT . '</span>';
$template = str_replace('{product_weight}', $exp_div . $producthelper->redunitDecimal($product->weight) . " " . $product_weight_unit . $div_end . $td_end . $td_start . "{product_weight}", $template);
$product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>';
$template = str_replace('{product_length}', $exp_div . $producthelper->redunitDecimal($product->product_length) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_length}", $template);
$template = str_replace('{product_height}', $exp_div . $producthelper->redunitDecimal($product->product_height) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_height}", $template);
$template = str_replace('{product_width}', $exp_div . $producthelper->redunitDecimal($product->product_width) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_width}", $template);
$product_volume_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . "3" . '</span>';
$template = str_replace('{product_volume}', $exp_div . $producthelper->redunitDecimal($product->product_volume) . " " . $product_volume_unit . $div_end . $td_end . $td_start . "{product_volume}", $template);
if (strstr($template, "{product_price}")) {
$price = 0;
if (SHOW_PRICE && !USE_AS_CATALOG && (!DEFAULT_QUOTATION_MODE || DEFAULT_QUOTATION_MODE && SHOW_QUOTATION_PRICE)) {
$price = $producthelper->getProductFormattedPrice($product->product_price);
}
$template = str_replace('{product_price}', $exp_div . $price . $div_end . $td_end . $td_start . "{product_price}", $template);
}
if (strstr($template, "{product_rating_summary}")) {
$final_avgreview_data = $producthelper->getProductRating($compare[$i]["product_id"]);
示例2: elseif
$prevbutton = '<a href="' . $prevlink . '">' . DAFULT_PREVIOUS_LINK_PREFIX . "" . $previousproducts->product_name . '</a>';
} elseif (DEFAULT_LINK_FIND == 1) {
$prevbutton = '<a href="' . $prevlink . '">' . CUSTOM_PREVIOUS_LINK_FIND . '</a>';
} elseif (file_exists(REDSHOP_FRONT_IMAGES_RELPATH . IMAGE_PREVIOUS_LINK_FIND)) {
$prevbutton = '<a href="' . $prevlink . '"><img src="' . REDSHOP_FRONT_IMAGES_ABSPATH . IMAGE_PREVIOUS_LINK_FIND . '" /></a>';
}
// End
}
$template_desc = str_replace('{navigation_link_right}', $nextbutton, $template_desc);
$template_desc = str_replace('{navigation_link_left}', $prevbutton, $template_desc);
}
/*
* product size variables
*/
$product_volume = "";
$product_volume .= '<span class="length_number">' . $producthelper->redunitDecimal($this->data->product_length) . '</span>';
$product_volume .= '<span class="length_unit">' . DEFAULT_VOLUME_UNIT . '</span>';
$product_volume .= '<span class="separator">X</span>';
$product_volume .= '<span class="width_number">' . $producthelper->redunitDecimal($this->data->product_width) . '</span>';
$product_volume .= '<span class="width_unit">' . DEFAULT_VOLUME_UNIT . '</span>';
$product_volume .= '<span class="separator">X</span>';
$product_volume .= '<span class="height_number">' . $producthelper->redunitDecimal($this->data->product_height) . '</span>';
$product_volume .= '<span class="height_unit">' . DEFAULT_VOLUME_UNIT . '</span>';
$template_desc = str_replace('{product_size}', $product_volume, $template_desc);
if (DEFAULT_VOLUME_UNIT) {
$product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>';
} else {
$product_unit = '';
}
// Product length
if ($this->data->product_length > 0) {