Editing Extensions and Widgets Creation

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 2: Line 2:


'''Basic Provisions:'''
'''Basic Provisions:'''
# All extensions must be placed in separate folder.
# 1. All extensions must be placed in separate folder.
# The class file name must be the same as the folder name.
# 2. The class file name must be the same as the folder name.
# Templates must be placed in folder 'views'.
# 3. Templates must be placed in folder 'views'.


//additional
//additional
if you want to use widgets in extensions
if you want to use widgets in extensions
1. Add method getWidgets with $type parameter and describe widgets in array
1. Add method getWidgets with $type parameter and describe widgets in array
example:
example:
return [
return [


Line 25: Line 21:


in this case ShoppingCart (in subfolder \ShoppingCart) is widget ( ShoppingCart.php) can be used in customizing Themes
in this case ShoppingCart (in subfolder \ShoppingCart) is widget ( ShoppingCart.php) can be used in customizing Themes
2. to show additional settings for widget use method showSettings
2. to show additional settings for widget use method showSettings
example:
example:


Line 37: Line 31:


extension installer:
extension installer:
1) extends \common\classes\modules\ModuleExtensions
1) extends \common\classes\modules\ModuleExtensions
2) install (example)
2) install (example)


Please note that all contributions to osCommerce Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see OsCommerce Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)