当前位置: 首页>>代码示例>>PHP>>正文


PHP producthelper::GetProductShowPrice方法代码示例

本文整理汇总了PHP中producthelper::GetProductShowPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::GetProductShowPrice方法的具体用法?PHP producthelper::GetProductShowPrice怎么用?PHP producthelper::GetProductShowPrice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在producthelper的用法示例。


在下文中一共展示了producthelper::GetProductShowPrice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 $related_template_data = str_replace("{relproduct_number}", $related_product[$r]->product_number, $related_template_data);
 $related_template_data = str_replace("{relproduct_s_desc}", $rp_shortdesc, $related_template_data);
 $related_template_data = str_replace("{relproduct_desc}", $rpdesc, $related_template_data);
 $manufacturer = $producthelper->getSection("manufacturer", $related_product[$r]->manufacturer_id);
 if (count($manufacturer) > 0) {
     $man_url = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=products&mid=' . $related_product[$r]->manufacturer_id . '&Itemid=' . $this->itemId);
     $manufacturerLink = "<a href='" . $man_url . "'>" . JText::_("COM_REDSHOP_VIEW_ALL_MANUFACTURER_PRODUCTS") . "</a>";
     $related_template_data = str_replace("{manufacturer_name}", $manufacturer->manufacturer_name, $related_template_data);
     $related_template_data = str_replace("{manufacturer_link}", $manufacturerLink, $related_template_data);
 } else {
     $related_template_data = str_replace("{manufacturer_name}", '', $related_template_data);
     $related_template_data = str_replace("{manufacturer_link}", '', $related_template_data);
 }
 // Show Price
 if (!$related_product[$r]->not_for_sale) {
     $related_template_data = $producthelper->GetProductShowPrice($related_product[$r]->product_id, $related_template_data, '', 0, 1);
 } else {
     $related_template_data = str_replace("{price_excluding_vat}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_price_table}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_price_novat}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_old_price}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_old_price_lbl}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_price_saving_lbl}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_price_saving}", '', $related_template_data);
     $related_template_data = str_replace("{relproduct_price}", '', $related_template_data);
 }
 // End Show Price
 $relmorelinkhref = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $related_product[$r]->product_id . '&cid=' . $related_product[$r]->cat_in_sefurl . '&Itemid=' . $this->itemId);
 $relmorelink = 'javascript:window.parent.SqueezeBox.close();window.parent.location.href="' . $relmorelinkhref . '"';
 $rmore = "<a href='" . $relmorelink . "' title='" . $related_product[$r]->product_name . "'>" . JText::_('COM_REDSHOP_READ_MORE') . "</a>";
 $related_template_data = str_replace("{read_more}", $rmore, $related_template_data);
开发者ID:,项目名称:,代码行数:31,代码来源:

示例2: sendWishlist

 public function sendWishlist($post)
 {
     $user = JFactory::getUser();
     $redshopMail = new redshopMail();
     $redhelper = new redhelper();
     $wishlist_id = JRequest::getInt('wishlist_id');
     $emailto = $post['emailto'];
     $sender = $post['sender'];
     $email = $post['email'];
     $subject = $post['subject'];
     $Itemid = $post['Itemid'];
     $producthelper = new producthelper();
     // Get data from database if not than fetch from session
     if ($user->id && $wishlist_id) {
         $query = "SELECT DISTINCT w.* ,p.* FROM " . $this->_table_prefix . "wishlist AS w " . "LEFT JOIN " . $this->_table_prefix . "wishlist_product AS pw ON w.wishlist_id=pw.wishlist_id " . "LEFT JOIN " . $this->_table_prefix . "product AS p ON p.product_id = pw.product_id " . "WHERE w.user_id = " . (int) $user->id . " " . "AND w.wishlist_id = " . (int) $wishlist_id . " ";
     } else {
         // Add this code to send wishlist while user is not loged in ...
         $prod_id = "";
         for ($add_i = 1; $add_i < $_SESSION["no_of_prod"]; $add_i++) {
             $prod_id .= (int) $_SESSION['wish_' . $add_i]->product_id . ",";
         }
         $prod_id .= (int) $_SESSION['wish_' . $add_i]->product_id;
         $query = "SELECT DISTINCT p.* FROM " . $this->_table_prefix . "product AS p " . "WHERE p.product_id IN (" . $prod_id . ")";
     }
     $MyWishlist = $this->_getList($query);
     $i = 0;
     $data = "";
     $mailbcc = null;
     $wishlist_body = $redshopMail->getMailtemplate(0, "mywishlist_mail");
     if (count($wishlist_body) > 0) {
         $wishlist_body = $wishlist_body[0];
         $data = $wishlist_body->mail_body;
         $subject = $wishlist_body->mail_subject;
         if (trim($wishlist_body->mail_bcc) != "") {
             $mailbcc = explode(",", $wishlist_body->mail_bcc);
         }
     }
     if ($data) {
         $template_d1 = explode("{product_loop_start}", $data);
         $template_d2 = explode("{product_loop_end}", $template_d1[1]);
         $wishlist_desc = $template_d2[0];
         if (strstr($data, '{product_thumb_image_2}')) {
             $tag = '{product_thumb_image_2}';
             $h_thumb = THUMB_HEIGHT_2;
             $w_thumb = THUMB_WIDTH_2;
         } elseif (strstr($data, '{product_thumb_image_3}')) {
             $tag = '{product_thumb_image_3}';
             $h_thumb = THUMB_HEIGHT_3;
             $w_thumb = THUMB_WIDTH_3;
         } elseif (strstr($data, '{product_thumb_image_1}')) {
             $tag = '{product_thumb_image_1}';
             $h_thumb = THUMB_HEIGHT;
             $w_thumb = THUMB_WIDTH;
         } else {
             $tag = '{product_thumb_image}';
             $h_thumb = THUMB_HEIGHT;
             $w_thumb = THUMB_WIDTH;
         }
         $temp_template = '';
         if (count($MyWishlist)) {
             foreach ($MyWishlist as $row) {
                 $Itemid = $redhelper->getItemid($row->product_id);
                 $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $row->product_id . '&Itemid=' . (int) $Itemid, true, -1);
                 $thum_image = $producthelper->getProductImage($row->product_id, $link, $w_thumb, $h_thumb);
                 $pname = $row->product_name;
                 $pname = $pname;
                 $wishlist_data = str_replace($tag, $thum_image, $wishlist_desc);
                 $wishlist_data = str_replace('{product_name}', $pname, $wishlist_data);
                 // Attribute ajax change
                 if (!$row->not_for_sale) {
                     $wishlist_data = $producthelper->GetProductShowPrice($row->product_id, $wishlist_data);
                 } else {
                     $wishlist_data = str_replace("{product_price}", "", $wishlist_data);
                     $wishlist_data = str_replace("{price_excluding_vat}", "", $wishlist_data);
                     $wishlist_data = str_replace("{product_price_table}", "", $wishlist_data);
                     $wishlist_data = str_replace("{product_old_price}", "", $wishlist_data);
                     $wishlist_data = str_replace("{product_price_saving}", "", $wishlist_data);
                 }
                 $temp_template .= $wishlist_data;
             }
         }
         $data = $template_d1[0] . $temp_template . $template_d2[1];
         $name = @explode('@', $emailto);
         $data = str_replace('{from}', $sender, $data);
         $data = str_replace('{name}', $name[0], $data);
         $data = str_replace('{from_name}', $sender, $data);
         $data_add = $data;
     } else {
         if (count($MyWishlist)) {
             $link = JURI::root() . "index.php?tmpl=component&option=com_redshop&view=account&layout=mywishlist&mail=1";
             foreach ($MyWishlist as $row) {
                 $data_add .= '<div class="redProductWishlist">';
                 $thum_image = "";
                 $pname = $row->product_name;
                 $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $row->product_id . '&Itemid=' . $Itemid);
                 $thum_image = $producthelper->getProductImage($row->product_id, $link, THUMB_WIDTH, THUMB_HEIGHT);
                 $data_add .= $thum_image;
                 $pname = "<div><a href='" . $link . "' >" . $pname . "</a></div>";
                 $data_add .= $pname;
                 $formatted_price = $producthelper->GetProductShowPrice($row->product_id, $wishlist_data);
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


注:本文中的producthelper::GetProductShowPrice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。