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


PHP JSFactory::getAllTaxes方法代码示例

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


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

示例1: getCorrectedPriceForQueryFilter

function getCorrectedPriceForQueryFilter($price)
{
    $jshopConfig = JSFactory::getConfig();
    $taxes = JSFactory::getAllTaxes();
    $taxlist = array_values($taxes);
    $tax = $taxlist[0];
    if ($jshopConfig->display_price_admin == 1 && $jshopConfig->display_price_front_current == 0) {
        $price = $price / (1 + $tax / 100);
    }
    if ($jshopConfig->display_price_admin == 0 && $jshopConfig->display_price_front_current == 1) {
        $price = $price * (1 + $tax / 100);
    }
    $price = $price / $jshopConfig->currency_value;
    return $price;
}
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:15,代码来源:functions.php

示例2: getTax

 function getTax()
 {
     $taxes = JSFactory::getAllTaxes();
     return $taxes[$this->tax_id];
 }
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:5,代码来源:paymentmethod.php

示例3: getTax

 function getTax()
 {
     $taxes = JSFactory::getAllTaxes();
     $this->product_tax = $taxes[$this->product_tax_id];
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeGetTaxProduct', array(&$this));
     return $this->product_tax;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:8,代码来源:product.php

示例4: updateTaxForProducts

 function updateTaxForProducts()
 {
     if (count($this->products)) {
         $taxes = JSFactory::getAllTaxes();
         foreach ($this->products as $k => $prod) {
             $this->products[$k]['tax'] = $taxes[$prod['tax_id']];
         }
     }
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:9,代码来源:cart.php

示例5: getTaxPackage

 function getTaxPackage()
 {
     $taxes = JSFactory::getAllTaxes();
     return $taxes[$this->package_tax_id];
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:5,代码来源:shippingmethodprice.php

示例6: loadpaymentprice

 function loadpaymentprice($data_order, $products)
 {
     JModelLegacy::addIncludePath(JPATH_COMPONENT_SITE . '/models');
     $jshopConfig = JSFactory::getConfig();
     $jshopConfig->display_price_front_current = $data_order['display_price'];
     $all_currency = JSFactory::getAllCurrency();
     $currency_id = $data_order['currency_id'];
     if ($currency_id) {
         $jshopConfig->currency_value = $all_currency[$currency_id]->currency_value;
     }
     $id_country = $data_order['d_country'];
     if (!$id_country) {
         $id_country = $data_order['country'];
     }
     $AllTaxes = JSFactory::getAllTaxes();
     $paym_method = JSFactory::getTable('paymentmethod', 'jshop');
     $paym_method->load($data_order['payment_method_id']);
     if ($paym_method->price_type == 2) {
         $total = 0;
         foreach ($products as $key => $product) {
             $tax = floatval($product['product_tax']);
             $product_price = $product['product_item_price'] * $product['product_quantity'];
             if ($data_order['display_price']) {
                 $product_price = $product_price + $product_price * $tax / 100;
             }
             $total += $product_price;
         }
         $cproducts = $this->getCartProductsFromOrderProducts($products);
         $cart = JSFactory::getModel('cart', 'jshop');
         $cart->products = array();
         $cart->loadProductsFromArray($cproducts);
         $cart->loadPriceAndCountProducts();
         $shipping_method = JSFactory::getTable('shippingMethod', 'jshop');
         $sh_pr_method_id = $shipping_method->getShippingPriceId($data_order['shipping_method_id'], $id_country);
         $shipping_method_price = JSFactory::getTable('shippingMethodPrice', 'jshop');
         $shipping_method_price->load($sh_pr_method_id);
         $tax = floatval($AllTaxes[$shipping_method_price->shipping_tax_id]);
         $shipping_price = $data_order['order_shipping'];
         if ($data_order['display_price']) {
             $shipping_taxes = $shipping_method_price->calculateShippingTaxList($shipping_price, $cart);
             foreach ($shipping_taxes as $k => $v) {
                 $shipping_price = $shipping_price + $v;
             }
         }
         $total += $shipping_price;
         $tax = floatval($AllTaxes[$shipping_method_price->package_tax_id]);
         $package_price = $data_order['order_package'];
         if ($data_order['display_price']) {
             $shipping_taxes = $shipping_method_price->calculatePackageTaxList($package_price, $cart);
             foreach ($shipping_taxes as $k => $v) {
                 $package_price = $package_price + $v;
             }
         }
         $total += $package_price;
         $price = $total * $paym_method->price / 100;
         if ($data_order['display_price']) {
             $price = getPriceCalcParamsTax($price, $paym_method->tax_id, $cart->products);
         }
     } else {
         $price = $paym_method->price * $jshopConfig->currency_value;
         $price = getPriceCalcParamsTax($price, $paym_method->tax_id, $cart->products);
     }
     extract(js_add_trigger(get_defined_vars(), "before"));
     return $price;
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:65,代码来源:orders.php

示例7: getTax

 function getTax()
 {
     $taxes = JSFactory::getAllTaxes();
     $this->product_tax = $taxes[$this->product_tax_id];
     JPluginHelper::importPlugin('jshoppingproducts');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeGetTaxProduct', array(&$this));
     return $this->product_tax;
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:9,代码来源:product.php


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