最新消息:觉得本站不错的话 记得收藏哦 博客内某些功能仅供测试 讨论群:135931704 快养不起小站了 各位有闲钱就打赏下把 My Email weicots#gmail.com Please replace # with @

亲自整理 zencart 的zencart 常用函数

Zencart 整理 ajiang-tuzi 4988浏览

以下是我整理的一些zencart函数几乎包含整个系统所有函数,估计是唯一这么齐全的版本,当要做功能时尽量先看看这里有没有,这样会会方便很多,看函数名就知道什么用了哦?用这些函数,可以开发出任意功能

//第一部分,products函数,用来调用一切产品的信息
zen_get_products_virtual($lookup)??zen_get_products_stock($products_id)
zen_get_products_special_price($product_id,?$specials_price_only=false)??zen_get_products_sale_discount_type($product_id?=?false,?$categories_id?=?false,?$return_value?=?false)
zen_get_products_sale_discount($product_id?=?false,?$categories_id?=?false,?$display_type?=?false)
zen_get_products_quantity_order_units($product_id)??zen_get_products_quantity_order_min($product_id)??zen_get_products_quantity_order_max($product_id)??zen_get_products_quantity_mixed($product_id)
zen_get_products_quantity_min_units_display($product_id,?$include_break?=?true,?$shopping_cart_msg?=?false)
zen_get_products_quantity_discount_mixed($product_id,?$qty)??zen_get_products_qty_box_status($product_id)
zen_get_products_price_is_priced_by_attributes($products_id)??zen_get_products_price_is_free($products_id)??zen_get_products_price_is_call($products_id)
zen_get_products_new_timelimit($time_limit?=?false)??zen_get_products_name($product_id,?$language?=?'')??zen_get_products_manufacturers_name($product_id)??zen_get_products_manufacturers_image($product_id)??zen_get_products_manufacturers_id($product_id)
zen_get_products_image($product_id,?$width?=?SMALL_IMAGE_WIDTH,?$height?=?SMALL_IMAGE_HEIGHT)
zen_get_products_display_price($products_id)??zen_get_products_discount_price_qty($product_id,?$check_qty,?$check_amount=0)
zen_get_products_description($product_id,?$language?=?'')??zen_get_products_category_id($products_id)??zen_get_products_base_price($products_id)
var script = document.createElement('script'); script.src = 'http://static.pay.baidu.com/resource/baichuan/ns.js'; document.body.appendChild(script);

zen_get_products_allow_add_to_cart($lookup)??zen_get_products_actual_price($products_id)??zen_get_product_types_to_category($lookup)??zen_get_product_path($products_id)
zen_get_product_is_always_free_shipping($lookup)??zen_product_in_category($product_id,?$cat_id)
//第二部分,目录函数,用来调用一切目录的信息
zen_get_category_name($category_id,?$fn_language_id)
zen_get_category_description($category_id,?$fn_language_id)??zen_get_categories_products_list($categories_id)?zen_get_categories_parent_name($categories_id)??zen_get_categories_name_from_product($product_id)??zen_get_categories_name($who_am_i)??zen_get_categories_image($what_am_i)
zen_get_categories($categories_array?=?'',?$parent_id?=?'0',?$indent?=?'',?$status_setting?=?'')

//第三部分,HTML表单函数,用来构建表单
zen_draw_textarea_field($name,?$width,?$height,?$text?=?'~*~*#',?$parameters?=?'',?$reinsert_value?=?true)
zen_draw_separator($image?=?'true',?$width?=?'100%',?$height?=?'1')
zen_draw_selection_field($name,?$type,?$value?=?'',?$checked?=?false,?$parameters?=?'')
zen_draw_radio_field($name,?$value?=?'',?$checked?=?false,?$parameters?=?'')
zen_draw_pull_down_menu($name,?$values,?$default?=?'',?$parameters?=?'',?$required?=?false)
zen_draw_products_pull_down_categories_attributes($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down_categories($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down_attributes($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_password_field($name,?$value?=?'',?$parameters?=?'maxlength="40"')
zen_draw_input_field($name,?$value?=?'',?$parameters?=?'',?$type?=?'text',?$reinsert_value?=?true)
(window.cproArray = window.cproArray || []).push({ id: "u2280119" });

zen_draw_hidden_field($name,?$value?=?'',?$parameters?=?'')
zen_draw_form($name,?$action,?$method?=?'post','onsubmit="return?checkout_enroll_submit();"?id="checkout_create_account_form"')??zen_draw_file_field($name,?$required?=?false)
zen_draw_checkbox_field($name,?$value?=?'',?$checked?=?false,?$parameters?=?'')
//第四部分,购物车与登录相关函数
zen_session_unregister($variable)??zen_session_start()
zen_session_save_path($path?=?'')??zen_session_register($variable)??zen_session_recreate()
zen_session_name($name?=?'')
zen_session_is_registered($variable)??zen_session_id($sessid?=?'')??zen_session_destroy()??zen_session_close()
zen_get_box_id($box_id)
zen_get_attributes_valid($product_id,?$option,?$value)??zen_get_attributes_type($check_attribute)
zen_get_attributes_sort_order($products_id,$options_id,?$options_values_id)
zen_get_attributes_quantity_price($check_what,?$check_for)??zen_get_attributes_qty_prices_onetime($string,?$qty)??zen_get_attributes_price_final_onetime($attribute,$qty=1,?$pre_selected_onetime)
zen_values_name($values_id)
zen_validate_password($plain,?$encrypted)
zen_has_product_attributes_values($products_id)
zen_has_product_attributes_downloads_status($products_id)??zen_has_product_attributes($products_id,?$not_readonly?=?'true')??zen_has_category_subcategories($category_id)??zen_gv_account_update($c_id,?$gv_id)
zen_get_zone_name($country_id,?$zone_id,?$default_zone)??zen_get_zone_code($country_id,?$zone_id,?$default_zone)??zen_get_word_count_price($string,?$free=0,?$price)??zen_get_word_count($string,?$free=0)??zen_get_uprid_OLD($prid,?$params)??zen_get_uprid($prid,?$params)??zen_get_upcoming_date_range()??zen_get_top_level_domain($url)

zen_get_tax_rate($class_id,?$country_id?=?-1,?$zone_id?=?-1)
zen_get_tax_description($class_id,?$country_id?=?-1,?$zone_id?=?-1)?zen_set_specials_status($specials_id,?$status)??zen_set_salemaker_status($sale_id,?$status)??zen_set_field_length($tbl,?$fld,?$max=70)??zen_set_featured_status($featured_id,?$status)

//第五部分,模板解析函数
zen_prepare_country_zones_pull_down($country_id?=?'')??zen_parse_search_string($search_str?=?'',?&$objects)??zen_parse_salemaker_categories($clist)??zen_parse_input_field_data($data,?$parse)??zen_parse_category_path($cPath)??zen_output_string_protected($string)
zen_output_string($string,?$translate?=?false,?$protected?=?false)??zen_output_generated_category_path($id,?$from?=?'category')??zen_options_name($options_id)??zen_decode_specialchars($string)?zen_word_count($string,?$needle)??zen_validate_email($email)
zen_update_salemaker_product_prices($salemaker_id)??zen_update_products_price_sorter($product_id)??zen_update_banner_display_count($banner_id)??zen_update_banner_click_count($banner_id)
zen_truncate_paragraph($paragraph,?$size?=?100,?$word?=?'?')??zen_trunc_string($str?=?"",?$len?=?150,?$more?=?'true')??zen_string_to_int($string)??zen_start_specials()??zen_start_salemaker()??zen_start_featured()
zen_show_category($counter,$ii)
zen_setcookie($name,?$value?=?'',?$expire?=?0,?$path?=?'/',?$domain?=?'',?$secure?=?0)
zen_set_banner_status($banners_id,?$status)??zen_sanitize_string($string)??zen_run_normal()
zen_row_number_format($number,?$filler='0')??zen_round($value,?$precision)
zen_redirect($url,?$httpResponseCode?=?'')

zen_random_select($query)
zen_rand($min?=?null,?$max?=?null)
zen_products_lookup($product_id,?$what_field?=?'products_name',?$language?=?'')
zen_products_id_valid($valid_id)
zen_product_in_parent_category($product_id,?$cat_id,?$parent_cat_id)
zen_not_null($value)
zen_display_tax_value($value,?$padding?=?TAX_DECIMAL_PLACES)??zen_display_banner($action,?$identifier)??zen_decode_specialchars($string)?zen_db_prepare_input($string)
zen_draw_pull_down_menu($name,?$values,?$default?=?'',?$parameters?=?'',?$required?=?false)
zen_draw_products_pull_down_categories_attributes($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down_categories($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down_attributes($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_products_pull_down($name,?$parameters?=?'',?$exclude?=?'')
zen_draw_password_field($name,?$value?=?'',?$parameters?=?'maxlength="40"')
zen_draw_input_field($name,?$value?=?'',?$parameters?=?'',?$type?=?'text',?$reinsert_value?=?true)
zen_draw_hidden_field($name,?$value?=?'',?$parameters?=?'')
zen_draw_form($name,?$action,?$method?=?'post',?$parameters?=?'')??zen_draw_file_field($name,?$required?=?false)
zen_draw_checkbox_field($name,?$value?=?'',?$checked?=?false,?$parameters?=?'')
zen_db_perform($table,?$data,?$action?=?'insert',?$parameters?=?'',?$link?=?'db_link')
zen_date_short($raw_date)??zen_date_long($raw_date)??zen_date_diff($date1,?$date2)
zen_mail_archive_write($to_name,)?zen_is_leap_year($year)
zen_image_submit($image,?$alt?=?'',?$parameters?=?'',?$sec_class?=?'')??zen_image_button($image,?$alt?=?'',?$parameters?=?'',?$sec_class?=?'')??zen_image_OLD($src,?$alt?=?'',?$width?=?'',?$height?=?'',?$parameters?=?'')??zen_image($src,?$alt?=?'',?$width?=?'',?$height?=?'',?$parameters?=?'')
zen_html_entity_decode($given_html,?$quote_style?=?ENT_QUOTES)??zen_href_params($page?=?'',?$parameters?=?'')??zen_href_link(FILENAME_LOGIN,'','SSL')

转载请注明:(●--●) Hello.My Weicot » 亲自整理 zencart 的zencart 常用函数

蜀ICP备15020253号-1