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


PHP producthelper::getProductNotForSaleComment方法代码示例

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


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

示例1: array

                    $isChilds = true;
                    $attributes = array();
                } else {
                    $isChilds = false;
                    // Get attributes.
                    $attributes_set = array();
                    if ($product->attribute_set_id > 0) {
                        $attributes_set = $producthelper->getProductAttribute(0, $product->attribute_set_id, 0, 1);
                    }
                    $attributes = $producthelper->getProductAttribute($product->product_id);
                    $attributes = array_merge($attributes, $attributes_set);
                }
                // Product attribute - Start.
                $totalatt = count($attributes);
                // Check product for not for sale.
                $prddata_add = $producthelper->getProductNotForSaleComment($product, $prddata_add, $attributes);
                $prddata_add = $producthelper->replaceProductInStock($product->product_id, $prddata_add, $attributes, $attribute_template);
                $prddata_add = $producthelper->replaceAttributeData($product->product_id, 0, 0, $attributes, $prddata_add, $attribute_template, $isChilds);
                // Get cart tempalte.
                $prddata_add = $producthelper->replaceCartTemplate($product->product_id, $this->catid, 0, 0, $prddata_add, $isChilds, $userfieldArr, $totalatt, $totacc, $count_no_user_field);
            }
            $data_add = str_replace("{product_loop_start}", "", $data_add);
            $data_add = str_replace("{product_loop_end}", "", $data_add);
            $data_add = str_replace($template_product, $prddata_add, $data_add);
        }
    }
    $template_desc = str_replace("{category_loop_start}", "", $template_desc);
    $template_desc = str_replace("{category_loop_end}", "", $template_desc);
    $template_desc = str_replace($middletemplate_desc, $data_add, $template_desc);
}
if (strstr($template_desc, "{filter_by}")) {
开发者ID:,项目名称:,代码行数:31,代码来源:

示例2: onRSProductSearch


//.........这里部分代码省略.........
                     }
                 }
             }
             $data_add = $data_add . $hidden_userfield;
             /*************** end user fields ***************/
             // ProductFinderDatepicker Extra Field Start
             $fieldArray = $extraField->getSectionFieldList(17, 0, 0);
             $data_add = $producthelper->getProductFinderDatepickerValue($data_add, $this->search[$i]->product_id, $fieldArray);
             // ProductFinderDatepicker Extra Field End
             /*
              * manufacturer data
              */
             $manufacturer_id = $this->search[$i]->manufacturer_id;
             if ($manufacturer_id != 0) {
                 $manufacturer_data = $producthelper->getSection("manufacturer", $manufacturer_id);
                 $manufacturer_link_href = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=detail&mid=' . $manufacturer_id . '&Itemid=' . $Itemid);
                 $manufacturer_name = "";
                 if (count($manufacturer_data) > 0) {
                     $manufacturer_name = $manufacturer_data->manufacturer_name;
                 }
                 $manufacturer_link = '<a href="' . $manufacturer_link_href . '" title="' . $manufacturer_name . '">' . $manufacturer_name . '</a>';
                 if (strstr($data_add, "{manufacturer_link}")) {
                     $data_add = str_replace("{manufacturer_name}", "", $data_add);
                 } else {
                     $data_add = str_replace("{manufacturer_name}", $manufacturer_name, $data_add);
                 }
                 $data_add = str_replace("{manufacturer_link}", $manufacturer_link, $data_add);
             } else {
                 $data_add = str_replace("{manufacturer_link}", "", $data_add);
                 $data_add = str_replace("{manufacturer_name}", "", $data_add);
             }
             // End
             // Replace wishlistbutton
             $data_add = $producthelper->replaceWishlistButton($this->search[$i]->product_id, $data_add);
             // Replace compare product button
             $data_add = $producthelper->replaceCompareProductsButton($this->search[$i]->product_id, 0, $data_add);
             // Checking for child products
             $childproduct = $producthelper->getChildProduct($this->search[$i]->product_id);
             if (count($childproduct) > 0) {
                 $isChilds = true;
                 $attributes = array();
             } else {
                 $isChilds = false;
                 // Get attributes
                 $attributes_set = array();
                 if ($this->search[$i]->attribute_set_id > 0) {
                     $attributes_set = $producthelper->getProductAttribute(0, $this->search[$i]->attribute_set_id, 0, 1);
                 }
                 $attributes = $producthelper->getProductAttribute($this->search[$i]->product_id);
                 $attributes = array_merge($attributes, $attributes_set);
             }
             // Product attribute  Start
             $totalatt = count($attributes);
             // Check product for not for sale
             $data_add = $producthelper->getProductNotForSaleComment($this->search[$i], $data_add, $attributes);
             $data_add = $producthelper->replaceProductInStock($this->search[$i]->product_id, $data_add, $attributes, $attribute_template);
             $data_add = $producthelper->replaceAttributeData($this->search[$i]->product_id, 0, 0, $attributes, $data_add, $attribute_template, $isChilds);
             // Cart Template
             $data_add = $producthelper->replaceCartTemplate($this->search[$i]->product_id, 0, 0, 0, $data_add, $isChilds, $userfieldArr, $totalatt, 0, $count_no_user_field, "");
             $data .= $data_add;
         }
         $app = JFactory::getApplication();
         $router = $app->getRouter();
         $getorderby = JRequest::getVar('order_by', DEFAULT_PRODUCT_ORDERING_METHOD);
         $vars = array('option' => 'com_redshop', 'view' => 'search', 'layout' => $layout, 'keyword' => $keyword, 'manufacture_id' => $manufacture_id, 'order_by' => $getorderby, 'category_id' => $cid, 'Itemid' => $Itemid, 'limit' => $limit);
         $router->setVars($vars);
         unset($vars);
         if (strstr($template_org, "{pagination}")) {
             $pagination = new redPagination($total_product, $start, $endlimit);
             $slidertag = $pagination->getPagesLinks();
             if (strstr($template_org, "{product_display_limit}")) {
                 $slidertag = "<form action='' method='post'><input type='hidden' name='keyword' value='{$keyword}'>\n\t\t\t<input type='hidden' name='category_id' value='{$cid}'>\n\t\t\t<input type='hidden' name='manufacture_id' value='{$manufacture_id}'>\n\t\t\t<input type='hidden' name='templateid' value='{$templateid}'> " . $pagination->getListFooter() . "</form>";
                 $template_org = str_replace("{product_display_limit}", $slidertag, $template_org);
                 $template_org = str_replace("{pagination}", '', $template_org);
             }
             $template_org = str_replace("{pagination}", $slidertag, $template_org);
         }
         $template_org = str_replace("{product_display_limit}", "", $template_org);
         if (strstr($template_org, "perpagelimit:")) {
             $perpage = explode('{perpagelimit:', $template_org);
             $perpage = explode('}', $perpage[1]);
             $template_org = str_replace("{perpagelimit:" . intval($perpage[0]) . "}", "", $template_org);
         }
         $template_org = str_replace("{order_by}", $orderby_form, $template_org);
         $template_org = str_replace("{order_by_lbl}", JText::_('COM_REDSHOP_SELECT_ORDER_BY'), $template_org);
         $template_org = str_replace("{filter_by_lbl}", JText::_('COM_REDSHOP_SELECT_FILTER_BY'), $template_org);
         $template_org = str_replace("{attribute_price_with_vat}", "", $template_org);
         $template_org = str_replace("{attribute_price_without_vat}", "", $template_org);
         $template_org = str_replace("{product_loop_start}", "", $template_org);
         $template_org = str_replace("{product_loop_end}", "", $template_org);
         $template_org = str_replace($template_tmp_desc, $data, $template_org);
         $template_org = str_replace("{with_vat}", "", $template_org);
         $template_org = str_replace("{without_vat}", "", $template_org);
         $template_org = $redTemplate->parseredSHOPplugin($template_org);
         $template_org = $texts->replace_texts($template_org);
         eval("?>" . $template_org . "<?php ");
     } else {
         echo "<br><h3>" . JText::_('COM_REDSHOP_MSG_SORRY_NO_RESULT_FOUND') . "</h3>";
     }
 }
开发者ID:,项目名称:,代码行数:101,代码来源:

示例3: display


//.........这里部分代码省略.........
                 $this->document->addCustomTag($canonical);
             } else {
                 $main_url = substr_replace(JURI::root(), "", -1);
                 $main_url .= JRoute::_('index.php?option=com_redshop&view=product&layout=detail&Itemid=' . $this->itemId . '&pid=' . $this->data->product_parent_id, false);
                 $canonical = '<link rel="canonical" href="' . $main_url . '" />';
                 $this->document->addCustomTag($canonical);
             }
         }
         $productTemplate = $this->model->getProductTemplate();
         /*
          * Process the prepare Product plugins
          */
         $this->dispatcher->trigger('onPrepareProduct', array(&$productTemplate->template_desc, &$params, $this->data));
         $pagetitletag = '';
         // For page title
         if (AUTOGENERATED_SEO && SEO_PAGE_TITLE != '') {
             $pagetitletag = SEO_PAGE_TITLE;
             $pagetitletag = str_replace("{productname}", $this->data->product_name, $pagetitletag);
             $pagetitletag = str_replace("{categoryname}", $this->data->category_name, $pagetitletag);
             $pagetitletag = str_replace("{manufacturer}", $this->data->manufacturer_name, $pagetitletag);
             $pagetitletag = str_replace("{productsku}", $this->data->product_number, $pagetitletag);
             $pagetitletag = str_replace("{productnumber}", $this->data->product_number, $pagetitletag);
             $pagetitletag = str_replace("{shopname}", SHOP_NAME, $pagetitletag);
             $pagetitletag = str_replace("{productshortdesc}", strip_tags($this->data->product_s_desc), $pagetitletag);
             $pagetitletag = str_replace("{saleprice}", $prodhelperobj_array_main['product_price'], $pagetitletag);
             $parentcat = "";
             $parentid = $prodhelperobj->getParentCategory($this->data->category_id);
             while ($parentid != 0) {
                 $parentdetail = $prodhelperobj->getSection("category", $parentid);
                 $parentcat = $parentdetail->category_name . "  " . $parentcat;
                 $parentid = $prodhelperobj->getParentCategory($parentdetail->category_id);
             }
             $pagetitletag = str_replace("{parentcategoryloop}", $parentcat, $pagetitletag);
             $pagetitletag = $prodhelperobj->getProductNotForSaleComment($this->data, $pagetitletag);
         }
         if ($this->data->pagetitle != '' && AUTOGENERATED_SEO && SEO_PAGE_TITLE != '') {
             if ($this->data->append_to_global_seo == 'append') {
                 $pagetitletag .= " " . $this->data->pagetitle;
                 $this->document->setTitle($pagetitletag);
                 $this->document->setMetaData("og:title", $pagetitletag);
             } elseif ($this->data->append_to_global_seo == 'prepend') {
                 $pagetitletag = $this->data->pagetitle . " " . $pagetitletag;
                 $this->document->setTitle($pagetitletag);
                 $this->document->setMetaData("og:title", $pagetitletag);
             } elseif ($this->data->append_to_global_seo == 'replace') {
                 $this->document->setTitle($this->data->pagetitle);
                 $this->document->setMetaData("og:title", $this->data->pagetitle);
             }
         } else {
             if ($this->data->pagetitle != '') {
                 $this->document->setTitle($this->data->pagetitle);
                 $this->document->setMetaData("og:title", $this->data->pagetitle);
             } elseif (AUTOGENERATED_SEO && SEO_PAGE_TITLE != '') {
                 $this->document->setTitle($pagetitletag);
                 $this->document->setMetaData("og:title", $pagetitletag);
             } else {
                 $this->document->setTitle($this->data->product_name . " | " . $this->data->category_name . " | " . $this->app->getCfg('sitename') . " | " . $this->data->product_number);
                 $this->document->setMetaData("og:title", $this->data->product_name . " | " . $this->data->category_name . " | " . $this->app->getCfg('sitename') . " | " . $this->data->product_number);
             }
         }
         $uri = JFactory::getURI();
         $scheme = $uri->getScheme();
         $host = $uri->getHost();
         if ($this->data->product_thumb_image && file_exists(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $this->data->product_thumb_image)) {
             $this->document->setMetaData("og:image", $scheme . "://" . $host . "/components/com_redshop/assets/images/product/" . $this->data->product_thumb_image);
         } elseif ($this->data->product_full_image && file_exists(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $this->data->product_full_image)) {
开发者ID:,项目名称:,代码行数:67,代码来源:

示例4: display_products


//.........这里部分代码省略.........
                        $frmChild .= "<input type='hidden' name='cid' value='" . $row->category_id . "'>";
                        $frmChild .= "<input type='hidden' name='view' value='product'>";
                        $frmChild .= "<input type='hidden' name='option' value='com_redshop'>";
                        $frmChild .= "</form>";
                    }
                }
                $wishlist_data = str_replace("{child_products}", $frmChild, $wishlist_data);
            }
            $childproduct = $producthelper->getChildProduct($row->product_id);
            if (count($childproduct) > 0) {
                if (PURCHASE_PARENT_WITH_CHILD == 1) {
                    $isChilds = false;
                    $attributes_set = array();
                    if ($row->attribute_set_id > 0) {
                        $attributes_set = $producthelper->getProductAttribute(0, $row->attribute_set_id, 0, 1);
                    }
                    $attributes = $producthelper->getProductAttribute($row->product_id);
                    $attributes = array_merge($attributes, $wishlist_data);
                } else {
                    $isChilds = true;
                    $attributes = array();
                }
            } else {
                $isChilds = false;
                $attributes_set = array();
                if ($row->attribute_set_id > 0) {
                    $attributes_set = $producthelper->getProductAttribute(0, $row->attribute_set_id, 0, 1);
                }
                $attributes = $producthelper->getProductAttribute($row->product_id);
                $attributes = array_merge($attributes, $attributes_set);
            }
            $attribute_template = $producthelper->getAttributeTemplate($wishlist_data);
            // Check product for not for sale
            $wishlist_data = $producthelper->getProductNotForSaleComment($row, $wishlist_data, $attributes);
            $wishlist_data = $producthelper->replaceProductInStock($row->product_id, $wishlist_data, $attributes, $attribute_template);
            /////////////////////////////////// Product attribute  Start /////////////////////////////////
            $totalatt = count($attributes);
            $wishlist_data = $producthelper->replaceAttributeData($row->product_id, 0, 0, $attributes, $wishlist_data, $attribute_template, $isChilds);
            /////////////////////////////////// Product attribute  End  	// Checking for child products end/////////////////////////////////
            if (!$row->not_for_sale) {
                if ($row->product_on_sale && $product_price_discount > 0) {
                    if ($product_price > $product_price_discount) {
                        $s_price = $product_price - $product_price_discount;
                        if ($this->show_discountpricelayout) {
                            $mainproduct_price = $producthelper->getProductFormattedPrice($product_price);
                            $product_price = $product_price_discount;
                            $mainproduct_price = $producthelper->getProductFormattedPrice($product_price_discount);
                        } else {
                            $product_price = $product_price_discount;
                            $mainproduct_price = $producthelper->getProductFormattedPrice($product_price);
                        }
                    } else {
                        $mainproduct_price = $producthelper->getProductFormattedPrice($product_price);
                    }
                } else {
                    $mainproduct_price = $producthelper->getProductFormattedPrice($product_price);
                }
                $wishlist_data = str_replace('{product_price}', $mainproduct_price, $wishlist_data);
            }
            // Product User Field Start
            $count_no_user_field = 0;
            $returnArr = $producthelper->getProductUserfieldFromTemplate($wishlist_data);
            $template_userfield = $returnArr[0];
            $userfieldArr = $returnArr[1];
            if (strstr($wishlist_data, "{if product_userfield}") && strstr($wishlist_data, "{product_userfield end if}") && $template_userfield != "") {
                $ufield = "";
开发者ID:,项目名称:,代码行数:67,代码来源:


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