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


PHP VmConfig::echoDebug方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`=' . $virtuemart_media_id;
         $db->setQuery($query);
         $json = $db->loadObject();
         if (isset($json->file_url)) {
             $json->file_url = JURI::root() . $json->file_url;
             $json->msg = 'OK';
             echo json_encode($json);
         } else {
             $json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = vRequest::getInt('custom_jplugin_id')) {
         $table = '#__extensions';
         $ext_id = 'extension_id';
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->jCustom = $db->loadObject();
         $customModel = VmModel::getModel('custom');
         $this->custom = $customModel->getCustom();
         // Get the payment XML.
         $formFile = JPath::clean(JPATH_ROOT . DS . 'plugins' . DS . 'vmcustom' . DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
         if (file_exists($formFile)) {
             VmConfig::loadJLang('plg_vmpsplugin', false);
             if (!class_exists('vmPlugin')) {
                 require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
             }
             $filename = 'plg_vmcustom_' . $this->jCustom->element;
             vmPlugin::loadJLang($filename, 'vmcustom', $this->jCustom->element);
             $this->custom = VmModel::getModel('custom')->getCustom();
             $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
             $this->custom->form = JForm::getInstance($this->jCustom->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $this->custom->params = new stdClass();
             foreach ($varsToPush as $k => $field) {
                 if (strpos($k, '_') != 0) {
                     $this->custom->params->{$k} = $field[0];
                 }
             }
             $this->custom->form->bind($this->custom);
             $form = $this->custom->form;
             include JPATH_VM_ADMINISTRATOR . DS . 'fields' . DS . 'formrenderer.php';
             echo '<input type="hidden" value="' . $this->jCustom->element . '" name="custom_value">';
         } else {
             $this->custom->form = null;
             VmConfig::$echoDebug = 1;
             vmdebug('File does not exist ' . $formFile);
         }
     }
     jExit();
 }
开发者ID:lenard112,项目名称:cms,代码行数:54,代码来源:view.json.php

示例2: add


//.........这里部分代码省略.........
         //$product -> customfields = empty($tmpProduct -> customfields)? array():$tmpProduct -> customfields ;
         //$product -> customfieldsCart = empty($tmpProduct -> customfieldsCart)? array(): $tmpProduct -> customfieldsCart;
         if (!empty($tmpProduct->customfieldsCart)) {
             $product->customfieldsCart = true;
         }
         //$product -> customsChilds = empty($tmpProduct -> customsChilds)? array(): $tmpProduct -> customsChilds;
         //Why reloading the product wiht same name $product ?
         // passed all from $tmpProduct and relaoding it second time ????
         // $tmpProduct = $this->getProduct((int) $virtuemart_product_id); seee before !!!
         // $product = $this->getProduct((int) $virtuemart_product_id);
         // Who ever noted that, yes that is exactly right that way, before we have a full object, with all functions
         // of all its parents, we only need the data of the product, so we create a dummy class which contains only the data
         // This is extremly important for performance reasons, else the sessions becomes too big.
         // Check if we have a product
         if ($product) {
             if (!empty($post['virtuemart_category_id'][$p_key])) {
                 $virtuemart_category_idPost = (int) $post['virtuemart_category_id'][$p_key];
                 $product->virtuemart_category_id = $virtuemart_category_idPost;
             }
             $productKey = $product->virtuemart_product_id;
             // INDEX NOT FOUND IN JSON HERE
             // changed name field you know exactly was this is
             if (isset($post['customPrice'])) {
                 $product->customPrices = $post['customPrice'];
                 if (isset($post['customPlugin'])) {
                     if (!class_exists('vmFilter')) {
                         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'vmfilter.php';
                     }
                     if (!is_array($post['customPlugin'])) {
                         $customPluginPost = (array) $post['customPlugin'];
                     } else {
                         $customPluginPost = $post['customPlugin'];
                     }
                     VmConfig::$echoDebug = TRUE;
                     foreach ($customPluginPost as &$customPlugin) {
                         if (is_array($customPlugin)) {
                             foreach ($customPlugin as &$customPlug) {
                                 if (is_array($customPlug)) {
                                     foreach ($customPlug as &$customPl) {
                                         $value = vmFilter::hl($customPl, array('deny_attribute' => '*'));
                                         $value = preg_replace('@<[\\/\\!]*?[^<>]*?>@si', '', $value);
                                         //remove all html tags
                                         $value = (string) preg_replace('#on[a-z](.+?)\\)#si', '', $value);
                                         //replace start of script onclick() onload()...
                                         $value = trim(str_replace('"', ' ', $value), "'");
                                         $customPl = (string) preg_replace('#^\'#si', '', $value);
                                     }
                                 }
                             }
                         }
                     }
                     $product->customPlugin = json_encode($customPluginPost);
                 }
                 $productKey .= '::';
                 foreach ($product->customPrices as $customPrice) {
                     foreach ($customPrice as $customId => $custom_fieldId) {
                         //MarkerVarMods
                         if (is_array($custom_fieldId)) {
                             foreach ($custom_fieldId as $userfieldId => $userfield) {
                                 //$productKey .= (int)$customId . ':' . (int)$userfieldId . ';';
                                 $productKey .= (int) $custom_fieldId . ':' . (int) $customId . ';';
                             }
                         } else {
                             //TODO productCartId
                             $productKey .= (int) $custom_fieldId . ':' . (int) $customId . ';';
                         }
开发者ID:romuland,项目名称:khparts,代码行数:67,代码来源:cart.php

示例3: getCheckoutPrices

 public function getCheckoutPrices(&$cart)
 {
     //vmdebug('in function getCheckoutPrices in function getCheckoutPrices');
     $this->_cart =& $cart;
     $this->inCart = TRUE;
     //$pricesPerId = array();
     $resultWithTax = 0.0;
     $resultWithOutTax = 0.0;
     $this->_cart->cartData['VatTax'] = array();
     $this->_cart->cartPrices['basePrice'] = 0;
     $this->_cart->cartPrices['basePriceWithTax'] = 0;
     $this->_cart->cartPrices['discountedPriceWithoutTax'] = 0;
     $this->_cart->cartPrices['salesPrice'] = 0;
     $this->_cart->cartPrices['taxAmount'] = 0;
     $this->_cart->cartPrices['salesPriceWithDiscount'] = 0;
     $this->_cart->cartPrices['discountAmount'] = 0;
     $this->_cart->cartPrices['priceWithoutTax'] = 0;
     $this->_cart->cartPrices['subTotalProducts'] = 0;
     $this->_cart->cartPrices['billTotal'] = 0;
     $this->_cart->cartData['duty'] = 1;
     $this->_cart->cartData['payment'] = 0;
     //could be automatically set to a default set in the globalconfig
     $this->_cart->cartData['paymentName'] = '';
     $cartpaymentTax = 0;
     $this->setCountryState();
     $this->_amountCart = 0;
     //$this->_cart->cartData['totalProduct'] = count($this->_cart->products);
     $customfieldModel = VmModel::getModel('customfields');
     //vmdebug('my variant mod',$this->_cart->products);
     foreach ($this->_cart->products as $cprdkey => $productCart) {
         //$product = $productModel->getProduct($product->virtuemart_product_id,false,false,true);
         //$productId = $product->virtuemart_product_id;
         if (empty($this->_cart->products[$cprdkey]->quantity) || empty($this->_cart->products[$cprdkey]->virtuemart_product_id)) {
             if (!is_object($this->_cart->products[$cprdkey])) {
                 //vmError( 'Error the product for calculation is not an object');
                 //vmdebug( 'Error the product for calculation is not an object',$product);
             } else {
                 vmError('Error the quantity of the product for calculation is 0, please notify the shopowner, the product id ' . $this->_cart->products[$cprdkey]->virtuemart_product_id);
             }
             continue;
         }
         $this->productCurrency = isset($this->_cart->products[$cprdkey]->product_currency) ? $this->_cart->products[$cprdkey]->product_currency : 0;
         VmConfig::$echoDebug = true;
         $variantmod = $customfieldModel->calculateModificators($this->_cart->products[$cprdkey]);
         //vmdebug('get cart prices '.$cprdkey,$variantmod);
         //$product->allPrices = $pricesPerId[$cprdkey] = $this->getProductPrices($product, $variantmod, $product->quantity, true, false);
         $productPrice = $this->getProductPrices($this->_cart->products[$cprdkey], $variantmod, $this->_cart->products[$cprdkey]->quantity);
         $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice] = $productPrice;
         $this->_cart->cartPrices[$cprdkey] = $productPrice;
         //$this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice];
         $this->_amountCart += $this->_cart->products[$cprdkey]->quantity;
         VmConfig::$echoDebug = false;
         if ($this->_currencyDisplay->_priceConfig['basePrice']) {
             $this->_cart->cartPrices['basePrice'] += self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['basePrice'], 'basePrice') * $this->_cart->products[$cprdkey]->quantity;
         }
         //				$this->_cart->cartPrices['basePriceVariant'] = $this->_cart->cartPrices['basePriceVariant'] + $pricesPerId[$product->virtuemart_product_id]['basePriceVariant']*$product->quantity;
         if ($this->_currencyDisplay->_priceConfig['basePriceWithTax']) {
             $this->_cart->cartPrices['basePriceWithTax'] += self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['basePriceWithTax']) * $this->_cart->products[$cprdkey]->quantity;
         }
         if ($this->_currencyDisplay->_priceConfig['discountedPriceWithoutTax']) {
             $this->_cart->cartPrices['discountedPriceWithoutTax'] += self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['discountedPriceWithoutTax'], 'discountedPriceWithoutTax') * $this->_cart->products[$cprdkey]->quantity;
         }
         if ($this->_currencyDisplay->_priceConfig['salesPrice']) {
             //				$this->_cart->cartPrices[$cprdkey]['subtotal_with_tax'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['salesPrice'],'salesPrice') * $this->_cart->products[$cprdkey]->quantity;
             $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_with_tax'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['salesPrice'], 'salesPrice') * $this->_cart->products[$cprdkey]->quantity;
             //				$this->_cart->cartPrices['salesPrice'] += $this->_cart->cartPrices[$cprdkey]['subtotal_with_tax'];
             $this->_cart->cartPrices['salesPrice'] += $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_with_tax'];
         }
         if ($this->_currencyDisplay->_priceConfig['taxAmount']) {
             //				$this->_cart->cartPrices[$cprdkey]['subtotal_tax_amount'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['taxAmount'],'taxAmount') * $this->_cart->products[$cprdkey]->quantity;
             $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_tax_amount'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['taxAmount'], 'taxAmount') * $this->_cart->products[$cprdkey]->quantity;
             //				$this->_cart->cartPrices['taxAmount'] += $this->_cart->cartPrices[$cprdkey]['subtotal_tax_amount'];
             $this->_cart->cartPrices['taxAmount'] += $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_tax_amount'];
         }
         if ($this->_currencyDisplay->_priceConfig['salesPriceWithDiscount']) {
             $this->_cart->cartPrices['salesPriceWithDiscount'] += self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['salesPriceWithDiscount'], 'salesPriceWithDiscount') * $this->_cart->products[$cprdkey]->quantity;
         }
         if ($this->_currencyDisplay->_priceConfig['discountAmount']) {
             //				$this->_cart->cartPrices[$cprdkey]['subtotal_discount'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['discountAmount'],'discountAmount') * $this->_cart->products[$cprdkey]->quantity;
             $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_discount'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['discountAmount'], 'discountAmount') * $this->_cart->products[$cprdkey]->quantity;
             //				$this->_cart->cartPrices['discountAmount'] += $this->_cart->cartPrices[$cprdkey]['subtotal_discount'];
             $this->_cart->cartPrices['discountAmount'] += $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal_discount'];
         }
         if ($this->_currencyDisplay->_priceConfig['priceWithoutTax']) {
             //				$this->_cart->cartPrices[$cprdkey]['subtotal'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['priceWithoutTax'],'priceWithoutTax') * $this->_cart->products[$cprdkey]->quantity;
             $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal'] = self::roundInternal($this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['priceWithoutTax'], 'priceWithoutTax') * $this->_cart->products[$cprdkey]->quantity;
             //				$this->_cart->cartPrices['priceWithoutTax'] += $this->_cart->cartPrices[$cprdkey]['subtotal'];
             $this->_cart->cartPrices['priceWithoutTax'] += $this->_cart->products[$cprdkey]->allPrices[$this->_cart->products[$cprdkey]->selectedPrice]['subtotal'];
         }
     }
     $this->_product = null;
     $this->_cart->cartData['DBTaxRulesBill'] = $this->gatherEffectingRulesForBill('DBTaxBill');
     $this->_cart->cartData['taxRulesBill'] = $this->gatherEffectingRulesForBill('TaxBill');
     $this->_cart->cartData['DATaxRulesBill'] = $this->gatherEffectingRulesForBill('DATaxBill');
     $this->_cart->cartPrices['salesPriceDBT'] = array();
     $this->_cart->cartPrices['taxRulesBill'] = array();
     $this->_cart->cartPrices['DATaxRulesBill'] = array();
     foreach ($this->_cart->products as $cprdkey => $product) {
         //for Rules with Categories
         foreach ($this->_cart->cartData['DBTaxRulesBill'] as &$dbrule) {
//.........这里部分代码省略.........
开发者ID:lenard112,项目名称:cms,代码行数:101,代码来源:calculationh.php


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