Upgrade Center. The schema of a content upgrade package is now an object of \Tygh\UpgradeCenter\ContentSchema
.
Backward compatibility is preserved. You can use this schema as an object in your own upgrade validators.
Behaviour of the {btn}
backend template function has changed:
- Permission checks for the
$href
parameter now use the GET method. Permission checks for$dispatch
use POST.- The
method
parameter has been added. Its value can be GET or POST. This parameter affects permission checks. Also, ifmethod == "POST"
, thecm-post
class will be added to the link automatically.- We don’t recommend passing
cm-post
in the$class
parameter.
\Tygh\Http
class now have default connect timeout value of 10 seconds.Check if an order is available for a customer:
fn_set_hook('is_order_allowed_post', $order_id, $auth, $allowed);
Perform actions before order placement redirect on checkout:
fn_set_hook('checkout_place_orders_pre_route', $cart, $auth, $params);
Modify the get languages list by specified parameters SQL query parameters:
fn_set_hook('get_languages', $params, $hash_key, $field_list, $join, $condition, $group_by, $order_by, $limit);
Modify the all languages list SQL query parameters:
fn_set_hook('get_all_languages', $edit, $field_list, $join, $condition, $group_by, $order_by, $limit);
Modify the simple languages list SQL query parameters:
fn_set_hook('get_simple_languages', $include_hidden, $field_list, $join, $condition, $group_by, $order_by, $limit);
Modify the available languages list SQL query parameters:
fn_set_hook('get_available_languages', $area, $include_hidden, $field_list, $join, $condition, $group_by, $order_by, $limit);
fn_set_hook('is_order_allowed', $order_id, $allowed);
is now deprecated.
// old:
fn_set_hook('buy_together_get_chains_pre', $parms, $auth, $lang_code);
// new:
fn_set_hook('buy_together_get_chains_pre', $params, $auth, $lang_code);
// old:
fn_set_hook('convert_price_pre', $price);
// new:
fn_set_hook('convert_price_pre', $price, $currency_code);
// old:
fn_set_hook('convert_price_post', $result, $price);
// new:
fn_set_hook('convert_price_post', $result, $price, $currency_code);
// old:
fn_set_hook('send_form', $page_data, $form_values, $result, $from, $sender, $attachments, $is_html);
// new:
fn_set_hook('send_form', $page_data, $form_values, $result, $from, $sender, $attachments, $is_html, $subject);
Check if the table exists in the database:
\Tygh\Database\Connection::hasTable($table_name, $set_prefix = true)
Short code for \Tygh\Database\Connection::hasTable
, check if the table exists on current connection:
db_has_table($table_name, $set_prefix = true)
Gets a subscriber identifier by email:
fn_get_subscriber_id_by_email($email = '')
Find a product feature group id by the name:
fn_exim_find_feature_group_id($name, $lang_code)
Find a product feature id by params:
fn_exim_find_feature_id($name, $type, $group_id, $lang_code)
Extract an add-on package to a temporary directory:
fn_extract_addon_package($file_name)
Validate an ad-on package structure:
fn_validate_addon_structure($addon_name, $path)
Get the list of subscribers:
fn_get_subscribers($params, $items_per_page = 0, $lang_code = CART_LANGUAGE)
Update subscribers and subscriptions:
fn_update_subscriber($subscriber_data, $subscriber_id = 0)
Check if an order is available to view for a customer:
fn_is_order_allowed($order_id, $auth)
Check access permissions to a thread object (e.g. an order):
fn_discussion_check_thread_permissions($thread, $auth)
Provide the token and handle errors for checkout with In-Context Checkout:
fn_paypal_checkout_place_orders_pre_route(&$cart, $auth, $params)
Get an email subject for the submitted form:
fn_form_builder_get_form_subject($form_structure, $form_data)
Sort the multi-level tree:
fn_sort_tree($items, $subitems_field = 'subitems', $order_by = array('position'), $order = 'asc')
Return the session identifier contained in the HTTP request or nulls, if the request doesn’t contain the session ID:
\Tygh\Web\Session::requestGetSessionID()
Get modified files:
\Tygh\Snapshot::getModifiedFiles($ext = 'php', array $directories = array(), array $exclude = array())
// old:
function db_paginate(&$page, $items_per_page, $total_items = 0)
// new:
function db_paginate(&$page, &$items_per_page, $total_items = 0)
// old:
function fn_blog_get_pages($params, $join, $condition, $fields, $group_by, &$sortings, $lang_code)
// new:
function fn_blog_get_pages(&$params, $join, $condition, $fields, $group_by, &$sortings, $lang_code)
Questions & Feedback
Have any questions that weren't answered here? Need help with solving a problem in your online store? Want to report a bug in our software? Find out how to contact us.