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


PHP ps_product::getDescriptionWithTax方法代码示例

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


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

示例1: updateRecords


//.........这里部分代码省略.........
        $q = "INSERT INTO `#__{vm}_order_user_info` \n\t\t\t(`order_info_id`,`order_id`,`user_id`,address_type, " . $fieldstr . ") ";
        $q .= "SELECT NULL, '{$order_id}', '" . $auth['user_id'] . "', address_type, " . $fieldstr . " FROM #__{vm}_user_info WHERE user_id='" . $auth['user_id'] . "' AND address_type='BT'";
        $db->query($q);
        // Save current Ship to Address if applicable
        $q = "INSERT INTO `#__{vm}_order_user_info` \n\t\t\t(`order_info_id`,`order_id`,`user_id`,address_type, " . $fieldstr . ") ";
        $q .= "SELECT NULL, '{$order_id}', '" . $auth['user_id'] . "', address_type, " . $fieldstr . " FROM #__{vm}_user_info WHERE user_id='" . $auth['user_id'] . "' AND user_info_id='" . $d['ship_to_info_id'] . "' AND address_type='ST'";
        $db->query($q);
        /**
         * Insert all Products from the Cart into order line items; 
         * one row per product in the cart 
         */
        $dboi = new ps_DB();
        for ($i = 0; $i < $cart["idx"]; $i++) {
            $r = "SELECT product_id,product_in_stock,product_sales,product_parent_id,product_sku,product_name ";
            $r .= "FROM #__{vm}_product WHERE product_id='" . $cart[$i]["product_id"] . "'";
            $dboi->query($r);
            $dboi->next_record();
            $product_price_arr = $ps_product->get_adjusted_attribute_price($cart[$i]["product_id"], $cart[$i]["description"]);
            $product_price = $GLOBALS['CURRENCY']->convert($product_price_arr["product_price"], $product_price_arr["product_currency"]);
            if (empty($_SESSION['product_sess'][$cart[$i]["product_id"]]['tax_rate'])) {
                $my_taxrate = $ps_product->get_product_taxrate($cart[$i]["product_id"]);
            } else {
                $my_taxrate = $_SESSION['product_sess'][$cart[$i]["product_id"]]['tax_rate'];
            }
            // Attribute handling
            $product_parent_id = $dboi->f('product_parent_id');
            $description = '';
            if ($product_parent_id > 0) {
                $db_atts = $ps_product->attribute_sql($dboi->f('product_id'), $product_parent_id);
                while ($db_atts->next_record()) {
                    $description .= $db_atts->f('attribute_name') . ': ' . $db_atts->f('attribute_value') . '; ';
                }
            }
            $description .= $ps_product->getDescriptionWithTax($_SESSION['cart'][$i]["description"], $dboi->f('product_id'));
            $product_final_price = round($product_price * ($my_taxrate + 1), 2);
            $vendor_id = $ps_vendor_id;
            $fields = array('order_id' => $order_id, 'user_info_id' => $d["ship_to_info_id"], 'vendor_id' => $vendor_id, 'product_id' => $cart[$i]["product_id"], 'order_item_sku' => $dboi->f("product_sku"), 'order_item_name' => $dboi->f("product_name"), 'product_quantity' => $cart[$i]["quantity"], 'product_item_price' => $product_price, 'product_final_price' => $product_final_price, 'order_item_currency' => $GLOBALS['product_currency'], 'order_status' => 'P', 'product_attribute' => $description, 'cdate' => $timestamp, 'mdate' => $timestamp);
            $db->buildQuery('INSERT', '#__{vm}_order_item', $fields);
            $db->query();
            // Update Stock Level and Product Sales, decrease - no matter if in stock or not!
            $q = "UPDATE #__{vm}_product ";
            $q .= "SET product_in_stock = product_in_stock - " . (int) $cart[$i]["quantity"];
            $q .= " WHERE product_id = '" . $cart[$i]["product_id"] . "'";
            $db->query($q);
            $q = "UPDATE #__{vm}_product ";
            $q .= "SET product_sales= product_sales + " . (int) $cart[$i]["quantity"];
            $q .= " WHERE product_id='" . $cart[$i]["product_id"] . "'";
            $db->query($q);
            // Update stock of parent product, if all child products are sold, thanks Ragnar Brynjulfsson
            if ($dboi->f("product_parent_id") != 0) {
                $q = "SELECT COUNT(product_id) ";
                $q .= "FROM #__{vm}_product ";
                $q .= "WHERE product_parent_id = " . $dboi->f("product_parent_id");
                $q .= " AND product_in_stock > 0";
                $db->query($q);
                $db->next_record();
                if (!$db->f("COUNT(product_id)")) {
                    $q = "UPDATE #__{vm}_product ";
                    $q .= "SET product_in_stock = 0 ";
                    $q .= "WHERE product_id = " . $dboi->f("product_parent_id") . " LIMIT 1";
                    $db->query($q);
                }
            }
        }
        ######## BEGIN DOWNLOAD MOD ###############
        if (ENABLE_DOWNLOADS == "1") {
开发者ID:atomtechnologyltd,项目名称:VM9_paynetz_for_Joomla1.5_updated,代码行数:67,代码来源:ps_nbpaynetz.php

示例2: vmSpoofValue

            }
            ?>
			  <tr class="<?php 
            echo $bgcolor;
            ?>
" valign="top">
          <?php 
            $ps_order_change_html->html_change_delete_item($dbt->f("order_item_id"));
            ?>
          <?php 
            $ps_order_change_html->html_change_item_quantity($dbt->f("order_item_id"), $dbt->f("product_quantity"));
            ?>
        <td width="30%" align="left">
				<?php 
            $dbt->p("order_item_name");
            echo "<br /><span style=\"font-size: smaller;\">" . ps_product::getDescriptionWithTax($dbt->f("product_attribute")) . "</span>";
            if ($downloadable) {
                echo '<br /><br />
  			  			<div style="font-weight:bold;">' . $VM_LANG->_('VM_DOWNLOAD_STATS') . '</div>';
                if (empty($files)) {
                    echo '<em>- ' . $VM_LANG->_('VM_DOWNLOAD_NOTHING_LEFT') . ' -</em>';
                    $enable_download_function = $ps_function->get_function('insertDownloadsForProduct');
                    if ($perm->check($enable_download_function['perms'])) {
                        echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">				  		
  			  			<input type="hidden" name="page" value="' . $page . '" />
  			  			<input type="hidden" name="order_id" value="' . $order_id . '" />
  			  			<input type="hidden" name="product_id" value="' . $dbt->f('product_id') . '" />
  			  			<input type="hidden" name="user_id" value="' . $db->f('user_id') . '" />
  			  			<input type="hidden" name="func" value="insertDownloadsForProduct" />
  						  <input type="hidden" name="vmtoken" value="' . vmSpoofValue($sess->getSessionId()) . '" />
  			  			<input type="hidden" name="option" value="' . $option . '" />
开发者ID:rafarubert,项目名称:megafiltros,代码行数:31,代码来源:order.order_print.php

示例3: basename

 if ($i % 2) {
     $product_rows[$i]['row_color'] = "sectiontableentry2";
 } else {
     $product_rows[$i]['row_color'] = "sectiontableentry1";
 }
 // Get product parent id if exists
 $product_parent_id = $ps_product->get_field($cart[$i]["product_id"], "product_parent_id");
 // Get flypage for this product
 $flypage = $ps_product->get_flypage($cart[$i]["product_id"]);
 // Build URL based on whether item or product
 if ($product_parent_id) {
     $url = $sess->url(URL . basename($_SERVER['PHP_SELF']) . "?page=shop.product_details&flypage={$flypage}&product_id={$product_parent_id}");
 } else {
     $url = $sess->url(URL . basename($_SERVER['PHP_SELF']) . "?page=shop.product_details&flypage={$flypage}&product_id=" . $_SESSION['cart'][$i]["product_id"]);
 }
 $product_rows[$i]['product_name'] = "<a href=\"{$url}\"><strong>" . shopMakeHtmlSafe($ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_name")) . "</strong></a><br />" . $ps_product->getDescriptionWithTax($_SESSION['cart'][$i]["description"], $_SESSION['cart'][$i]["product_id"]);
 // Display attribute values if this an item
 $product_rows[$i]['product_attributes'] = "";
 if ($product_parent_id) {
     $db_detail = $ps_product->attribute_sql($cart[$i]["product_id"], $product_parent_id);
     while ($db_detail->next_record()) {
         $product_rows[$i]['product_attributes'] .= "<br />" . $db_detail->f("attribute_name") . "&nbsp;";
         $product_rows[$i]['product_attributes'] .= "(" . $db_detail->f("attribute_value") . ")";
     }
 }
 $product_rows[$i]['product_sku'] = $ps_product->get_field($cart[$i]["product_id"], "product_sku");
 /* Product PRICE */
 $my_taxrate = $ps_product->get_product_taxrate($cart[$i]["product_id"], $weight_subtotal);
 $tax = $my_taxrate * 100;
 $price = $ps_product->get_adjusted_attribute_price($cart[$i]["product_id"], $cart[$i]["description"]);
 $price['product_price'] = $GLOBALS['CURRENCY']->convert($price['product_price'], $price['product_currency']);
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:31,代码来源:ro_basket.php

示例4: round

     $price["product_price"] *= $my_taxrate + 1;
 }
 $subtotal = round($price["product_price"], 2) * $cart[$i]["quantity"];
 $total += $subtotal;
 $flypage_id = $product_parent_id;
 if ($flypage_id == 0) {
     $flypage_id = $cart[$i]["product_id"];
 }
 $flypage = $ps_product->get_flypage($flypage_id);
 $category_id = vmGet($cart[$i], 'category_id', 0);
 if ($product_parent_id) {
     $url = $sess->url(URL . "index.php?page=shop.product_details&flypage={$flypage}&product_id={$product_parent_id}&category_id={$category_id}");
 } else {
     $url = $sess->url(URL . "index.php?page=shop.product_details&flypage={$flypage}&category_id={$category_id}&product_id=" . $_SESSION['cart'][$i]["product_id"]);
 }
 $html = str_replace("_", " ", $ps_product->getDescriptionWithTax($_SESSION['cart'][$i]["description"], $_SESSION['cart'][$i]["product_id"])) . " ";
 if ($product_parent_id) {
     $db_detail = $ps_product->attribute_sql($cart[$i]["product_id"], $product_parent_id);
     while ($db_detail->next_record()) {
         $html .= $db_detail->f("attribute_value") . " ";
     }
 }
 $minicart[$ci]['url'] = $url;
 $minicart[$ci]['product_name'] = shopMakeHtmlSafe($ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_name"));
 $minicart[$ci]['quantity'] = $cart[$i]["quantity"];
 $minicart[$ci]['price'] = $CURRENCY_DISPLAY->getFullValue($subtotal);
 $minicart[$ci]['attributes'] = $html;
 if (@$_SESSION['vmCartDirection']) {
     $i++;
 } else {
     $i--;
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:shop.basket_short.php


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