AddOns are built on top of the existing hybris Commerce Suite to extend the functionality of the hybris Commerce Accelerator. AddOns are a type of extension that allow you to add front-end files (such .jsp, .html, .css, and javascript files, as well as images) from within your own AddOn, instead of modifying the storefront front-end files directly.
AddOn Creation
Flow the below link: https://wiki.hybris.com/display/accdoc/Creating+AddOns
After addon creation
copy the all files and folders ( https://wiki.hybris.com/display/accdoc/Copying+Files+Between+an+AddOn+Extension+and+a+Target+Storefront )
in this path
/hybris/bin/custom/org/customstorefront/web/webroot/_ui TO customaddon/acceleratoraddon/web/webroot/_ui
/hybris/bin/custom/org/customstorefront/web/webroot/WEB-INF TO customaddon /acceleratoraddon/web/webroot/WEB-INF
Dependency add on Storefront
add the addon extention as a required extention in the extensioninfo.xml of storefront extension file.
Installing an AddOn for a Specific Storefront ( https://wiki.hybris.com/pages/viewpage.action?spaceKey=accdoc&title=Installing+an+AddOn+for+a+Specific+Storefront )
ant addoninstall -Daddonnames=”AddOnName1,AddOnName2″ -DaddonStorefront.=”Storefront1,Storefront2″
ex: ant addoninstall -Daddonnames=”customaddon” -DaddonStorefront.yacceleratorstorefront=”customstorefront”
now whatever changes done on the addon it will refelt to our storefront.
Flow this trail to do changes on addon
https://wiki.hybris.com/display/accdoc/Customizing+the+Storefront+using+an+AddOn
Configuration to be done to install the addon by hybris itself to a particular storefront (with out running the addoninstall command):
Change the Below line in your addon’s project.properties file :
From
yacceleratorstorefront.additionalWebSpringConfigs.accountsummaryaddon=
classpath\:/accountsummaryaddon/web/spring/accountsummaryaddon-web-spring.xml
To
<yourstorefrontname>.additionalWebSpringConfigs.<youraddonname>=classpath\:/<youraddonname>/web/spring/<youraddonname>-web-spring.xml
Add your addon as requires-extension in your storefront extension’s extentioninfo.xml file:
<requires-extension name=”<youraddonname>”/>
Now, when we run ant all command your addon will be installed to your storefront.