View Single Post
  #1  
Old 04-11-2013, 05:15 AM
  random's Avatar 
random random is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 79
 

Default X-Cart 4.5.6 upcoming changes (UPDATE: the next version will be 4.6.0, but not 4.5.6)

Dear X-Cart mod developers,

We would like to inform you that the several changes will be introduced to the module system:

1) Redesigned "Modules" page which will use AJAX to enable/disable modules.

2) This leads to module enable/disable event changes - former "module_enable" event is now called "module.enable" and NOT called immediately (it is now postponed till next page open)

3) To do something exactly at a time module is enabled/disabled, you should now add listener for "module.ajax.toggle" event, which will be called with 2 arguments: (string) $module_name, ($bool) $active

Doing func_header_location() will not work during this event, you should instead return redirect url in your function, e.g. return "modules.php" to reload the page after AJAX request.

Moreover, if module sets "$top_message" during this event it will be displayed after AJAX request is completed. Current limitations: only "information" message type is supported.

4) It is now possible to prevent store crash if store admin tries to enable incompatible module which makes every store page showing Fatal Error constantly.

5) Pay attention to the fact that this protection will not work if module is enabled directly in database, so you should make installer insert module entry in disabled (N) status.

6) Module tags which can be used for filtering modules to be displayed.
There is a new field in "xcart_modules", called "tags".
You can specify allowed tags for your module delimited by comma here.

List of allowed tags:
checkout,
marketing,
misc,
orders,
products,
security,
shipping,
stats,
taxes,
tools,
userexp (User Experience),

7) It is now possible for module to specify css for admin back-end.
Just add the follosing code to module's config.php
$css_files['Module_Name'][] = array('admin' => true);
and place "admin.css" to your module skin dir.

8 ) Due to optimisation, any changes to xcart_products withou calling "func_build_quick_flags" + "func_build_quick_prices" after it, will lead to database incosistency.

Any code which makes direct changes in xcart_products_categories and/or updates avail in xcart_categories must be revised.

9) For the function "func_search_products" we changed the "from_tbls" format

Please let me know if you have any questions.
__________________
Sincerely yours,
Vladimir Petrov
Senior X-Payments Developer
Reply With Quote