Esempio n. 1
0
 /**
  * Return products to display
  *
  * @param string $format	
  * @return array
  */
 function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     $myshop_Currency = myshop_Currency::getInstance();
     $ret['caddy_price_fordisplay'] = $myshop_Currency->amountForDisplay($this->getVar('caddy_price'));
     $ret['caddy_shipping_fordisplay'] = $myshop_Currency->amountForDisplay($this->getVar('caddy_shipping'));
     return $ret;
 }
Esempio n. 2
0
 /**
  * Retourne les éléments du produits formatés pour affichage
  *
  * @param string $format	
  * @return array
  */
 function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
     $countries = array();
     $countries = XoopsLists::getCountryList();
     $myshop_Currency = myshop_Currency::getInstance();
     $ret['cmd_total_fordisplay'] = $myshop_Currency->amountForDisplay($this->getVar('cmd_total'));
     // Montant TTC de la commande
     $ret['cmd_shipping_fordisplay'] = $myshop_Currency->amountForDisplay($this->getVar('cmd_shipping'));
     // Montant TTC des frais de port
     $ret['cmd_text_fordisplay'] = nl2br($this->getVar('cmd_text'));
     // Liste des réductions accordées
     if (isset($countries[$this->getVar('cmd_country')])) {
         // Libellé du pays de l'acheteur
         $ret['cmd_country_label'] = $countries[$this->getVar('cmd_country')];
     }
     return $ret;
 }
Esempio n. 3
0
 /**
  * Return data formated to display
  *
  * @param unknown_type $format
  * @return unknown
  */
 function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     $ret['cat_full_imgurl'] = $this->getPictureUrl();
     $ret['cat_href_title'] = $this->getHrefTitle();
     $ret['cat_url_rewrited'] = $this->getLink();
     return $ret;
 }
Esempio n. 4
0
 function toArray($format = 's')
 {
     $ret = parent::toArray($format);
     $ret['file_is_mp3'] = $this->isMP3();
     $ret['file_download_url'] = $this->getURL();
     return $ret;
 }
Esempio n. 5
0
 /**
  * Retourne les éléments du fabricant formatés pour affichage
  *
  * @param string $format	Le format à utiliser
  * @return array	Les informations formatées
  */
 function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     for ($i = 1; $i <= 5; $i++) {
         $ret['manu_photo' . $i . '_url'] = $this->getPictureUrl($i);
     }
     $ret['manu_url_rewrited'] = $this->getLink();
     $ret['manu_href_title'] = $this->getHrefTitle();
     $ret['manu_initial'] = $this->getInitial();
     return $ret;
 }
Esempio n. 6
0
 /**
  * Return products data to show
  *
  * @param string $format
  * @return array
  */
 function toArray($format = 's')
 {
     $ret = array();
     $ret = parent::toArray($format);
     $myshop_Currency = myshop_Currency::getInstance();
     $ret['product_price_formated'] = $myshop_Currency->amountForDisplay($this->getVar('product_price'));
     $ret['product_shipping_price_formated'] = $myshop_Currency->amountForDisplay($this->getVar('product_shipping_price'));
     $ret['product_discount_price_formated'] = $myshop_Currency->amountForDisplay($this->getVar('product_discount_price'));
     $ret['product_price_ttc'] = $myshop_Currency->amountForDisplay($this->getTTC());
     $ret['product_ecotaxe_formated'] = $myshop_Currency->amountForDisplay($this->getVar('product_ecotaxe'));
     if (intval($this->getVar('product_discount_price')) != 0) {
         $ret['product_discount_price_ttc'] = $myshop_Currency->amountForDisplay($this->getDiscountTTC());
     } else {
         $ret['product_discount_price_ttc'] = '';
     }
     $ret['product_tooltip'] = myshop_utils::makeInfotips($this->getVar('product_description'));
     $ret['product_url_rewrited'] = $this->getLink();
     $ret['product_href_title'] = myshop_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'] = myshop_utils::truncate_tagsafe($this->getVar('product_summary'), MYSHOP_SUMMARY_MAXLENGTH);
     $ret['product_shorten_description'] = myshop_utils::truncate_tagsafe($this->getVar('product_description'), MYSHOP_SUMMARY_MAXLENGTH);
     return $ret;
 }