本文整理汇总了PHP中producthelper::getUserProductSubscriptionDetail方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getUserProductSubscriptionDetail方法的具体用法?PHP producthelper::getUserProductSubscriptionDetail怎么用?PHP producthelper::getUserProductSubscriptionDetail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::getUserProductSubscriptionDetail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
}
}
if ($product_image_path) {
$thumbUrl = RedShopHelperImages::getImagePath($product_image_path, '', 'thumb', 'product', CART_THUMB_WIDTH, CART_THUMB_HEIGHT, USE_IMAGE_SIZE_SWAPPING);
$product_image = "<div class='product_image'><img src='" . $thumbUrl . "'></div>";
} else {
$product_image = "<div class='product_image'></div>";
}
$cart_mdata = str_replace("{product_name}", $product_name, $template_middle);
$cart_mdata = str_replace("{product_thumb_image}", $product_image, $cart_mdata);
$cart_mdata = str_replace("{product_attribute}", $OrderProducts[$i]->product_attribute, $cart_mdata);
$cart_mdata = str_replace("{product_accessory}", $OrderProducts[$i]->product_accessory, $cart_mdata);
$cart_mdata = str_replace("{product_wrapper}", '', $cart_mdata);
$cart_mdata = str_replace("{product_number}", $product_number, $cart_mdata);
$cart_mdata = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER'), $cart_mdata);
$user_subscribe_detail = $producthelper->getUserProductSubscriptionDetail($OrderProducts[$i]->order_item_id);
if (count($user_subscribe_detail) > 0 && $user_subscribe_detail->subscription_id) {
$subscription_detail = $producthelper->getProductSubscriptionDetail($OrderProducts[$i]->product_id, $user_subscribe_detail->subscription_id);
$selected_subscription = $subscription_detail->subscription_period . " " . $subscription_detail->period_type;
$cart_mdata = str_replace("{product_subscription_lbl}", JText::_('COM_REDSHOP_SUBSCRIPTION'), $cart_mdata);
$cart_mdata = str_replace("{product_subscription}", $selected_subscription, $cart_mdata);
} else {
$cart_mdata = str_replace("{product_subscription_lbl}", "", $cart_mdata);
$cart_mdata = str_replace("{product_subscription}", "", $cart_mdata);
}
$cart_mdata = str_replace("{product_userfields}", $product_userfields, $cart_mdata);
$cart_mdata = str_replace("{product_note}", $product_note, $cart_mdata);
$cart_mdata = str_replace("{product_price}", $product_price, $cart_mdata);
$cart_mdata = str_replace("{product_quantity}", $product_quantity, $cart_mdata);
$cart_mdata = str_replace("{product_total_price}", $product_total_price, $cart_mdata);
$cart_tr .= $cart_mdata;
示例2: createMultiprintInvoicePdf
//.........这里部分代码省略.........
$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);
$product_image = '<div class="product_image"><img src="' . $thumbUrl . '"></div>';
} else {
$product_image = "<div class='product_image'></div>";
}
$cart_mdata = str_replace("{product_name}", $product_name, $template_middle);
$cart_mdata = str_replace("{product_thumb_image}", $product_image, $cart_mdata);
$cart_mdata = str_replace("{product_attribute}", $OrderProducts[$i]->product_attribute, $cart_mdata);
$cart_mdata = str_replace("{product_accessory}", $OrderProducts[$i]->product_accessory, $cart_mdata);
$cart_mdata = str_replace("{product_wrapper}", '', $cart_mdata);
$cart_mdata = str_replace("{product_number}", $product_number, $cart_mdata);
$cart_mdata = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER'), $cart_mdata);
$user_subscribe_detail = $producthelper->getUserProductSubscriptionDetail($OrderProducts[$i]->order_item_id);
if (count($user_subscribe_detail) > 0 && $user_subscribe_detail->subscription_id) {
$subscription_detail = $producthelper->getProductSubscriptionDetail($OrderProducts[$i]->product_id, $user_subscribe_detail->subscription_id);
$selected_subscription = $subscription_detail->subscription_period . " " . $subscription_detail->period_type;
$cart_mdata = str_replace("{product_subscription_lbl}", JText::_('COM_REDSHOP_SUBSCRIPTION'), $cart_mdata);
$cart_mdata = str_replace("{product_subscription}", $selected_subscription, $cart_mdata);
} else {
$cart_mdata = str_replace("{product_subscription_lbl}", "", $cart_mdata);
$cart_mdata = str_replace("{product_subscription}", "", $cart_mdata);
}
$cart_mdata = str_replace("{product_userfields}", $product_userfields, $cart_mdata);
$cart_mdata = str_replace("{product_wrapper}", $product_note, $cart_mdata);
$cart_mdata = str_replace("{product_price}", $product_price, $cart_mdata);
$cart_mdata = str_replace("{product_quantity}", $product_quantity, $cart_mdata);
$cart_mdata = str_replace("{product_total_price}", $product_total_price, $cart_mdata);
$cart_tr .= $cart_mdata;
}
$ordersprint_template = $template_start . $cart_tr . $template_end;
$search[] = "{order_subtotal}";
$replace[] = $producthelper->getProductFormattedPrice($OrdersDetail[0]->order_subtotal);
if ($OrdersDetail[0]->order_tax <= 0) {
$template_vat_sdata = explode('{if vat}', $ordersprint_template);
$template_vat_start = $template_vat_sdata[0];
$template_vat_edata = explode('{vat end if}', $template_vat_sdata[1]);
$template_vat_end = $template_vat_edata[1];
$template_vat_middle = $template_vat_edata[0];
$ordersprint_template = $template_vat_start . $template_vat_end;
} else {
$search[] = "{if vat}";
$replace[] = '';
$search[] = "{order_tax}";
$replace[] = $producthelper->getProductFormattedPrice($OrdersDetail[0]->order_tax);
$search[] = "{tax}";