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


PHP oledrion_utils::makeInfotips方法代码示例

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


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

示例1: toArray

 /**
  * Retourne les éléments du produits formatés pour affichage
  *
  * @param  string $format Le format à utiliser
  * @return array  Les informations formatées
  */
 public function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     $oledrion_Currency = oledrion_Currency::getInstance();
     $ttc = $finalPriceTTC = $this->getTTC();
     $finalPriceHT = floatval($this->getVar('product_price'));
     $ret['product_ecotaxe_formated'] = $oledrion_Currency->amountForDisplay($this->getVar('product_ecotaxe'));
     $ret['product_price_formated'] = $oledrion_Currency->amountForDisplay($this->getVar('product_price', 'e'));
     $ret['product_shipping_price_formated'] = $oledrion_Currency->amountForDisplay($this->getVar('product_shipping_price', 'e'));
     $ret['product_discount_price_formated'] = $oledrion_Currency->amountForDisplay($this->getVar('product_discount_price', 'e'));
     $ret['product_price_ttc'] = $oledrion_Currency->amountForDisplay($ttc);
     $ret['product_price_ttc_long'] = $oledrion_Currency->amountForDisplay($ttc, 'l');
     if (intval($this->getVar('product_discount_price')) > 0) {
         //geeker
         $finalPriceTTC = $this->getDiscountTTC();
         $finalPriceHT = floatval($this->getVar('product_discount_price', 'e'));
         $ret['product_discount_price_ttc'] = $oledrion_Currency->amountForDisplay($this->getDiscountTTC());
         $ret['product_discount_price_ttc_long'] = $oledrion_Currency->amountForDisplay($this->getDiscountTTC(), 'l');
     } else {
         $ret['product_discount_price_ttc'] = '';
         $ret['product_discount_price_ttc_long'] = '';
     }
     // Les informations sur les attributs
     $attributesCount = $this->productAttributesCount();
     $ret['product_attributes_count'] = $attributesCount;
     if ($attributesCount > 0) {
         $optionsPrice = $this->getInitialOptionsPrice();
         $ret['product_price_formated'] = $oledrion_Currency->amountForDisplay(floatval($this->getVar('product_price', 'e')) + $optionsPrice);
         $ret['product_discount_price_formated'] = $oledrion_Currency->amountForDisplay(floatval($this->getVar('product_discount_price', 'e')) + $optionsPrice);
         $ret['product_price_ttc'] = $oledrion_Currency->amountForDisplay($ttc + $optionsPrice);
         $ret['product_price_ttc_long'] = $oledrion_Currency->amountForDisplay($ttc + $optionsPrice, 'l');
         if (intval($this->getVar('product_discount_price')) != 0) {
             $finalPriceTTC = $this->getDiscountTTC() + $optionsPrice;
             $finalPriceHT = floatval($this->getVar('product_discount_price', 'e')) + $optionsPrice;
             $ret['product_discount_price_ttc'] = $oledrion_Currency->amountForDisplay(floatval($this->getDiscountTTC()) + $optionsPrice);
             $ret['product_discount_price_ttc_long'] = $oledrion_Currency->amountForDisplay(floatval($this->getDiscountTTC()) + $optionsPrice, 'l');
         }
     }
     $ret['product_final_price_ht_formated_long'] = $oledrion_Currency->amountForDisplay($finalPriceHT, 'l');
     $ret['product_final_price_ttc'] = $finalPriceTTC;
     $ret['product_final_price_ttc_javascript'] = oledrion_utils::formatFloatForDB($finalPriceTTC);
     $ret['product_final_price_ttc_formated'] = $oledrion_Currency->amountForDisplay($finalPriceTTC);
     $ret['product_final_price_ttc_formated_long'] = $oledrion_Currency->amountForDisplay($finalPriceTTC, 'l');
     $ret['product_vat_amount_formated_long'] = $oledrion_Currency->amountForDisplay($finalPriceHT - $finalPriceTTC);
     $ret['product_tooltip'] = oledrion_utils::makeInfotips($this->getVar('product_description'));
     $ret['product_url_rewrited'] = $this->getLink();
     $ret['product_href_title'] = oledrion_utils::makeHrefTitle($this->getVar('product_title'));
     $ret['product_recommended'] = $this->isRecommended();
     $ret['product_recommended_picture'] = $this->recommendedPicture();
     $ret['product_image_full_url'] = $this->getPictureUrl();
     $ret['product_thumb_full_url'] = $this->getThumbUrl();
     $ret['product_image_full_path'] = $this->getPicturePath();
     $ret['product_thumb_full_path'] = $this->getThumbPath();
     $ret['product_shorten_summary'] = oledrion_utils::truncate_tagsafe($this->getVar('product_summary'), OLEDRION_SUMMARY_MAXLENGTH);
     $ret['product_shorten_description'] = oledrion_utils::truncate_tagsafe($this->getVar('product_description'), OLEDRION_SUMMARY_MAXLENGTH);
     $ret['product_new'] = $this->isNewProduct();
     return $ret;
 }
开发者ID:osw17,项目名称:oledrion,代码行数:65,代码来源:oledrion_products.php


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