當前位置: 首頁>>代碼示例>>PHP>>正文


PHP producthelper::getUserProductSubscriptionDetail方法代碼示例

本文整理匯總了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;
開發者ID:,項目名稱:,代碼行數:31,代碼來源:

示例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}";
開發者ID:jaanusnurmoja,項目名稱:redjoomla,代碼行數:67,代碼來源:mail.php


注:本文中的producthelper::getUserProductSubscriptionDetail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。