本文整理汇总了PHP中producthelper::getuserfield方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getuserfield方法的具体用法?PHP producthelper::getuserfield怎么用?PHP producthelper::getuserfield使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::getuserfield方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
$template_start = $template_sdata[0];
$template_edata = explode('{product_loop_end}', $template_sdata[1]);
$template_end = $template_edata[1];
$template_middle = $template_edata[0];
}
$cart_tr = '';
for ($i = 0; $i < count($OrderProducts); $i++) {
$wrapper_name = "";
if ($OrderProducts[$i]->wrapper_id) {
$wrapper = $producthelper->getWrapper($OrderProducts[$i]->product_id, $OrderProducts[$i]->wrapper_id);
if (count($wrapper) > 0) {
$wrapper_name = JText::_('COM_REDSHOP_WRAPPER') . ":<br/>" . $wrapper[0]->wrapper_name . "(" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->wrapper_price) . ")";
}
}
if ($OrderProducts[$i]->is_giftcard == 1) {
$product_userfields = $producthelper->getuserfield($OrderProducts[$i]->order_item_id, 13);
} else {
$product_userfields = $producthelper->getuserfield($OrderProducts[$i]->order_item_id);
}
$product_name = "<div class='product_name'>" . $OrderProducts[$i]->order_item_name . "</div>";
$product = $producthelper->getProductById($OrderProducts[$i]->product_id);
$product_number = $OrderProducts[$i]->order_item_sku;
$product_note = "<div class='product_note'>" . $wrapper_name . "</div>";
$product_total_price = "<div class='product_total_price'>" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->product_final_price) . "</div>";
$product_price = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->product_item_price) . "</div>";
$product_quantity = '<div class="product_quantity">' . $OrderProducts[$i]->product_quantity . '</div>';
$cart_mdata = '';
$product_image_path = '';
if ($product->product_full_image) {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $product->product_full_image)) {
$product_image_path = $product->product_full_image;
示例2: array
<?php
$ordervolume = 0;
$cart = array();
$subtotal_excl_vat = 0;
for ($i = 0; $i < count($products); $i++) {
$cart[$i]['product_id'] = $products[$i]->product_id;
$cart[$i]['quantity'] = $products[$i]->product_quantity;
$quantity = $products[$i]->product_quantity;
$product_id = $products[$i]->product_id;
$productdetail = $producthelper->getProductById($product_id);
$ordervolume = $ordervolume + $productdetail->product_volume;
$order_item_id = $products[$i]->order_item_id;
$order_item_name = $products[$i]->order_item_name;
$order_item_sku = $products[$i]->order_item_sku;
$wrapper_id = $products[$i]->wrapper_id;
$p_userfield = $producthelper->getuserfield($order_item_id);
$subscribe_detail = $model->getUserProductSubscriptionDetail($order_item_id);
$catId = $producthelper->getCategoryProduct($product_id);
$res = $producthelper->getSection("category", $catId);
if (count($res) > 0) {
$cname = $res->category_name;
$clink = JRoute::_($url . 'index.php?option=com_redshop&view=category&layout=detail&cid=' . $catId);
}
$cname = "<a href='" . $clink . "'>" . $cname . "</a>";
$Product_name = $order_item_name . '<br>' . $order_item_sku . '<br>' . $p_userfield . '<br>' . $cname;
$subtotal_excl_vat += $products[$i]->product_item_price_excl_vat * $quantity;
$vat = $products[$i]->product_item_price - $products[$i]->product_item_price_excl_vat;
?>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" class="adminlist" width="100%">
示例3: createMultiprintInvoicePdf
//.........这里部分代码省略.........
$search[] = "{shipping_method}";
$replace[] = $shipping_method;
$search[] = "{shipping}";
$replace[] = $producthelper->getProductFormattedPrice($OrdersDetail[0]->order_shipping);
$search[] = "{shipping_rate_name}";
$replace[] = $shipping_rate_name;
$ordersprint_template = $carthelper->replaceBillingAddress($ordersprint_template, $billing);
$ordersprint_template = $carthelper->replaceShippingAddress($ordersprint_template, $shipping);
$product_name = "";
$product_note = "";
$product_price = "";
$product_quantity = "";
$product_total_price = "";
$template_start = "";
$template_middle = "";
$template_end = "";
if (strstr($ordersprint_template, "{product_loop_start}")) {
$template_sdata = explode('{product_loop_start}', $ordersprint_template);
$template_start = $template_sdata[0];
$template_edata = explode('{product_loop_end}', $template_sdata[1]);
$template_end = $template_edata[1];
$template_middle = $template_edata[0];
}
$cart_tr = '';
for ($i = 0; $i < count($OrderProducts); $i++) {
$wrapper_name = "";
if ($OrderProducts[$i]->wrapper_id) {
$wrapper = $producthelper->getWrapper($OrderProducts[$i]->product_id, $OrderProducts[$i]->wrapper_id);
if (count($wrapper) > 0) {
$wrapper_name = JText::_('COM_REDSHOP_WRAPPER') . ":<br/>" . $wrapper[0]->wrapper_name . "(" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->wrapper_price) . ")";
}
}
if ($OrderProducts[$i]->is_giftcard == 1) {
$product_userfields = $producthelper->getuserfield($OrderProducts[$i]->order_item_id, 13);
} else {
$product_userfields = $producthelper->getuserfield($OrderProducts[$i]->order_item_id);
}
$product_name = "<div class='product_name'>" . $OrderProducts[$i]->order_item_name . "</div>";
$product = $producthelper->getProductById($OrderProducts[$i]->product_id);
$product_number = $OrderProducts[$i]->order_item_sku;
$product_note = "<div class='product_note'>" . $wrapper_name . "</div>";
$product_total_price = "<div class='product_total_price'>" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->product_final_price) . "</div>";
$product_price = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($OrderProducts[$i]->product_item_price) . "</div>";
$product_quantity = '<div class="product_quantity">' . $OrderProducts[$i]->product_quantity . '</div>';
$cart_mdata = '';
$uri = JURI::getInstance();
$url = $uri->root();
if ($product->product_full_image) {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $product->product_full_image)) {
$product_image_path = $product->product_full_image;
} else {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . PRODUCT_DEFAULT_IMAGE)) {
$product_image_path = PRODUCT_DEFAULT_IMAGE;
} else {
$product_image_path = "";
}
}
} else {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . PRODUCT_DEFAULT_IMAGE)) {
$product_image_path = PRODUCT_DEFAULT_IMAGE;
} else {
$product_image_path = "";
}
}
if ($product_image_path) {
$thumbUrl = RedShopHelperImages::getImagePath($product_image_path, '', 'thumb', 'product', CART_THUMB_WIDTH, CART_THUMB_HEIGHT, USE_IMAGE_SIZE_SWAPPING);