Create new addons

Addons allow easy modification, customization, and enhancement of a design tool. Instead of changing the core programming of design tool, you can add functionality with addon.

Step by step to create addon of T-Shirt eCommerce

Addons Files:

  • tshirtecommerce/addons/css/your-file.css
//Your CSS
  • tshirtecommerce/addons/js/your-file.js

You can use all hooks in this file.

// url use with ajax call to file tshirtecommerce/addons/ajax/method.php
var url = siteURL + "ajax.php?type=method&params=string";

//Your code
  • tshirtecommerce/addons/language/language.ini
my_addon_title="My Addon"
  • tshirtecommerce/addons/ajax/method.php

// read language
$addons  = $GLOBALS['addons'];
echo $addon->__('my_addon_title');

// call settings
$settings  = $GLOBALS['settings'];

// call product
$product  = $GLOBALS['product'];
  • wp-content/plugins/tshirtecommerce/includes/file.php

You can use all hooks, action of wordpress

 

Note: Please look more files in folder: tshirtecommerce/addons