• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zen_get_attributes_price_final函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中zen_get_attributes_price_final函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_attributes_price_final函数的具体用法?PHP zen_get_attributes_price_final怎么用?PHP zen_get_attributes_price_final使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: convert_product_attributes_result

 function convert_product_attributes_result($attributes_values, $load_option_name = true, $can_operate = false)
 {
     if ($load_option_name) {
         $attributes_values->fields['products_options_name'] = zen_options_name($attributes_values->fields['options_id']);
         $attributes_values->fields['products_options_values_name'] = zen_values_name($attributes_values->fields['options_values_id']);
     }
     $attributes_values->fields['products_display_price'] = $attributes_values->fields['price_prefix'] . $attributes_values->fields['options_values_price'];
     $attributes_values->fields['products_attributes_display_weight'] = $attributes_values->fields['products_attributes_weight_prefix'] . $attributes_values->fields['products_attributes_weight'];
     require_once DIR_WS_CLASSES . 'currencies.php';
     $currencies = new currencies();
     $attributes_price_final = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, $attributes_values, 'false');
     $attributes_price_final_value = $attributes_price_final;
     $attributes_price_final = $currencies->display_price($attributes_price_final, zen_get_tax_rate(1), 1);
     $attributes_price_final_onetime = zen_get_attributes_price_final_onetime($attributes_values->fields["products_attributes_id"], 1, $attributes_values);
     $attributes_price_final_onetime = $currencies->display_price($attributes_price_final_onetime, zen_get_tax_rate(1), 1);
     $new_attributes_price = '';
     if ($attributes_values->fields["attributes_discounted"]) {
         $new_attributes_price = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, '', 'false');
         $new_attributes_price = zen_get_discount_calc($attributes_values->fields['products_id'], true, $new_attributes_price);
         if ($new_attributes_price != $attributes_price_final_value) {
             $new_attributes_price = '|' . $currencies->display_price($new_attributes_price, zen_get_tax_rate(1), 1);
         } else {
             $new_attributes_price = '';
         }
     }
     $attributes_values->fields['attributes_display_price_final'] = $attributes_price_final . $new_attributes_price . ' ' . $attributes_price_final_onetime;
     // status
     $attributes_values->fields['products_status'] = "";
     foreach ($this->statuses as $type => $icon_info) {
         $attributes_values->fields['products_status'] .= self::make_status_link($attributes_values->fields, $type, $icon_info['color'], $icon_info['alt'], $can_operate);
     }
     return $attributes_values->fields;
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:33,代码来源:easy_admin_products_attribute_model.php


示例2: testValuePrice

 /**
  * Test attribute price.
  */
 public function testValuePrice()
 {
     foreach ($this->get('productService')->getAllProducts(false, 1) as $product) {
         foreach ($product->getAttributes() as $attribute) {
             foreach ($attribute->getValues() as $value) {
                 if ($value->isDiscounted()) {
                     $er = error_reporting(0);
                     $zprice = zen_get_attributes_price_final($value->getAttributeValueDetailsId(), 1, '');
                     $zprice = zen_get_discount_calc($product->getId(), true, $zprice);
                     error_reporting($er);
                 } else {
                     $zprice = $value->getValuePrice();
                 }
                 // default is 4 decimal digits...
                 $this->assertEquals((int) (10000 * $zprice), (int) (10000 * $value->getPrice(false)), '%s productId=' . $product->getId() . ' $valueId=' . $value->getAttributeValueId() . '/' . $value->getAttributeValueDetailsId());
             }
         }
     }
 }
开发者ID:zenmagick,项目名称:zenmagick,代码行数:22,代码来源:AttributePricingTest.php


示例3: echo

        <td class="smallText" align="center"><?php 
                    echo ($attributes_values->fields["attributes_price_base_included"] == '0' ? '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'action=set_flag_attributes_price_base_included' . '&attributes_id=' . $attributes_values->fields["products_attributes_id"] . (isset($_GET['option_page']) ? '&option_page=' . $_GET['option_page'] . '&' : '') . (isset($_GET['value_page']) ? '&value_page=' . $_GET['value_page'] . '&' : '') . (isset($_GET['attribute_page']) ? '&attribute_page=' . $_GET['attribute_page'] : '') . '&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id) . '" onClick="divertClick(this.href);return false;">' . zen_image(DIR_WS_IMAGES . 'icon_purple_off.gif', LEGEND_ATTRIBUTE_PRICE_BASE_INCLUDED) . '</a>' : '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'action=set_flag_attributes_price_base_included' . '&attributes_id=' . $attributes_values->fields["products_attributes_id"] . (isset($_GET['option_page']) ? '&option_page=' . $_GET['option_page'] . '&' : '') . (isset($_GET['value_page']) ? '&value_page=' . $_GET['value_page'] . '&' : '') . (isset($_GET['attribute_page']) ? '&attribute_page=' . $_GET['attribute_page'] : '') . '&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id) . '" onClick="divertClick(this.href);return false;">' . zen_image(DIR_WS_IMAGES . 'icon_purple_on.gif', LEGEND_ATTRIBUTE_PRICE_BASE_INCLUDED)) . '</a>';
                    ?>
</td>
        <td class="smallText" align="center"><?php 
                    echo ($attributes_values->fields["attributes_required"] == '0' ? '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'action=set_flag_attributes_required' . '&attributes_id=' . $attributes_values->fields["products_attributes_id"] . (isset($_GET['option_page']) ? '&option_page=' . $_GET['option_page'] . '&' : '') . (isset($_GET['value_page']) ? '&value_page=' . $_GET['value_page'] . '&' : '') . (isset($_GET['attribute_page']) ? '&attribute_page=' . $_GET['attribute_page'] : '') . '&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id) . '" onClick="divertClick(this.href);return false;">' . zen_image(DIR_WS_IMAGES . 'icon_red_off.gif', LEGEND_ATTRIBUTES_REQUIRED) . '</a>' : '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'action=set_flag_attributes_required' . '&attributes_id=' . $attributes_values->fields["products_attributes_id"] . (isset($_GET['option_page']) ? '&option_page=' . $_GET['option_page'] . '&' : '') . (isset($_GET['value_page']) ? '&value_page=' . $_GET['value_page'] . '&' : '') . (isset($_GET['attribute_page']) ? '&attribute_page=' . $_GET['attribute_page'] : '') . '&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id) . '" onClick="divertClick(this.href);return false;">' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', LEGEND_ATTRIBUTES_REQUIRED)) . '</a>';
                    ?>
</td>
      </tr>
    </table>
</td>
<?php 
                }
                $new_attributes_price = '';
                if ($attributes_values->fields["attributes_discounted"]) {
                    $new_attributes_price = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, '', 'false');
                    $new_attributes_price = zen_get_discount_calc($products_filter, true, $new_attributes_price);
                    if ($new_attributes_price != $attributes_price_final_value) {
                        $new_attributes_price = '|' . $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_check->fields['products_tax_class_id']), 1);
                    } else {
                        $new_attributes_price = '';
                    }
                }
                ?>
            <td align="right" class="smallText"><?php 
                echo $attributes_price_final . $new_attributes_price . ' ' . $attributes_price_final_onetime;
                ?>
</td>
<?php 
                if ($action != '') {
                    ?>
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:attributes_controller.php


示例4: array

 // reset
 $products_options_display_price = '';
 $new_attributes_price = '';
 $price_onetime = '';
 $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'], 'text' => $products_options->fields['products_options_values_name']);
 if (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == '' or STORE_STATUS == '1' or (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' or CUSTOMERS_APPROVAL_AUTHORIZATION == '2') and $_SESSION['customers_authorization'] == '' or CUSTOMERS_APPROVAL == '2' and $_SESSION['customers_authorization'] == '2' or CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customers_authorization'] != 0) {
     $new_attributes_price = '';
     $new_options_values_price = 0;
     $products_options_display_price = '';
     $price_onetime = '';
 } else {
     // collect price information if it exists
     if ($products_options->fields['attributes_discounted'] == 1) {
         // apply product discount to attributes if discount is on
         //              $new_attributes_price = $products_options->fields['options_values_price'];
         $new_attributes_price = zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false');
         $new_attributes_price = zen_get_discount_calc((int) $_GET['products_id'], true, $new_attributes_price);
     } else {
         // discount is off do not apply
         $new_attributes_price = $products_options->fields['options_values_price'];
     }
     // reverse negative values for display
     if ($new_attributes_price < 0) {
         $new_attributes_price = -$new_attributes_price;
     }
     if ($products_options->fields['attributes_price_onetime'] != 0 or $products_options->fields['attributes_price_factor_onetime'] != 0) {
         $show_onetime_charges_description = 'true';
         $new_onetime_charges = zen_get_attributes_price_final_onetime($products_options->fields["products_attributes_id"], 1, '');
         $price_onetime = TEXT_ONETIME_CHARGE_SYMBOL . $currencies->display_price($new_onetime_charges, zen_get_tax_rate($product_info->fields['products_tax_class_id']));
     } else {
         $price_onetime = '';
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:31,代码来源:attributes.php


示例5: updateNotifyAttributesModuleOriginalPrice

 function updateNotifyAttributesModuleOriginalPrice(&$callingClass, $notifier, $paramsArray)
 {
     global $db, $products_options, $products_options_names, $currencies, $new_attributes_price, $product_info, $products_options_display_price, $PWA_STOCK_QTY;
     if ($this->_isSBA && (PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '1' || PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '2' && $products_options_names->RecordCount() > 1 || PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '3' && $products_options_names->RecordCount() == 1)) {
         // Perhaps only certain features need to be bypassed, but for now all mc12345678
         // START "Stock by Attributes" SBA added original price for display, and some formatting
         $originalpricedisplaytext = null;
         if (STOCK_SHOW_ORIGINAL_PRICE_STRUCK == 'true' && !(zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false') == $new_attributes_price || zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false') == -$new_attributes_price && (int) ($products_options->fields['price_prefix'] . "1") * $products_options->fields['options_values_price'] < 0)) {
             //Original price struck through
             if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_RADIO || $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX) {
                 //use this if a PRODUCTS_OPTIONS_TYPE_RADIO or PRODUCTS_OPTIONS_TYPE_CHECKBOX
                 //class="normalprice" can be used in a CSS file to control the text properties, not compatable with selection lists
                 $originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . '<span class="normalprice">' . $products_options->fields['price_prefix'] . $currencies->display_price(zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false'), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . '</span>' . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
             } else {
                 //need to remove the <span> tag for selection lists and text boxes
                 $originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . $currencies->display_price(abs(zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false')), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
             }
         }
         $products_options_display_price .= $originalpricedisplaytext . $PWA_STOCK_QTY;
         // END "Stock by Attributes" SBA
     }
 }
开发者ID:badarac,项目名称:stock_by_attribute_1.5.4,代码行数:22,代码来源:class.products_with_attributes_stock.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zen_get_attributes_price_final_onetime函数代码示例发布时间:2022-05-23
下一篇:
PHP zen_get_attributes_price_factor函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap