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

PHP zen_get_letters_count函数代码示例

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

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



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

示例1: zen_get_word_count

         // calculate word charges
         $tmp_word_cnt = 0;
         $tmp_word_cnt_string = $gBitCustomer->mCart->contents[$_GET['products_id']]['attributes_values'][$products_options_names->fields['products_options_id']];
         $tmp_word_cnt = zen_get_word_count($tmp_word_cnt_string, $products_options->fields['attributes_price_words_free']);
         $tmp_word_price = zen_get_word_count_price($tmp_word_cnt_string, $products_options->fields['attributes_price_words_free'], $products_options->fields['attributes_price_words']);
         if ($products_options->fields['attributes_price_words'] != 0) {
             $tmp_html .= TEXT_PER_WORD . $currencies->display_price($products_options->fields['attributes_price_words'], zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ($products_options->fields['attributes_price_words_free'] != 0 ? TEXT_WORDS_FREE . $products_options->fields['attributes_price_words_free'] : '');
         }
         if ($tmp_word_cnt != 0 and $tmp_word_price != 0) {
             $tmp_word_price = $currencies->display_price($tmp_word_price, zen_get_tax_rate($product_info->fields['products_tax_class_id']));
             $tmp_html = $tmp_html . '<br />' . TEXT_CHARGES_WORD . ' ' . $tmp_word_cnt . ' = ' . $tmp_word_price;
         }
         // calculate letter charges
         $tmp_letters_cnt = 0;
         $tmp_letters_cnt_string = $gBitCustomer->mCart->contents[$_GET['products_id']]['attributes_values'][$products_options_names->fields['products_options_id']];
         $tmp_letters_cnt = zen_get_letters_count($tmp_letters_cnt_string, $products_options->fields['attributes_price_letters_free']);
         $tmp_letters_price = zen_get_letters_count_price($tmp_letters_cnt_string, $products_options->fields['attributes_price_letters_free'], $products_options->fields['attributes_price_letters']);
         if ($products_options->fields['attributes_price_letters'] != 0) {
             $tmp_html .= TEXT_PER_LETTER . $currencies->display_price($products_options->fields['attributes_price_letters'], zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ($products_options->fields['attributes_price_letters_free'] != 0 ? TEXT_LETTERS_FREE . $products_options->fields['attributes_price_letters_free'] : '');
         }
         if ($tmp_letters_cnt != 0 and $tmp_letters_price != 0) {
             $tmp_letters_price = $currencies->display_price($tmp_letters_price, zen_get_tax_rate($product_info->fields['products_tax_class_id']));
             $tmp_html = $tmp_html . '<br />' . TEXT_CHARGES_LETTERS . ' ' . $tmp_letters_cnt . ' = ' . $tmp_letters_price;
         }
     }
 }
 // file uploads
 // iii 030813 added: support for file fields
 if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE) {
     $number_of_uploads++;
     // $cart->contents[$_GET['products_id']]['attributes_values'][$products_options_name['products_options_id']]
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:main_template_vars_attributes.php


示例2: zen_get_letters_count_price

function zen_get_letters_count_price($string, $free = 0, $price)
{
    $letters_price = zen_get_letters_count($string, $free) * $price;
    if ($letters_price <= 0) {
        return 0;
    } else {
        return $letters_price;
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:9,代码来源:functions_prices.php


示例3: getProductOptions


//.........这里部分代码省略.........
                                     $tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' . zen_draw_checkbox_field('id[' . $this->mOptions[$optionsId]['products_options_id'] . '][' . $products_options_value_id . ']', $products_options_value_id, $selected_attribute, $vals['attributes_html_attrib'], zen_image(DIR_WS_IMAGES . $vals['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $vals['products_options_values_name'] : '')) . (!empty($products_options_details_noname) ? '<br />' . $products_options_details_noname : '') . '</td>';
                                 } else {
                                     $tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' . zen_draw_checkbox_field('id[' . $this->mOptions[$optionsId]['products_options_id'] . '][' . $products_options_value_id . ']', $products_options_value_id, $selected_attribute, $vals['attributes_html_attrib'], $vals['products_options_values_name'] . ($products_options_details_noname != '' ? $products_options_details_noname : '')) . '</td>';
                                 }
                                 break;
                             case '0':
                             default:
                                 $tmp_checkbox .= zen_draw_checkbox_field('id[' . $this->mOptions[$optionsId]['products_options_id'] . '][' . $products_options_value_id . ']', $products_options_value_id, $selected_attribute, $vals['attributes_html_attrib'], $products_options_details);
                                 break;
                         }
                     }
                     // =-=-=-=-=-=-=-=-=-=-= text
                     if ($this->mOptions[$optionsId]['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT) {
                         if (is_object($pCart)) {
                             $tmp_value = $pCart->contents[$this->mProductsId]['attributes_values'][$this->mOptions[$optionsId]['products_options_id']];
                             $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $this->mOptions[$optionsId]['products_options_id'] . ']" size="' . $this->mOptions[$optionsId]['products_options_size'] . '" maxlength="' . $this->mOptions[$optionsId]['products_options_length'] . '" value="' . htmlspecialchars($tmp_value) . '" />	';
                             $tmp_html .= $products_options_details;
                             $tmp_word_cnt_string = '';
                             // calculate word charges
                             $tmp_word_cnt = 0;
                             $tmp_word_cnt_string = $pCart->contents[$this->mProductsId]['attributes_values'][$this->mOptions[$optionsId]['products_options_id']];
                             $tmp_word_cnt = zen_get_word_count($tmp_word_cnt_string, $vals['attributes_price_words_free']);
                             $tmp_word_price = zen_get_word_count_price($tmp_word_cnt_string, $vals['attributes_price_words_free'], $vals['attributes_price_words']);
                             if ($vals['attributes_price_words'] != 0) {
                                 $tmp_html .= TEXT_PER_WORD . $currencies->display_price($vals['attributes_price_words'], zen_get_tax_rate($this->mInfo['products_tax_class_id'])) . ($vals['attributes_price_words_free'] != 0 ? TEXT_WORDS_FREE . $vals['attributes_price_words_free'] : '');
                             }
                             if ($tmp_word_cnt != 0 and $tmp_word_price != 0) {
                                 $tmp_word_price = $currencies->display_price($tmp_word_price, zen_get_tax_rate($this->mInfo['products_tax_class_id']));
                                 $tmp_html = $tmp_html . '<br />' . TEXT_CHARGES_WORD . ' ' . $tmp_word_cnt . ' = ' . $tmp_word_price;
                             }
                             // calculate letter charges
                             $tmp_letters_cnt = 0;
                             $tmp_letters_cnt_string = $pCart->contents[$this->mProductsId]['attributes_values'][$this->mOptions[$optionsId]['products_options_id']];
                             $tmp_letters_cnt = zen_get_letters_count($tmp_letters_cnt_string, $vals['attributes_price_letters_free']);
                             $tmp_letters_price = zen_get_letters_count_price($tmp_letters_cnt_string, $vals['attributes_price_letters_free'], $vals['attributes_price_letters']);
                             if ($vals['attributes_price_letters'] != 0) {
                                 $tmp_html .= TEXT_PER_LETTER . $currencies->display_price($vals['attributes_price_letters'], zen_get_tax_rate($this->mInfo['products_tax_class_id'])) . ($vals['attributes_price_letters_free'] != 0 ? TEXT_LETTERS_FREE . $vals['attributes_price_letters_free'] : '');
                             }
                             if ($tmp_letters_cnt != 0 and $tmp_letters_price != 0) {
                                 $tmp_letters_price = $currencies->display_price($tmp_letters_price, zen_get_tax_rate($this->mInfo['products_tax_class_id']));
                                 $tmp_html = $tmp_html . '<br />' . TEXT_CHARGES_LETTERS . ' ' . $tmp_letters_cnt . ' = ' . $tmp_letters_price;
                             }
                         } else {
                             $tmp_html = '<input class="form-control" type="text" name ="id[' . TEXT_PREFIX . $this->mOptions[$optionsId]['products_options_id'] . ']" size="' . $this->mOptions[$optionsId]['products_options_size'] . '" maxlength="' . $this->mOptions[$optionsId]['products_options_length'] . '" />';
                             $tmp_html .= $products_options_details;
                         }
                     }
                     // =-=-=-=-=-=-=-=-=-=-= file uploads
                     if (is_object($pCart) && $this->mOptions[$optionsId]['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE) {
                         $number_of_uploads++;
                         $tmp_html = '<input type="file" name="id[' . TEXT_PREFIX . $this->mOptions[$optionsId]['products_options_id'] . ']" /><br />' . $pCart->contents[$this->mProductsId]['attributes_values'][$this->mOptions[$optionsId]['products_options_id']] . zen_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $this->mOptions[$optionsId]['products_options_id']) . zen_draw_hidden_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $pCart->contents[$this->mProductsId]['attributes_values'][$this->mOptions[$optionsId]['products_options_id']]);
                         $tmp_html .= $products_options_details;
                     }
                     // collect attribute image if it exists and to draw in table below
                     if ($this->mOptions[$optionsId]['products_options_images_style'] == '0' or ($this->mOptions[$optionsId]['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $this->mOptions[$optionsId]['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $this->mOptions[$optionsId]['products_options_type'] == '0')) {
                         if (!empty($vals['attributes_image'])) {
                             $tmp_attributes_image_row++;
                             if ($tmp_attributes_image_row > $this->mOptions[$optionsId]['products_options_images_per_row']) {
                                 $tmp_attributes_image .= '</tr><tr>';
                                 $tmp_attributes_image_row = 1;
                             }
                             $tmp_attributes_image .= '<td class="smallText" align="center">' . zen_image(DIR_WS_IMAGES . $vals['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $vals['products_options_values_name'] : '') . '</td>';
                         }
                     }
                     // Read Only - just for display purposes
                     if ($this->mOptions[$optionsId]['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
开发者ID:bitweaver,项目名称:commerce,代码行数:67,代码来源:CommerceProduct.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP zen_get_letters_count_price函数代码示例发布时间:2022-05-23
下一篇:
PHP zen_get_languages函数代码示例发布时间: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