- <?xml version="1.0" encoding="UTF-8"?>
- <hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
- <extensions>
- <!--
- All extensions located in ${HYBRIS_BIN_DIR}/platform/ext are automatically loaded.
- More information about how to configure available extensions can be found here : https://wiki.hybris.com/x/nZVzC
- -->
- <path dir="${HYBRIS_BIN_DIR}" />
- <!-- ext-platform -->
- <extension name="admincockpit" />
- <extension name="backoffice" />
- <extension name="cockpit" />
- <extension name="hmc" />
- <extension name="mcc" />
- <extension name="platformhmc" />
- <!-- ext-platform-optional -->
- <extension name="ldap" />
- <extension name="lucenesearch" />
- <extension name="virtualjdbc" />
- <!-- ext-cockpit -->
- <extension name="reportcockpit" />
- <!-- ext-commerce -->
- <extension name="btg" />
- <extension name="btgcockpit" />
- <extension name="commercesearch" />
- <extension name="commercesearchbackoffice" />
- <extension name="commercesearchhmc" />
- <extension name="commerceservices" />
- <extension name="basecommerce" />
- <extension name="payment" />
- <extension name="promotions" />
- <extension name="voucher" />
- <extension name="customerreview" />
- <extension name="ticketsystem" />
- <extension name="solrfacetsearch" />
- <extension name="solrfacetsearchhmc" />
- <extension name="oci" />
- <extension name="wishlist" />
- <extension name="commercefacades" />
- <extension name="commercewebservicescommons" />
- <!-- ext-content -->
- <extension name="productcockpit" />
- <extension name="cms2" />
- <extension name="cms2lib" />
- <extension name="cmscockpit" />
- <extension name="bmecat" />
- <extension name="bmecathmc" />
- <extension name="importcockpit" />
- <extension name="classificationsystems" />
- <extension name="classificationsystemshmc" />
- <!-- ext-channel -->
- <extension name="cscockpit" />
- <extension name="mobileoptionals" />
- <extension name="mobileservices" />
- <!-- ext-addon -->
- <extension name="addonsupport" />
- <extension name="b2ccheckoutaddon" />
- <!-- ext-print -->
- <extension name="print" />
- <extension name="printcockpit" />
- <extension name="printhmc" />
- <!-- ext-template -->
- <extension name="ycommercewebservices" />
- <extension name="ycommercewebserviceshmc" />
- <!-- ext-accelerator -->
- <extension name="acceleratorservices" />
- <extension name="acceleratorfacades" />
- <extension name="acceleratorcms" />
- <extension name="acceleratorstorefrontcommons" />
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstorefulfilmentprocess"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstorecore"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstoreinitialdata"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstorefacades"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstoretest"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstorestorefront"/>
- <extension dir="${HYBRIS_BIN_DIR}/custom/myb2cstore/myb2cstorecockpits"/>
- <!--extension name="yacceleratorinitialdata" />
- <extension name="yacceleratorcockpits" />
- <extension name="yacceleratorfulfilmentprocess" />
- <extension name="yacceleratorcore" />
- <extension name="yacceleratorfacades" />
- <extension name="yacceleratorstorefront" />
- <extension name="yacceleratortest" /-->
- <extension name="electronicsstore" />
- <extension name="apparelstore" />
- <extension dir="${HYBRIS_BIN_DIR}/ext-addon/b2ccheckoutaddon"/>
- <extension dir="${HYBRIS_BIN_DIR}/ext-addon/addonsupport"/>
- <extension dir="${HYBRIS_BIN_DIR}/ext-content/liveeditaddon"/>
- <extension dir="${HYBRIS_BIN_DIR}/ext-addon/acceleratorwebservicesaddon"/>
- </extensions>
- </hybrisconfig>
Hi welcome to this blogspot.Hybris is a well defined ecommerce tool.Here our aim is not to replicate hybris wiki. But we are trying to put things in a simple and exact way, so that anyone can get a quick start on Hybris.
Thursday, 30 June 2016
hybris-myb2cstore extension.info file looks like
Wednesday, 29 June 2016
hybris-Config iReport tool to build jasperreport
Here is the step by step to create jasperreport by iReport tool and use in Hybris.
1. Download iReportDesigner
http://community.jaspersoft.com/project/ireport-designer
2.Open iReportDesigner,
Add Classpath: Tools > Option > Classpath, add
[hybris home]\ext-platform-optional\virtualjdbc\bin\virtualjdbcserver.jar
[hybris home]\ext-platform-optional\virtualjdbc\lib\vjdbc.jar
[hybris home]\ext-platform-optional\cockpit\bin\cockpitserver.jar
3. New a DataSource with these information
JDBC Driver: de.hybris.vjdbc.VirtualDriver
JDBC URL: jdbc:hybris:sql:http://localhost:9001/virtualjdbc/service
Username: admin
Password: nimda
(It is hybris username, not DB username)
Click Test button, it should be connect successfully ( If not, check if Hybris is running)
4. Create a sample report
In iReportDesigner, File -> New -> Blank A4 Template
Click the button "Report Query" , write a sample Query (it can be normal SQL query or it can be a Flexible query)
For example: SELECT {p.code}, {p.name}, {p.description} FROM {Product AS p}
Then we will drap and drop the Column name into Detail Section, define header and ajust text if you want
**** To create parameter for report
In left panel, select Parameters -> Add.
****Note: In iReport Designer 5.5 we have "uuid" arrtibute, we should remove it before upload into hybris (in Notepad++, replace by expression uuid=".*" with space)
To import *.*.jrxml into Hybris, we have 2 options:
1. Create widget in ReportCockpit,then upload file .jrxml
http://localhost:9001/reportcockpit/index.zul
2. User impex file to import:
The format impex file as following:
# Language
$lang=en
$defaultCatalog=Default
$defaultCatalogVersion=Staged
$catalogVersion=catalogVersion(catalog(id[default='$defaultCatalog']),version[default='$defaultCatalogVersion'])[unique=true,default='$defaultCatalog:$defaultCatalogVersion']
$jasperreports_folder=jasperreports
$reportPath=jar:com.microsoft.store.cn.cockpits.setup.CockpitSystemSetup&/msscncockpits/reportcockpit/reports/sqlserver
INSERT_UPDATE JasperMedia;code[unique=true];realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true];folder(qualifier)[default=$jasperreports_folder];icon(code)[default=icon_jasperreport_wizard];$catalogVersion;mime[default='text/xml']
;MSCS-4015-Coupon1600Report;MSCS-4015-Coupon1600Report.jrxml;$reportPath/MSCS-4015-Coupon1600Report.jrxml
# Create Countries
UPDATE JasperMedia;code[unique=true];$catalogVersion;title[lang=$lang];reportDescription[lang=$lang];description
;MSCS-4015-Coupon1600Report;;"MSCS-4015-Coupon1600Report";"This widget displays orders which have been applied 1600 CNY Coupon";"MSCS-4015-Coupon1600Report"
5. work is done
1. Download iReportDesigner
http://community.jaspersoft.com/project/ireport-designer
2.Open iReportDesigner,
Add Classpath: Tools > Option > Classpath, add
[hybris home]\ext-platform-optional\virtualjdbc\bin\virtualjdbcserver.jar
[hybris home]\ext-platform-optional\virtualjdbc\lib\vjdbc.jar
[hybris home]\ext-platform-optional\cockpit\bin\cockpitserver.jar
3. New a DataSource with these information
JDBC Driver: de.hybris.vjdbc.VirtualDriver
JDBC URL: jdbc:hybris:sql:http://localhost:9001/virtualjdbc/service
Username: admin
Password: nimda
(It is hybris username, not DB username)
Click Test button, it should be connect successfully ( If not, check if Hybris is running)
4. Create a sample report
In iReportDesigner, File -> New -> Blank A4 Template
Click the button "Report Query" , write a sample Query (it can be normal SQL query or it can be a Flexible query)
For example: SELECT {p.code}, {p.name}, {p.description} FROM {Product AS p}
Then we will drap and drop the Column name into Detail Section, define header and ajust text if you want
**** To create parameter for report
In left panel, select Parameters -> Add.
****Note: In iReport Designer 5.5 we have "uuid" arrtibute, we should remove it before upload into hybris (in Notepad++, replace by expression uuid=".*" with space)
To import *.*.jrxml into Hybris, we have 2 options:
1. Create widget in ReportCockpit,then upload file .jrxml
http://localhost:9001/reportcockpit/index.zul
2. User impex file to import:
The format impex file as following:
# Language
$lang=en
$defaultCatalog=Default
$defaultCatalogVersion=Staged
$catalogVersion=catalogVersion(catalog(id[default='$defaultCatalog']),version[default='$defaultCatalogVersion'])[unique=true,default='$defaultCatalog:$defaultCatalogVersion']
$jasperreports_folder=jasperreports
$reportPath=jar:com.microsoft.store.cn.cockpits.setup.CockpitSystemSetup&/msscncockpits/reportcockpit/reports/sqlserver
INSERT_UPDATE JasperMedia;code[unique=true];realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true];folder(qualifier)[default=$jasperreports_folder];icon(code)[default=icon_jasperreport_wizard];$catalogVersion;mime[default='text/xml']
;MSCS-4015-Coupon1600Report;MSCS-4015-Coupon1600Report.jrxml;$reportPath/MSCS-4015-Coupon1600Report.jrxml
# Create Countries
UPDATE JasperMedia;code[unique=true];$catalogVersion;title[lang=$lang];reportDescription[lang=$lang];description
;MSCS-4015-Coupon1600Report;;"MSCS-4015-Coupon1600Report";"This widget displays orders which have been applied 1600 CNY Coupon";"MSCS-4015-Coupon1600Report"
5. work is done
Tuesday, 28 June 2016
hybris - setup accelerator site
Open a command line window and navigate to yourpath/bin/platform and execute the command
1. Setantenv.bat to ensure Ant is on your classpath
2. Ant clean which ask to press enter and after that it shows build successful. Now you can see the config folder generated in your hybris path which is responsible for configuration files.
3. Ant all
Import the codebase into eclipse
File -> Import -> general -> existing projects into workspace and click on Next.
Click browse button and select your hybris path which shows all the available extension.
Select the required extension and click finish.
Preparing Eclipse Ant view
Windows -> show view -> ant we can see the ant symbol
Click Add Build files in Ant window. Select and expand the
Platform extension and select build.xml
Set the Ant provided by hybris which is installed currently. Windows -> preferences - > Ant ( runtime ) click on Ant home and browse the path/bin/platform/ apache –ant-1.9.1
Now start the server command is hybrisserver.bat
…Path/bin/platform> hybrisserver.bat
After server started we need to initialize the system
Go to http://localhost:9001 to open the hac ( Hybris management console) and click on initialize button.
Here the port number 9001 is set in platform -> project.properties file tomcat.http.port=9001
Ant command Modulegen is used to generate sets of dependent extensions to easily start new projects or create new applications.
Start the ant task called modulegen. In the example below, you can see the script with the following information:
modulegen:
[input]
[input] Please choose the name of your module extension. It has to start with a letter followed by letters and/or numbers.
[input] Press [Enter] to use the default value [training]
storefront
[input]
[input] Please choose the base package name of your extensions. It has to fulfill java package name convention. Each extension
in the module will
add its name to this package.
[input] Press [Enter] to use the default value [org.training]
org.storefront
[input]
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value ([accelerator], b2baccelerator)
Accelerator
After this a copy of different extension like ( **core, **facades, **storefront, **cockpit, **fulfilmentprocess, **test, **initialdata)
1. Setantenv.bat to ensure Ant is on your classpath
2. Ant clean which ask to press enter and after that it shows build successful. Now you can see the config folder generated in your hybris path which is responsible for configuration files.
3. Ant all
Import the codebase into eclipse
File -> Import -> general -> existing projects into workspace and click on Next.
Click browse button and select your hybris path which shows all the available extension.
Select the required extension and click finish.
Preparing Eclipse Ant view
Windows -> show view -> ant we can see the ant symbol
Click Add Build files in Ant window. Select and expand the
Platform extension and select build.xml
Set the Ant provided by hybris which is installed currently. Windows -> preferences - > Ant ( runtime ) click on Ant home and browse the path/bin/platform/ apache –ant-1.9.1
Now start the server command is hybrisserver.bat
…Path/bin/platform> hybrisserver.bat
After server started we need to initialize the system
Go to http://localhost:9001 to open the hac ( Hybris management console) and click on initialize button.
Here the port number 9001 is set in platform -> project.properties file tomcat.http.port=9001
Ant command Modulegen is used to generate sets of dependent extensions to easily start new projects or create new applications.
Start the ant task called modulegen. In the example below, you can see the script with the following information:
modulegen:
[input]
[input] Please choose the name of your module extension. It has to start with a letter followed by letters and/or numbers.
[input] Press [Enter] to use the default value [training]
storefront
[input]
[input] Please choose the base package name of your extensions. It has to fulfill java package name convention. Each extension
in the module will
add its name to this package.
[input] Press [Enter] to use the default value [org.training]
org.storefront
[input]
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value ([accelerator], b2baccelerator)
Accelerator
After this a copy of different extension like ( **core, **facades, **storefront, **cockpit, **fulfilmentprocess, **test, **initialdata)
Monday, 27 June 2016
Hybris - Add a CMS Component Step-by-Step
1. create a item first like below
<itemtype code="MyComponent" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.cms2.components.MyComponent"
extends="CMSParagraphComponent" autocreate="true">
<itemtype code="MyComponent" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.cms2.components.MyComponent"
extends="CMSParagraphComponent" autocreate="true">
<attributes>
<attribute qualifier="media" generate="true" autocreate="true" type="localized:Media">
<persistence type="property" />
</attribute>
</attributes>
</itemtype>
2. Update -locales_en.properties file by Adding localized attribute names and descriptions
type.MyComponent.name=My Paragraph Component
3. Creating Controller
create a new controller class by extending AbstractCMSComponentController
a. @Override fillModel method
b. add @RequestMapping
4. Create View MyComponent.jsp
5. Add component to Valid Component Types
add the component entry to cms-content.impex
$narrowContent=ProductFeatureComponent
Alternately you can add entries to ComponentTypeGroups2ComponentType
6. You can customize the hybris WCMS Cockpit for the component via the XML configuration:
editorArea_typeName.xml: configuration file for the WCMS Cockpit editor area.
contentEditor_typeName.xml: configuration file for Live Edit mode and in-line editing.
wizardConfig_typeName.xml: wizard configuration, if a component is added via a wizard dialogue.
Friday, 24 June 2016
hybris build error wrong java version found
if you got wrong java version means you are using two different java versions in your environment.
How to see your hybris java version supported
go to following folder
hybris/bin/platform/resources/ant
in this folder you find util.xml file in that file 230 t0 245 lines contain your java vesion
if in your system java version is miss matched to that version ant will through build error
<condition>
<not>
<antversion atleast="1.9.1" />
</not>
</condition>
</fail>
<if>
<not>
<or>
<contains string="${java.version}" substring="1.7" />
</or>
</not>
<then>
<fail>-
if your using 1.8 change 1.7 to 1.8 build error will be removed
<condition>
<not>
<antversion atleast="1.9.1" />
</not>
</condition>
</fail>
<if>
<not>
<or>
<contains string="${java.version}" substring="1.8" />
</or>
</not>
<then>
<fail>-
which version your using just mention in substrin="yourjavaverson" buid will success
Subscribe to:
Posts (Atom)