Adapt Your Add-Ons & Themes To 4.3.1

[size=5]Settings[/size]

The settings.Appearance.admin_products_per_page setting was renamed to settings.Appearance.admin_elements_per_page



Now there is a new Checkout section in Settings. All the related settings were moved to this new section.

-Registry::get('settings.General.address_position')

+Registry::get('settings.Checkout.address_position')

The Checkout section settings that were moved from General section:

  • disable_anonymous_checkout
  • address_position
  • agree_terms_conditions
  • repay
  • allow_create_account_after_order
  • configure_sign_in_step
  • sign_in_default_action
  • display_shipping_step
  • display_payment_step



    Settings secure_auth & secure_checkout werre merged into one new secure_storefront

    If you use the fn_url function to generate a link for a customer area, you should replace the protocol in it, Here is an example from sitemap

    -$links[] = fn_url($link . '&sl=' . $lang_code, 'C', 'http', $lang_code);

    +$links[] = fn_url($link . '&sl=' . $lang_code, 'C', fn_get_storefront_protocol(), $lang_code);



    Use email as Login (email_as_login) option was removed



    [size=5].HTACCESS (Caching rules & libs)[/size]



    We removed gz_handler from PHP. Now all output data are compressed by GZIP through htaccess.



    Following MIME-type files are compressed:



    application/javascript application/x-javascript text/javascript application/json

    application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf font/opentype font/otf font/ttf application/x-woff application/x-font-woff

    text/css text/html text/plain



    We have added the static data caching for 2 weeks (as per Google page speed recommendation). The following file formats will be cached: gif, png, jpg, jpeg, ico, js, css



    If you upload images, use CS-Cart inner mechanisms (fn_generate_thumbnail, for example) to prevent problems with displaying new images. CS-Cart automatically adds a timestamp of an image create allowing a browser to load a new image.





    [size=5]API[/size]
  1. Several new entities for products were added: Options, Combinations, Exceptions, Usergroups
  2. The default API version is now 2.0. If you want to use API 1.0, specify it in URL, for example: [url=“http://example.com/api/1.0/stores/”]http://example.com/api/1.0/stores/[/url]



    [size=5]Backend CACHE Improvements[/size]
  3. New caching system possibilities were added. Now it is possible to use APC cache, XCache

$config['cache_backend'] = 'xcache';
$config['cache_backend'] = 'apc';




2. The blocks caching system was modified strongly. Now, practically all blocks are saved in cache, including main_content block. So, if you develop a new block, you might need to disable blocks cache- use the following setting in the local_conf.php file:

$config['tweaks']['disable_block_cache'] = true;



[size=5]Filters and Product Features[/size]

We have absolutely changed the Filters and Features functionality. If your add-on deals with filters and features, check its functionality.

Pay attention that templates used in version 4.2.x are not compatible with templates used in version 4.3.x.

Make sure to update all templates located in the templates/blocks/product_filters/ directory.



[size=5]Upgrade Center[/size]

Upgrade Center was fully rebuilt.

Now it works with migrations for changing the database.

Finally, we added the possibility to upgrade your add-ons through the CS-Cart core.

To help you understand the upgrade process, we added the self-upgrading add-on to the package.



[size=5]CSRF protections[/size]

All the data control (remove, update, clone, etc.) now processed with the POST requests. Not to add forms everywhere, just add the cm-post class to the Delete type link.



Now it is possible to process not only GET requests in a console (by default), but POST requests too. To do it, use the -p key:



php admin.php –dispatch=addons.install –addon=seo –p





[size=5]Languages & Translations [/size]

Now it is possible to add only new language variables from the PO package. To do it, to the installLanguagePack function options add the following flag:

'install_newly_added' => true





[size=5]News & Emails add-on[/size]

The News and Emails add-on was depricated and divided into 2 separate add-ons:

  • Newsletters
  • Blog





    [size=5]Images Verification (Captcha)[/size]

    Functions were changed. The “use_for” prefix was removed.

    Let see the Form builder add-on as anexample:

    -fn_image_verification('use_for_form_builder', $_REQUEST)

    +fn_image_verification('form_builder', $_REQUEST)

    Also you should add the variant for the new object on Image Verification settings. Use the “settings_variants_image_verification_use_for” hook. See the above add-on as an example.



    [size=5]Checkout[/size]

    We have changed the checkout logic. Now it is possible to turn off payment/shipping checkout steps. If your add-on deals with the checkout steps, check its functionality.



    The $_SESSION['edit_step'] variable was moved to $_SESSION['cart']['edit_step']. For the backward compatibility it is duplicated in $_SESSION['edit_step'] for 4.3.x.



    The hook in the {hook name=“checkout:edit_link”} templates was changed. Earlier, there was one hook used in all four stepts. It was impossible to find out the step from the hook. Now, all 4 hooks have different names: {hook name=“checkout:step_one_edit_link”}, {hook name=“checkout:step_two_edit_link”}, {hook name=“checkout:step_three_edit_link”}, {hook name=“checkout:step_four_edit_link_title”}



    [size=5]SEO add-on[/size]

    Here are some changes in the caching system too. There is no more the fn_seo_get_cache_name function.

    The SeoCache class was added.

    -$id_path = fn_seo_get_cache_name('path', $object_type, $object_id, $company_id, $lang_code);
  • $id_path = SeoCache::get('path', $object_type, $object_id, $company_id, $lang_code);





    [size=5]Frontend Logo[/size]

    Logos are now related to styles (earlier, they were common for a layout).

    You can add $logo_data['style_id'] to the [color=#1A1A1A]fn_update_logo($logo_data, $company_id) [/color])so your logo will be linked to a specific style.





    [size=5]ExIm: Export images[/size]

    Parameters of the fn_export_image function were changed.

    -function fn_export_image($image_id, $object, $backup_path = )

    +function fn_export_image($image_id, $object, $backup_path = , $include_alt = true)

    The output format was changed too. An image description was added.





    [size=5]Product Options: Exceptions[/size]

    For working with exceptions and combinations, the following functions were added:

    +function fn_update_exception($exception_data, $exception_id = 0)

    +function fn_recalculate_exceptions($product_id)

    +function fn_delete_exception($exception_id)

    +function fn_get_product_exception_data($exception_id)

    +function fn_update_option_combination($combination_data, $combination_hash = 0)

    +function fn_delete_option_combination($combination_hash)





    [size=5]Payments[/size]

    Payment functions fn_get_payment_templates & fn_get_payment_processors were moved from controller to fn.cart.php

    Function fn_get_payment_methods is Depricated.





    [size=5]Image Processing[/size]

    Imagick support was added for image processing and thumbnail generation.

    To use imagick, it is required it to be installed on your server. Define the following parameter in the config file:

    $config['tweaks']['image_resize_lib'] = 'imagick';

    Imagick better resizes and compresses images.





    [size=5]Frontend: JavaScript[/size]

    All scripts are loaded at the bottom of a page (non-blocking downloads). All the inline scripts from templates and blocks are automatically cut and paste after the {/scripts} tag.



    Not to cut the inline script, add the data-no-defer data attribute to the tag. In this case the script will stay at the same place where it was declared.



    To switch off the JS compilation in one file and leave it without compression, use the tweak flag:

$config['tweaks']['dev_js'] = true;







[size=5]Useful Tech Info[/size]

  • Smarty was updated from Smarty-3.1.18 to Smarty-3.1.21-dev version.


  • The Debugger mode was improved. It is possible to see in more details the page generation or blocks loading time, etc.



    If your add-on works in different modes depending on the DEVELOPMENT constant, use the fn_is_development() function instead of is_defined('DEVELOPMENT'):

    -if (!defined('DEVELOPMENT')) {
  • if (!fn_is_development()) {


  • Anti CSRF was enabled in the config since 4.3.1

    config.local.php:

    $config['tweaks']['anti_csrf'] = true







    [size=5]Hook Changes[/size]

    -fn_set_hook('form_cart', $order_info, $cart);

    +fn_set_hook('form_cart', $order_info, $cart, $auth);



    -fn_set_hook('before_dispatch');

    +fn_set_hook('before_dispatch', $controller, $mode, $action, $dispatch_extra, $area);



    -fn_set_hook('get_page_data_pre', $page_id, $lang_code, $preview);

    +fn_set_hook('get_page_data_pre', $page_id, $lang_code, $preview, $area);



    -fn_set_hook('get_page_data', $cache[$page_id], $lang_code);

    +fn_set_hook('get_page_data', $page_data, $lang_code, $preview, $area);



    -fn_set_hook('post_add_to_cart', $product_data, $cart, $auth, $update);

    +fn_set_hook('post_add_to_cart', $product_data, $cart, $auth, $update, $ids);



    -fn_set_hook('form_cart', $order_info, $cart);

    +fn_set_hook('form_cart', $order_info, $cart, $auth);



    -fn_set_hook('allow_place_order', $total, $cart);

    +fn_set_hook('allow_place_order', $total, $cart, $parent_order_id);



    -fn_set_hook('get_products_layout_post', $selected_layout, $params);

    +fn_set_hook('get_products_layout_post', $selected_view, $params);



    -fn_set_hook('delete_company_pre', $company_id);

    +fn_set_hook('delete_company_pre', $company_id, $can_delete);



    -fn_set_hook('before_dispatch');

    +fn_set_hook('before_dispatch', $controller, $mode, $action, $dispatch_extra, $area);



    -fn_set_hook('check_and_update_product_sharing', $product_id, $shared, $shared_categories_company_ids, $new_categories_company_ids);

    +fn_set_hook('check_and_update_product_sharing', $product_id, $shared, $existing_company_ids, $product_categories_company_ids);



    [size=5]New Hooks[/size]
  • fn.cart.php -

    fn_set_hook('get_payments', $params, $fields, $join, $order, $condition, $having);

    fn_set_hook('get_payments_post', $params, $payments);

    fn_set_hook('exclude_from_shipping_calculation', $product, $exclude);

    fn_set_hook('get_payment_processors', $lang_code, $fields, $join, $condition);

    fn_set_hook('get_payment_processors_post', $lang_code, $processors);

    fn_set_hook('get_processor_data_by_name', $processor_script, $processor_data);


  • fn.catalog.php -

    fn_set_hook('update_exceptions_pre', $product_id, $exceptions);

    fn_set_hook('update_exceptions_post', $product_id, $exceptions);

    fn_set_hook('get_product_exception_data_pre', $product_id);

    fn_set_hook('get_product_exception_data_pre', $product_id, $exception_data);

    fn_set_hook('update_exception_pre', $exception_data, $exception_id);

    fn_set_hook('update_exception_post', $exception_data, $exception_id);

    fn_set_hook('delete_exception_pre', $combination_hash);

    fn_set_hook('load_products_extra_data', $extra_fields, $products, $product_ids, $params, $lang_code);

    fn_set_hook('load_products_extra_data_post', $products, $product_ids, $params, $lang_code);

    fn_set_hook('get_product_details_view_pre', $product_id);

    fn_set_hook('get_product_details_view_post', $result, $product_id);

    fn_set_hook('update_product_categories_pre', $product_id, $product_data);

    fn_set_hook('update_product_categories_post', $product_id, $product_data, $existing_categories, $rebuild);

    fn_set_hook('get_filters_products_count_pre', $params);

    fn_set_hook('get_filters_products_count_before_select_filters', $sf_fields, $sf_join, $condition, $sf_sorting, $params);

    fn_set_hook('get_product_filter_fields', $filters);

    fn_set_hook('get_product_options_inventory_pre', $params, $items_per_page, $lang_code);

    fn_set_hook('get_product_options_inventory_post', $params, $items_per_page, $lang_code, $inventory);

    fn_set_hook('get_product_options_combination_data_post', $combination_hash, $combination);

    fn_set_hook('update_option_combination_pre', $combination_data, $combination_hash);

    fn_set_hook('update_option_combination_pre', $combination_data, $combination_hash, $inventory_amount);

    fn_set_hook('delete_option_combination_pre', $combination_hash);

    fn_set_hook('get_pages_pre', $params, $items_per_page, $lang_code);


  • fn.cms.php -

    fn_set_hook('dropdown_object_link_pre', $object_data, $object_type);

    fn_set_hook('dropdown_object_link_post', $object_data, $object_type, $result);

    fn_set_hook('pre_get_page_data', $field_list, $join, $condition, $lang_code);

    fn_set_hook('get_page_data', $page_data, $lang_code, $preview, $area);


  • fn.controll.php -

    fn_set_hook('get_storefront_url', $protocol, $company_id, $url);


  • fn.fs.php -

    fn_set_hook('check_uploaded_data_pre', $uploaded_data, $filter_by_ext, $result, $processed);

    fn_set_hook('check_uploaded_data_post', $uploaded_data, $filter_by_ext, $result, $processed);


  • fn.multivendor.php -

    fn_set_hook('mve_place_order', $order_info, $company_data, $action, $__order_status, $cart, $_data);

    fn_set_hook('mve_companies_get_payouts', $bcf_query, $current_payouts_query, $payouts_query, $join, $total, $condition, $date_condition);


  • fn.search.php -

    fn_set_hook('create_products_condition_pre', $params, $lang_code);

    fn_set_hook('create_products_condition_post', $params, $lang_code, $data);

    fn_set_hook('create_orders_condition_pre', $params, $lang_code);

    fn_set_hook('create_orders_condition_post', $params, $lang_code, $data);

    fn_set_hook('create_users_condition_pre', $params, $lang_code);

    fn_set_hook('create_users_condition_post', $params, $lang_code, $data);


  • fn.users.php -

    fn_set_hook('get_usergroups_pre', $params, $lang_code);

    fn_set_hook('get_usergroups_post', $usergroups, $params, $lang_code);

    fn_set_hook('update_usergroup', $usergroup_data, $usergroup_id, $create);

    fn_set_hook('delete_usergroups', $usergroup_ids);



    [size=5]Deleted hooks[/size]

    fn_set_hook('exclude_from_shipping_calculation', $product, $exclude);

    fn_set_hook('get_frontend_css_post', $files);
  • Filters & Features Hooks -

    fn_set_hook('get_filters_products_count_pre', $params);

    fn_set_hook('get_filters_products_count_before_select_filters', $sf_fields, $sf_join, $condition, $sf_sorting, $params);

    fn_set_hook('get_filters_products_count_query_params', $values_fields, $join, $sliders_join, $feature_ids, $where, $sliders_where, $filter_vq, $filter_rq);

    fn_set_hook('get_filters_products_count_before_select', $filters, $view_all, $params);

    fn_set_hook('check_selected_filter_pre', $element_id, $feature_type, $request_params, $field_type);

    fn_set_hook('check_selected_filter_post', $result, $element_id, $feature_type, $request_params, $field_type);

    fn_set_hook('delete_range_from_url_pre', $url, $range, $field_type);

    fn_set_hook('delete_range_from_url_post', $result, $url, $range, $field_type);

    fn_set_hook('add_range_to_url_hash_pre', $hash, $range, $field_type);

    fn_set_hook('add_range_to_url_hash_post', $result, $hash, $range, $field_type);

    fn_set_hook('add_filter_ranges_breadcrumbs_pre', $request, $url);

    fn_set_hook('add_filter_ranges_breadcrumbs_post', $request, $url);

    fn_set_hook('get_filter_range_name_pre', $range_type, $range_id);

    fn_set_hook('get_filter_range_name_post', $range_name, $range_type, $range_id);

    fn_set_hook('delete_product_filter', $filter_id, $range_ids);

    fn_set_hook('parse_features_hash_pre', $features_hash, $values);

    fn_set_hook('parse_features_hash_post', $result, $features_hash, $values);

    fn_set_hook('get_product_filter_fields', $filters);





    [size=5]DB Schema[/size]
  • These categories fields were changed in cscart_categories table:

    -selected_layouts

    +selected_views

    -default_layout

    +default_view

    -product_details_layout

    +product_details_view

    e.g. of the use in code

    -$category['selected_layouts']

    +$category['selected_views']


  • All the database structure adapted for working in the strict mode.

    “NOT NULL” argument was removed from fields defenition in struct.sql & Add-ons configs.

    -readme text NOT NULL,

    +readme text,





    [size=5]Core functions[/size]

    [size=4]Changed functions[/size]

    -function fn_get_page_data($page_id, $lang_code = CART_LANGUAGE, $preview = false)

    +function fn_get_page_data($page_id, $lang_code = CART_LANGUAGE, $preview = false, $area = AREA)



    -function fn_promotion_apply_discount($promotion_id, $bonus, &$product, $use_base = true)

    +function fn_promotion_apply_discount($promotion_id, $bonus, &$product, $use_base = true, &$cart = null, &$cart_products = null)



    -function fn_get_usergroups($type, $lang_code = CART_LANGUAGE)

    +function fn_get_usergroups($params = array(), $lang_code = CART_LANGUAGE)

    Spported params:

    $params = array(

    'usergroup_id'

    'status'

    'type'

    'with_privileges'

    'include_default'

    )



    -function fn_fill_auth($user_data = array(), $order_ids = array(), $act_as_user = false, $area = AREA)

    +function fn_fill_auth($user_data = array(), $original_auth = array(), $act_as_user = false, $area = AREA)



    -fn_allow_place_order(&$cart, $auth = null, $parent_order_id = null)

    +fn_allow_place_order(&$cart, $auth = null)



    -fn_create_payment_form($submit_url, $data, $payment_name = '', $exclude_empty_values = true, $method = 'post')

    +fn_create_payment_form($submit_url, $data, $payment_name = '', $exclude_empty_values = true, $method = 'post', $parse_url = true, $target = 'form')



    -fn_get_all_brands($object, $block, $scheme)

    +fn_get_all_brands()



    -fn_ftp_connect($settings)

    +fn_ftp_connect($settings, $show_notifications = false)



    -fn_promotion_apply_discount($promotion_id, $bonus, &$product, $use_base = true)

    +fn_promotion_apply_discount($promotion_id, $bonus, &$product, $use_base = true, &$cart = null, &$cart_products = null)



    -fn_ult_dispatch_assign_template($controller, $mode, $area)

    +fn_ult_dispatch_assign_template($controller, $mode, $area, &$controllers_cascade)



    New functions
  • fn.addons.php -

    fn_update_addon_settings_originals($addon_id, $name, $type, $value)


  • fn.cart.php -

    fn_checkout_update_steps(&$cart, &$auth, $params)

    fn_checkout_place_order(&$cart, &$auth, $params)


  • fn.catalog.php -

    fn_filter_redundant_deleting_category_ids(array $category_ids)

    fn_category_exists($category_id, $additional_condition = null)

    fn_update_exceptions($product_id)

    fn_get_product_exception_data($exception_id)

    fn_recalculate_exceptions($product_id)

    fn_update_exception($exception_data, $exception_id = 0)

    fn_load_products_extra_data($products, $params, $lang_code)

    fn_load_extra_data_by_entity_ids($params, $item_ids)

    fn_merge_extra_data_to_entity_list($extra_data, &$entities)

    fn_get_product_details_view($product_id)

    fn_get_filters_products_count($params = array(), $lang_code = CART_LANGUAGE)

    fn_delete_filter_from_hash($features_hash, $filter_id, $variant = '')

    fn_add_filter_to_hash($features_hash, $filter_id, $variant = '')

    fn_generate_filter_hash($filters)

    fn_parse_filters_hash($features_hash = '')

    fn_split_selected_feature_variants($key, $items, $selected_items)

    fn_generate_feature_conditions($key, $items, $selected_items, $join, $condition, $alias_products, $lang_code)

    fn_generate_filter_field_params($params, $filters, $selected_filters)

    fn_get_current_filters($params, $filters, $selected_filters, $area = AREA, $lang_code = CART_LANGUAGE)

    fn_filter_process_ranges($range_values, $filters, $selected_filters)

    fn_get_product_filter_fields()

    fn_get_product_options_inventory($params, $items_per_page = 0, $lang_code = DESCR_SL)

    fn_get_product_options_combination_data($combination_hash, $lang_code = DESCR_SL)

    fn_update_option_combination($combination_data, $combination_hash = 0)

    fn_delete_option_combination($combination_hash)


  • fn.cms.php -

    fn_get_page_type_filter($page_type = '')

    fn_is_exclusive_page_type($page_type)

    fn_page_exists($page_id, $additional_condition = null)


  • fn.common.php -

    fn_array_value_to_key($array, $key_field)

    fn_get_public_files_path()

    fn_compare_values_by_operator($left_operand, $operator, $right_operand)

    fn_dot_syntax_get($path, $data, $default_value = null)

    fn_array_elements_to_keys($data, $key_field)

    fn_is_development()

    fn_get_secondary_currency()

    fn_change_session_param(&$session, $request, $param_name)


  • fn.companies.php -

    fn_blocks_get_vendor_info()


  • fn.control.php -

    fn_get_storefront_url($protocol = 'current', $company_id = 0)

    fn_get_request_uri($request_uri)

    fn_check_requested_url($area = AREA)


  • fn.fs.php -

    fn_get_ext_mime_types($key = 'ext')


  • fn.multivendor.php -

    fn_mve_get_product_filter_fields(&$filters)

    fn_mve_delete_user(&$user_id, &$user_data)

    fn_mve_get_user_type_description(&$type_descr)

    fn_mve_get_user_types(&$types)

    fn_mve_user_need_login(&$types)

    fn_mve_place_order(&$order_id, &$action, &$__order_status, &$cart)

    fn_mve_delete_category_after(&$category_id)

    fn_mve_export_process(&$pattern, &$export_fields, &$options, &$conditions, &$joins, &$table_fields, &$processes)

    fn_mve_get_users(&$params, &$fields, &$sortings, &$condition, &$join)

    fn_mve_import_get_primary_object_id(&$pattern, &$_alt_keys, &$v, &$skip_get_primary_object_id)

    fn_mve_import_check_product_data(&$v, $primary_object_id, &$options, &$processed_data, &$skip_record)

    fn_mve_import_check_object_id(&$primary_object_id, &$processed_data, &$skip_record, $object = 'products')

    fn_import_reset_company_id($import_data)

    fn_mve_import_check_company_id(&$primary_object_id, &$v, &$processed_data, &$skip_record)

    fn_mve_set_admin_notification(&$auth)

    fn_mve_get_companies(&$params, &$fields, &$sortings, &$condition, &$join, &$auth, &$lang_code)

    fn_mve_delete_order(&$order_id)

    fn_mve_get_user_info_before(&$condition, &$user_id, &$user_fields)

    fn_mve_get_product_options(&$fields, &$condition, &$join, &$extra_variant_fields, &$product_ids, &$lang_code)

    fn_mve_get_product_global_options_before_select(&$params, &$fields, &$condition, &$join)

    fn_mve_get_product_option_data_pre(&$option_id, &$product_id, &$fields, &$condition, &$join, &$extra_variant_fields, &$lang_code)

    fn_mve_clone_page_pre(&$page_id, &$data)

    fn_mve_update_page_post(&$page_data, &$page_id, &$lang_code, &$create, &$old_page_data)

    fn_check_addon_permission($addon)

    fn_companies_get_payouts($params = array(), $items_per_page = 0)

    fn_companies_delete_payout($ids)

    fn_companies_add_payout($payment)

    fn_get_company_customers_ids($company_id)

    fn_take_payment_surcharge_from_vendor($products)

    fn_mve_update_page_before(&$page_data, &$page_id, &$lang_code)

    fn_mve_update_product($product_data, $product_id, $lang_code, $create)

    fn_mve_check_permission_manage_profiles(&$result, &$user_type)

    fn_mve_get_request_user_type(&$user_type, &$params, &$area)

    fn_mve_delete_shipping($shipping_id)

    fn_mve_get_products(&$params, &$fields, &$sortings, &$condition, &$join, &$sorting, &$group_by, $lang_code)

    fn_mve_logo_types(&$types, &$for_company)

    fn_get_products_companies($products)

    fn_get_vendor_categories($params)

    fn_mve_dropdown_object_link_post(&$object_data, &$object_type, &$result)

    fn_mve_settings_variants_image_verification_use_for(&$objects)


  • fn.promotins.php -

    fn_check_promotion_conditions($promotion_data, &$context_data, &$auth, &$cart_products)

    fn_check_promotion_condition_groups_recursive($conditions_group, $promotion_data, &$context_data, &$auth, &$cart_products)

    fn_get_cart_subtotal_with_discount($cart)

    fn_promotion_check_coupon_code_once_per_customer($coupon_code_check_results, $all_checked_conditions, $promotion_check_result)

    fn_promotion_shippings($this, $cart)


  • fn.ultimate.php -

    fn_ult_load_products_extra_data(&$extra_fields, $products, $product_ids, $params, $lang_code)

    fn_ult_load_products_extra_data_post(&$products, $product_ids, $params, $lang_code)

    fn_ult_correct_category_products_sharing($category_id, $category_id_path)

    fn_ult_update_product_categories_pre($product_id, &$product_data)

    fn_get_storefront_url($protocol = 'current', $company_id = 0)


  • fn.users.php -

    fn_get_user_usergroup_links($user_id, $criteria = array())

    fn_update_usergroup($usergroup_data, $usergroup_id = 0, $lang_code = DESCR_SL)

    fn_change_usergroup_status($status, $user_id, $usergroup_id, $force_notification = array())

    fn_send_usergroup_status_notification($user_id, $usergroup_ids, $status)

    fn_is_usergroup_exists($usergroup_id)

    fn_delete_usergroups($usergroup_ids)



    Deleted functions

    fn_restore_dump

    fn_correct_features_hash($features_hash)

    fn_get_filters_products_count($params = array())

    fn_check_selected_filter($element_id, $feature_type = '', $request_params = array(), $field_type = '')

    fn_delete_range_from_url($url, $range, $field_type = '')

    fn_add_range_to_url_hash($hash, $range, $field_type = '')

    fn_add_filter_ranges_breadcrumbs($request, $url = '')

    fn_get_filter_range_name($range_type, $range_id)

    fn_parse_features_hash($features_hash = '', $values = true)

    fn_get_product_filter_fields()

    fn_ult_sitemap_get_links(&$links_fields, &$links_tables, &$links_left_join, &$links_condition)



    [size=5]File changes[/size]

    Controller backend/database.php was removed.

Forum SW doesn't seem to like some of these things quoted…

– start of quotation

To help you understand the upgrade process, we added the self-upgrading add-on to the package.

– end quotation



Can you elaborate or provide specification or documentation?



Forum SW doesn't seem to like this quoted…

– start of quotation

The hook in the {hook name=“checkout:edit_link”} templates was changed. Earlier, there was one hook used in all four stepts. It was impossible to find out the step from the hook. Now, all 4 hooks have different names: {hook name=“checkout:step_one_edit_link”}, {hook name=“checkout:step_two_edit_link”}, {hook name=“checkout:step_three_edit_link”}, {hook name=“checkout:step_four_edit_link_title”}

– end of quotattion



Is the original edit_step still available and supported? Seems easy enough in the hook to do {if $smarty.session.edit_step == “step_one”}… Hopefully you left this for compatibility. Please advise.


[quote]

Here are some changes in the caching system too. There is no more the fn_seo_get_cache_name function.

The SeoCache class was added.

-$id_path = fn_seo_get_cache_name('path', $object_type, $object_id, $company_id, $lang_code);

  • $id_path = SeoCache::get('path', $object_type, $object_id, $company_id, $lang_code);

    [/quote]

    Was the function left for compatibility? I.e.


function fn_seo_get_cache_name($path, $object_type, $object_id, $company_id, $lang_code=DESCR_SL) {
return SeoCache::get($path, $object_type, $object_id, $company_id, $lang_code);



[quote]

All scripts are loaded at the bottom of a page (non-blocking downloads). All the inline scripts from templates and blocks are automatically cut and paste after the {/scripts} tag.

[/quote]

Is this done automatically for all templates?


[quote]

If your add-on works in different modes depending on the DEVELOPMENT constant, use the fn_is_development() function instead of is_defined('DEVELOPMENT'):

[/quote]

Is the define still there for compatibility? How does one now “set” development mode so that things like the “out of Service” or “Store closed” page can be diagnosed? Same with error reporting, etc…



Thank you for the detailed list. Seems that all our production addons should be okay. Only thing I see that can bite me is if calling define('DEVELOPEMNT', true) no longer enables DEVELOPMENT mode.

[quote] Can you elaborate or provide specification or documentation? [/quote]



Documentation is now ready yet.

We've uploaded a fake add-on to GitHub - cscart/addons - It has upgrade in it, So you can take a look at its structure & files.


[quote]

Is the original edit_step still available and supported? Seems easy enough in the hook to do {if $smarty.session.edit_step == “step_one”}… Hopefully you left this for compatibility. Please advise.

[/quote]



No, the original hook was removed. Including one hook in another could lead to more problems I suppose.


[quote]

Is this done automatically for all templates?

[/quote]

Yes. BTW we created an article in KB regarding possible problems with this: CS-Cart Documentation — CS-Cart 4.15.x documentation

Also you can use dev_js option from tweak settings in config.local to disable this feature.




[quote]

Is the define still there for compatibility? How does one now “set” development mode so that things like the “out of Service” or “Store closed” page can be diagnosed? Same with error reporting, etc…

[/quote]

In 4.2.4 and earlier in order to enable the development mode you should add this line:

define('DEVELOPMENT', true)

But the define('DEVELOPMENT', false) would still enabled the development mode. So there was no this constant in the config file. And developers just did not know about this until they read docs.

You can set the development mode the same way you did in previous versions, it will work.

[quote]No, the original hook was removed. Including one hook in another could lead to more problems I suppose.[/quote]

What I was suggesting was something like:


{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y"}

{hook name="checkout:checkout_steps"}{/hook}
{hook name="checkout:checkout_step_one"}{/hook}


This would allow more specific for those that want to use it and enable compatibility for those that already have their logic in place.


[quote]Yes. BTW we created an article in KB regarding possible problems with this[/quote]

There's also issues with tracking code that may not be executed on slow devices (like mobile) if the user navigates before the page completes loading. We're in the middle of a major tracking project for a customer and we are not using jQuery to update html attributes for exactly this reason. We don't want the risk of deferred execution but then Big-G is going to downgrade us for inline JS even though it's non-blocking… We are having to add code to the templates to support new data-gtm attributes… But of course, their tag manager is fine…! Grr…

Fix for





is:






<br />
msgctxt "LanguageName"<br />
msgid "Localized language name"<br />
msgstr "English"<br />

```<br />
<br />
I hope to save you at least 20 min of digging <img src="upload://ssa1U17ndImgNZSdwFNmOF2yUgM.png" class="bbc_emoticon" alt=";)"> <br />
<br />
PS: Seams like is present also in 4.2.4 but there you don't get any error <img src="upload://ssa1U17ndImgNZSdwFNmOF2yUgM.png" class="bbc_emoticon" alt=";)"><br />
<br />
[color=#282828][font=arial, verdana, tahoma, sans-serif]Keep on smiling,[/font][/color]<br />
<br />
[color=#282828][font=arial, verdana, tahoma, sans-serif]---[/font][/color]<br />
[color=#282828][font=arial, verdana, tahoma, sans-serif]Valentin[/font][/color]<br />
[color=#808080][font=arial, verdana, tahoma, sans-serif][size=2]part of hungryweb.net[/size][/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif] [/font][/color]

[quote name='Vali' timestamp='1430378902' post='213027']

[color=#282828][font=arial, verdana, tahoma, sans-serif]I hope to save you at least 20 min of digging[/font][/color]

[/quote]



Thanks. Wish i saw this post a couple of hours ago.