本文整理汇总了PHP中formatweight函数的典型用法代码示例。如果您正苦于以下问题:PHP formatweight函数的具体用法?PHP formatweight怎么用?PHP formatweight使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatweight函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: formatweight
?>
/ <?php
print $product->basic_price_info['name'];
?>
</span></div>
<?php
}
?>
<?php
if ($this->config->product_list_show_weight && $product->product_weight > 0) {
?>
<div class="productweight"><?php
print _JSHOP_WEIGHT;
?>
: <span><?php
print formatweight($product->product_weight);
?>
</span></div>
<?php
}
?>
<?php
if ($product->delivery_time != '') {
?>
<div class="deliverytime"><?php
print _JSHOP_DELIVERY_TIME;
?>
: <span><?php
print $product->delivery_time;
?>
</span></div>
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:31,代码来源:product.php
示例2: formatweight
<tr>
<td class="weight">
<?php
if ($price->shipping_weight_to != 0) {
?>
<?php
print formatweight($price->shipping_weight_from);
?>
- <?php
print formatweight($price->shipping_weight_to);
?>
<?php
} else {
?>
<?php
print _JSHOP_FROM . " " . formatweight($price->shipping_weight_from);
?>
<?php
}
?>
</td>
<td class="price">
<?php
print formatprice($price->shipping_price);
?>
</td>
</tr>
<?php
}
?>
</table>
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:shippings.php
示例3: formatweight
</tr>
<?php
$i++;
}
?>
</table>
<?php
if ($this->config->show_weight_order) {
?>
<div class = "weightorder">
<?php
print _JSHOP_WEIGHT_PRODUCTS;
?>
: <span><?php
print formatweight($this->weight);
?>
</span>
</div>
<?php
}
?>
<?php
if ($this->config->summ_null_shipping > 0) {
?>
<div class = "shippingfree">
<?php
printf(_JSHOP_FROM_PRICE_SHIPPING_FREE, formatprice($this->config->summ_null_shipping, null, 1));
?>
</div>
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:31,代码来源:cart.php
示例4: formatweight
}
?>
<tr><td colspan="5" style="vertical-align:top;padding-bottom:10px;font-size:1px;"><div style="height:1px;border-top:1px solid #999;"></div></td></tr>
<?php
}
?>
<?php
if ($this->show_weight_order && $this->config->show_weight_order) {
?>
<tr>
<td colspan="5" style="text-align:right;font-size:11px;">
<?php
print _JSHOP_WEIGHT_PRODUCTS;
?>
: <span><?php
print formatweight($this->order->weight);
?>
</span>
</td>
</tr>
<?php
}
?>
<?php
if ($this->show_total_info) {
?>
<tr>
<td colspan="5"> </td>
</tr>
<?php
if (!$this->hide_subtotal) {
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:orderemail.php
示例5: generatePDF
//.........这里部分代码省略.........
if ($y > 250) {
$pdf->addNewPage();
$y = 60;
}
$deliverytimes = JSFactory::getAllDeliveryTime();
$delivery = $deliverytimes[$order->delivery_times_id];
if ($delivery == "") {
$delivery = $order->delivery_time;
}
$y = $y + 8;
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, _JSHOP_ORDER_DELIVERY_TIME . ": " . $delivery, '0', 'L');
}
if ($jshopConfig->show_delivery_date && !datenull($order->delivery_date)) {
if ($y > 250) {
$pdf->addNewPage();
$y = 60;
}
$delivery_date_f = formatdate($order->delivery_date);
$y = $y + 6;
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, _JSHOP_DELIVERY_DATE . ": " . $delivery_date_f, '0', 'L');
}
if ($jshopConfig->weight_in_invoice) {
if ($y > 250) {
$pdf->addNewPage();
$y = 60;
}
$y = $y + 6;
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, _JSHOP_WEIGHT_PRODUCTS . ": " . formatweight($order->weight), '0', 'L');
}
if (!$jshopConfig->without_payment && $jshopConfig->payment_in_invoice) {
if ($y > 240) {
$pdf->addNewPage();
$y = 60;
}
$y = $y + 6;
$pdf->SetFont('freesansb', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, _JSHOP_PAYMENT_INFORMATION, '0', 'L');
$y = $y + 4;
$pdf->SetFont('freesans', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, $order->payment_name, '0', 'L');
$payment_descr = trim(trim($order->payment_information) . "\n" . $order->payment_description);
if ($payment_descr != '') {
$y = $y + 4;
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, strip_tags($payment_descr), '0', 'L');
$y = $pdf->getY() - 4;
}
}
if (!$jshopConfig->without_shipping && $jshopConfig->shipping_in_invoice) {
if ($y > 250) {
$pdf->addNewPage();
$y = 60;
}
$y = $y + 6;
$pdf->SetFont('freesansb', '', 7);
$pdf->SetXY(20, $y);
$pdf->MultiCell(170, 4, _JSHOP_SHIPPING_INFORMATION, '0', 'L');
$y = $y + 4;
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:67,代码来源:generete_pdf_order.php
示例6: formatweight
?>
/ <?php
echo $product->basic_price_info['name'];
?>
</span></div>
<?php
}
?>
<?php
if ($this->config->product_list_show_weight && $product->product_weight > 0) {
?>
<div class="productweight"><?php
echo _JSHOP_WEIGHT;
?>
.: <span><?php
echo formatweight($product->product_weight);
?>
</span></div>
<?php
}
?>
<?php
if ($product->delivery_time != '') {
?>
<div class="deliverytime"><?php
echo _JSHOP_DELIVERY_TIME;
?>
: <span><?php
echo $product->delivery_time;
?>
</span></div>
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:31,代码来源:product.php
示例7: formatweight
: <?php
print $this->product->delivery_time;
?>
</div>
<?php
}
?>
<?php
if ($this->config->product_show_weight && $this->product->product_weight > 0) {
?>
<div class="productweight"><?php
print _JSHOP_WEIGHT;
?>
: <span id="block_weight"><?php
print formatweight($this->product->getWeight());
?>
</span></div>
<?php
}
?>
<?php
if ($this->product->product_basic_price_show) {
?>
<div class="prod_base_price"><?php
print _JSHOP_BASIC_PRICE;
?>
: <span id="block_basic_price"><?php
print formatprice($this->product->product_basic_price_calculate);
?>
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:31,代码来源:product_default.php
示例8: getLoadProductData
public function getLoadProductData()
{
$jshopConfig = JSFactory::getConfig();
$dispatcher = JDispatcher::getInstance();
$product = $this->product;
$product->load($this->product_id);
$dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
$attributes = $product->getInitLoadAttribute($this->attribs);
$product->setFreeAttributeActive($this->freeattr);
$rows = array();
foreach ($attributes as $k => $v) {
$rows['id_' . $k] = $v->selects;
}
$pricefloat = $product->getPrice($this->qty, 1, 1, 1);
$price = formatprice($pricefloat);
$available = intval($product->getQty() > 0);
$displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
$ean = $product->getEan();
$weight = formatweight($product->getWeight());
$basicprice = formatprice($product->getBasicPrice());
$rows['price'] = $price;
$rows['pricefloat'] = $pricefloat;
$rows['available'] = $available;
$rows['ean'] = $ean;
if ($jshopConfig->admin_show_product_basic_price) {
$rows['basicprice'] = $basicprice;
}
if ($jshopConfig->product_show_weight) {
$rows['weight'] = $weight;
}
if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
$rows['pricedefault'] = formatprice($product->product_price_default);
}
if ($jshopConfig->product_show_qty_stock) {
$qty_in_stock = getDataProductQtyInStock($product);
$rows['qty'] = sprintQtyInStock($qty_in_stock);
}
$product->updateOtherPricesIncludeAllFactors();
if (is_array($product->product_add_prices)) {
foreach ($product->product_add_prices as $k => $v) {
$rows['pq_' . $v->product_quantity_start] = formatprice($v->price);
}
}
if ($product->product_old_price) {
$old_price = formatprice($product->product_old_price);
$rows['oldprice'] = $old_price;
}
$rows['displaybuttons'] = $displaybuttons;
if ($jshopConfig->hide_delivery_time_out_of_stock) {
$rows['showdeliverytime'] = $product->getDeliveryTimeId();
}
if ($jshopConfig->use_extend_attribute_data) {
$template_path = $jshopConfig->template_path . $jshopConfig->template . "/product";
$images = $product->getImages();
$videos = $product->getVideos();
$demofiles = $product->getDemoFiles();
if (!file_exists($template_path . "/block_image_thumb.php")) {
$tmp = array();
foreach ($images as $img) {
$tmp[] = $img->image_name;
}
$displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
$rows['images'] = $tmp;
$rows['displayimgthumb'] = $displayimgthumb;
}
$view = $this->getView("product");
$view->setLayout("demofiles");
$view->assign('config', $jshopConfig);
$view->assign('demofiles', $demofiles);
$demofiles = $view->loadTemplate();
$rows['demofiles'] = $demofiles;
if (file_exists($template_path . "/block_image_thumb.php")) {
$product->getDescription();
$view = $this->getView("product");
$view->setLayout("block_image_thumb");
$view->assign('config', $jshopConfig);
$view->assign('images', $images);
$view->assign('videos', $videos);
$view->assign('image_product_path', $jshopConfig->image_product_live_path);
$dispatcher->trigger('onBeforeDisplayProductViewBlockImageThumb', array(&$view));
$block_image_thumb = $view->loadTemplate();
$view = $this->getView("product");
$view->setLayout("block_image_middle");
$view->assign('config', $jshopConfig);
$view->assign('images', $images);
$view->assign('videos', $videos);
$view->assign('product', $product);
$view->assign('noimage', $jshopConfig->noimage);
$view->assign('image_product_path', $jshopConfig->image_product_live_path);
$view->assign('path_to_image', $jshopConfig->live_path . 'images/');
$dispatcher->trigger('onBeforeDisplayProductViewBlockImageMiddle', array(&$view));
$block_image_middle = $view->loadTemplate();
$rows['block_image_thumb'] = $block_image_thumb;
$rows['block_image_middle'] = $block_image_middle;
}
}
$dispatcher->trigger('onBeforeDisplayAjaxAttribRows', array(&$rows, &$this));
return $rows;
}
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:99,代码来源:productajaxrequest.php
示例9: ajax_attrib_select_and_price
/**
* get attributes html selects, price for select attribute
*/
function ajax_attrib_select_and_price()
{
$db = JFactory::getDBO();
$jshopConfig = JSFactory::getConfig();
$product_id = JRequest::getInt('product_id');
$change_attr = JRequest::getInt('change_attr');
if ($jshopConfig->use_decimal_qty) {
$qty = floatval(str_replace(",", ".", JRequest::getVar('qty', 1)));
} else {
$qty = JRequest::getInt('qty', 1);
}
if ($qty < 0) {
$qty = 0;
}
$attribs = JRequest::getVar('attr');
if (!is_array($attribs)) {
$attribs = array();
}
$freeattr = JRequest::getVar('freeattr');
if (!is_array($freeattr)) {
$freeattr = array();
}
JPluginHelper::importPlugin('jshoppingproducts');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib', array(&$product_id, &$change_attr, &$qty, &$attribs, &$freeattr));
$product = JTable::getInstance('product', 'jshop');
$product->load($product_id);
$dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
$attributesDatas = $product->getAttributesDatas($attribs);
$product->setAttributeActive($attributesDatas['attributeActive']);
$attributeValues = $attributesDatas['attributeValues'];
$product->setFreeAttributeActive($freeattr);
$attributes = $product->getBuildSelectAttributes($attributeValues, $attributesDatas['attributeSelected']);
$rows = array();
foreach ($attributes as $k => $v) {
$v->selects = str_replace(array("\n", "\r", "\t"), "", $v->selects);
$rows[] = '"id_' . $k . '":"' . str_replace('"', '\\"', $v->selects) . '"';
}
$pricefloat = $product->getPrice($qty, 1, 1, 1);
$price = formatprice($pricefloat);
$available = intval($product->getQty() > 0);
$displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
$ean = $product->getEan();
$weight = formatweight($product->getWeight());
$basicprice = formatprice($product->getBasicPrice());
$rows[] = '"price":"' . $price . '"';
$rows[] = '"pricefloat":"' . $pricefloat . '"';
$rows[] = '"available":"' . $available . '"';
$rows[] = '"ean":"' . $ean . '"';
if ($jshopConfig->admin_show_product_basic_price) {
$rows[] = '"basicprice":"' . $basicprice . '"';
}
if ($jshopConfig->product_show_weight) {
$rows[] = '"weight":"' . $weight . '"';
}
if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
$rows[] = '"pricedefault":"' . formatprice($product->product_price_default) . '"';
}
if ($jshopConfig->product_show_qty_stock) {
$qty_in_stock = getDataProductQtyInStock($product);
$rows[] = '"qty":"' . sprintQtyInStock($qty_in_stock) . '"';
}
$product->updateOtherPricesIncludeAllFactors();
if (is_array($product->product_add_prices)) {
foreach ($product->product_add_prices as $k => $v) {
$rows[] = '"pq_' . $v->product_quantity_start . '":"' . str_replace('"', '\\"', formatprice($v->price)) . '"';
}
}
if ($product->product_old_price) {
$old_price = formatprice($product->product_old_price);
$rows[] = '"oldprice":"' . $old_price . '"';
}
$rows[] = '"displaybuttons":"' . $displaybuttons . '"';
if ($jshopConfig->use_extend_attribute_data) {
$images = $product->getImages();
$videos = $product->getVideos();
$demofiles = $product->getDemoFiles();
$tmp = array();
foreach ($images as $img) {
$tmp[] = '"' . $img->image_name . '"';
}
$displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
$rows[] = '"images":[' . implode(",", $tmp) . '],"displayimgthumb":"' . $displayimgthumb . '"';
$view_name = "product";
$view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
$view = $this->getView($view_name, getDocumentType(), '', $view_config);
$view->setLayout("demofiles");
$view->assign('config', $jshopConfig);
$view->assign('demofiles', $demofiles);
$demofiles = $view->loadTemplate();
$demofiles = str_replace(array("\n", "\r", "\t"), "", $demofiles);
$rows[] = '"demofiles":"' . str_replace('"', '\\"', $demofiles) . '"';
}
$dispatcher->trigger('onBeforeDisplayAjaxAttrib', array(&$rows, &$product));
print '{' . implode(",", $rows) . '}';
die;
}
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:100,代码来源:product.php
示例10: ajax_attrib_select_and_price
/**
* get attributes html selects, price for select attribute
*/
function ajax_attrib_select_and_price()
{
$db = JFactory::getDBO();
$jshopConfig = JSFactory::getConfig();
$product_id = JRequest::getInt('product_id');
$change_attr = JRequest::getInt('change_attr');
if ($jshopConfig->use_decimal_qty) {
$qty = floatval(str_replace(",", ".", JRequest::getVar('qty', 1)));
} else {
$qty = JRequest::getInt('qty', 1);
}
if ($qty < 0) {
$qty = 0;
}
$attribs = JRequest::getVar('attr');
if (!is_array($attribs)) {
$attribs = array();
}
$freeattr = JRequest::getVar('freeattr');
if (!is_array($freeattr)) {
$freeattr = array();
}
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib', array(&$product_id, &$change_attr, &$qty, &$attribs, &$freeattr));
$product = JSFactory::getTable('product', 'jshop');
$product->load($product_id);
$dispatcher->trigger('onBeforeLoadDisplayAjaxAttrib2', array(&$product));
$attributesDatas = $product->getAttributesDatas($attribs);
$product->setAttributeActive($attributesDatas['attributeActive']);
$attributeValues = $attributesDatas['attributeValues'];
$product->setFreeAttributeActive($freeattr);
$attributes = $product->getBuildSelectAttributes($attributeValues, $attributesDatas['attributeSelected']);
$rows = array();
foreach ($attributes as $k => $v) {
$rows[] = '"id_' . $k . '":"' . json_value_encode($v->selects, 1) . '"';
}
$pricefloat = $product->getPrice($qty, 1, 1, 1);
$price = formatprice($pricefloat);
$available = intval($product->getQty() > 0);
$displaybuttons = intval(intval($product->getQty() > 0) || $jshopConfig->hide_buy_not_avaible_stock == 0);
$ean = $product->getEan();
$weight = formatweight($product->getWeight());
$basicprice = formatprice($product->getBasicPrice());
$min_kolichestvo = $product->min_kolichestvo;
$rows[] = '"price":"' . json_value_encode($price) . '"';
$rows[] = '"pricefloat":"' . $pricefloat . '"';
$rows[] = '"available":"' . $available . '"';
$rows[] = '"min_kolichestvo":"' . $min_kolichestvo . '"';
$rows[] = '"ean":"' . json_value_encode($ean) . '"';
if ($jshopConfig->admin_show_product_basic_price) {
$rows[] = '"basicprice":"' . json_value_encode($basicprice) . '"';
}
if ($jshopConfig->product_show_weight) {
$rows[] = '"weight":"' . json_value_encode($weight) . '"';
}
if ($jshopConfig->product_list_show_price_default && $product->product_price_default > 0) {
$rows[] = '"pricedefault":"' . json_value_encode(formatprice($product->product_price_default)) . '"';
}
if ($jshopConfig->product_show_qty_stock) {
$qty_in_stock = getDataProductQtyInStock($product);
$rows[] = '"qty":"' . json_value_encode(sprintQtyInStock($qty_in_stock)) . '"';
}
$product->updateOtherPricesIncludeAllFactors();
if (is_array($product->product_add_prices)) {
foreach ($product->product_add_prices as $k => $v) {
$rows[] = '"pq_' . $v->product_quantity_start . '":"' . json_value_encode(formatprice($v->price)) . '"';
}
}
if ($product->product_old_price) {
$old_price = formatprice($product->product_old_price);
$rows[] = '"oldprice":"' . json_value_encode($old_price) . '"';
}
$rows[] = '"displaybuttons":"' . $displaybuttons . '"';
if ($jshopConfig->hide_delivery_time_out_of_stock) {
$rows[] = '"showdeliverytime":"' . $product->getDeliveryTimeId() . '"';
}
if ($jshopConfig->use_extend_attribute_data) {
$template_path = $jshopConfig->template_path . $jshopConfig->template . "/product";
$images = $product->getImages();
$videos = $product->getVideos();
$demofiles = $product->getDemoFiles();
$tmp = array();
foreach ($images as $img) {
$tmp[] = '"' . $img->image_name . '"';
}
if (!file_exists($template_path . "/block_image_thumb.php")) {
$displayimgthumb = intval(count($images) > 1 || count($videos) && count($images));
$rows[] = '"images":[' . implode(",", $tmp) . '],"displayimgthumb":"' . $displayimgthumb . '"';
}
$view_name = "product";
$view_config = array("template_path" => $template_path);
$view = $this->getView($view_name, getDocumentType(), '', $view_config);
$view->setLayout("demofiles");
$view->assign('config', $jshopConfig);
$view->assign('demofiles', $demofiles);
$demofiles = $view->loadTemplate();
$rows[] = '"demofiles":"' . json_value_encode($demofiles, 1) . '"';
//.........这里部分代码省略.........
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:101,代码来源:product.php
示例11: formatweight
}
?>
</tbody>
</table>
<?php
if ($this->config->show_weight_order) {
?>
<div class="weightorder">
<?php
echo _JSHOP_WEIGHT_PRODUCTS;
?>
: <span><?php
echo formatweight($this->order->weight);
?>
</span>
</div>
<?php
}
?>
<table class="jshop jshop_subtotal">
<?php
if (!$this->hide_subtotal) {
?>
<tr>
<td class="name">
<?php
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:31,代码来源:order.php
示例12: formatweight
$i++;
}
?>
</tbody>
</table>
<?php
if ($this->config->show_weight_order) {
?>
<div class="weightorder">
<?php
echo _JSHOP_WEIGHT_PRODUCTS;
?>
: <span><?php
echo formatweight($this->weight);
?>
</span>
</div>
<?php
}
?>
<table class="jshop jshop_subtotal">
<?php
if (!$this->hide_subtotal) {
?>
<tr class="subtotal">
<td class="name">
<?php
echo _JSHOP_SUBTOTAL;
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:31,代码来源:checkout.php
注:本文中的formatweight函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论