Posts

Disable Search Restriction in Hybris

import de.hybris.platform.search.restriction.SearchRestrictionService; Define attributes private SessionService sessionService; private SearchRestrictionService searchRestrictionService; Create getter & setters for the above services. Here I am trying to disable the search restriction for category related query Collection = getSessionService().executeInLocalView(new SessionExecutionBody() { @Override public Collection execute() { try { getSearchRestrictionService().disableSearchRestrictions(); return getCategoryDao().findCategoriesByCode(code); } finally { getSearchRestrictionService().enableSearchRestrictions(); } } });

How to export product data from Hybris Apparel Store to csv?

Image
Go to hybris admin console. Select console tab>>> Impex Export Paste the below impex in import content tab and click on "Import Content" button $productCatalog=apparelProductCatalog $productCatalogName=Apparel Product Catalog $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged] $baseProduct=baseProduct(code, catalogVersion(catalog(id[default='$productCatalog']),version[default='Staged'])) $approved=approvalstatus(code)[default='approved'] $taxGroup=Europe1PriceFactory_PTG(code)[default=eu-vat-full] $lang=en ### Impex to export product code, name,catalog version,supercategories######## "#% impex.setTargetFile( ""ApparelProduct.csv"" , true );" INSERT_UPDATE ApparelProduct;code[unique=true];name[lang=$lang];$catalogVersion;unit(code);supercategories(code,$catalogVersion) "#% impex.exportItems( ""ApparelPro...

A day of Blessings!!!!!!!!!

Today I woke up as usual talked to my mom and called up my friend.We had planned for some shopping together. This friend of mine Elsa I met her in the M bus that I used to take to office. Rel ationships are always amazing.. sometimes it happens in seconds ... at times it never happens after years. I have bus to El camino/Ralston every 1hr on weekends. But the time I was out of shower it was 10:40 and my bus at 11:03. In california at Redwoodshores at least busses are not one time...mostly they are way too early. I was about to rush to the bus stop when neighbour stopped me. I hadn't seen her in a week...she was sick but I had no time to enquire . I told her I would pay her a visit later and hurried to bus stop. On the way I checked for change and thank god I had 2 $. Bus was on time.I just put the money and took the first seat. As I browsed through the pamphlet for Samtrans 26 0 I realised the bus is not going to El Camino/Ralston but to El camino/St Carlos station. I did check t...

DB Links

DB links are used in distributed Oracle environments to define a communication path between databases.The purpose of the link is toisolate SQL statements from the underlying physical network topology.If the location of remote database changes, only the link needs to be updated. To Create DB links CREATE [PUBLIC] DATABASE LINK USING 'xxx ' OR CREATE [PUBLIC] DATABASE LINK CONNECT TO CURRENT_USER USING 'xxx' To Drop DB links DROP DATABASE LINK ; //Code snippet starts create public database link CMPSPROD.WORLD connect to SYSTEM identified by cmpsprod using 'cmpsprod.world'; Insert into A (select * from A @ CMPSPROD.WORLD where ACOL='Value') Where A the table name and ACOL the column name in the table A. //Code snippet ends The above query selects all the records from Table A satisfying the where clause from remote Database and insert those records to the same table in the current database. Reference: http://www.oreillynet.com/pub/a/oreilly/oracle/news/oracl...