garganshulgarg / hybrisEnhancedSearch

This project aims for extending solr search delivered OOTB with SAP Hybris. This will majorly include content search, pdf search etc.
2 stars 1 forks source link

Enhancing Search Experience on SAP Hybris (SAP CX)

This project aims for extending solr search delivered OOTB with SAP Hybris. This will majorly includes following:-

Much More

Just to have a quick glance refer the video on following Link. https://www.useloom.com/share/7f91e3a0c136422bb560bebe143f3c48

Version Summary

Application Version
Java 1.8
Hybris. 6.3 +

Java Installation

Set JAVA_HOME

Windows
MAC

Source Code Setup


Link from <working_directory>/hybris/bin/custom/enhancedSearch to <repo_directory>/custom/enhancedSearch
Link from <working_directory>/hybris/bin/custom/enhancedSearchAddon to <repo_directory>/custom/enhancedSearchAddon

Windows Steps


  cd <working_directory>\hybris\bin\custom
  mklink /J enhancedSearch <repo_directory>/custom/enhancedSearch
  mklink /J enhancedSearchAddon <repo_directory>/custom/enhancedSearchAddon

Mac Steps

  cd <working_directory>/hybris/bin/custom
  ln -s <repo_directory>/custom/enhancedSearch
  ln -s <repo_directory>/custom/enhancedSearchAddon

Install the b2c_acc recipe

This is an optional step. If we are trying to run the same on Hybris OOTB setup then I have installed b2c_acc recipe.

Move to directory /installer

Windows Steps

install.bat -r b2c_acc

Mac Steps

./install.sh -r b2c_acc

Include EnhancedSearch Project


  Open localextension.xml - <working_directory>/hybris/config/localextension.xml
  Add Following extension 
  <extension name='enhancedSearchAddon'/>
  <extension name='enhancedSearch'/>

Project setup

Windows:

   setantenv.bat

OSX:

 . ./setantenv.sh

Option 1

    /bin/plateform/hybrisserver.bat

OSX:

    /bin/plateform/hybrisserver.sh

Option 2:

  ant initialize
    127.0.0.1       electronics.local

Some Sample Data Impex to be executed

    ;electronicsContentCatalog:Online ;homepage                             ;contentSearch
;electronicsContentCatalog:Online ;multiStepCheckoutSummaryPage         ;contentSearch
;electronicsContentCatalog:Online ;orderConfirmationPage                ;contentSearch
;electronicsContentCatalog:Online ;cartPage                             ;contentSearch
;electronicsContentCatalog:Online ;search                               ;contentSearch
;electronicsContentCatalog:Online ;address-book                         ;contentSearch
;electronicsContentCatalog:Online ;add-edit-address                     ;contentSearch
;electronicsContentCatalog:Online ;payment-details                      ;contentSearch
;electronicsContentCatalog:Online ;order                                ;contentSearch
;electronicsContentCatalog:Online ;orders                               ;contentSearch
;electronicsContentCatalog:Online ;storefinderPage                      ;contentSearch
;electronicsContentCatalog:Online ;checkout-login                       ;contentSearch
;electronicsContentCatalog:Online ;login                                ;contentSearch
;electronicsContentCatalog:Online ;notFound                             ;contentSearch
;electronicsContentCatalog:Online ;searchEmpty                          ;contentSearch
;electronicsContentCatalog:Online ;updatePassword                       ;contentSearch
;electronicsContentCatalog:Online ;update-profile                       ;contentSearch
;electronicsContentCatalog:Online ;update-email                         ;contentSearch
;electronicsContentCatalog:Online ;consents                             ;contentSearch
;electronicsContentCatalog:Online ;close-account                        ;contentSearch
;electronicsContentCatalog:Online ;faq                                  ;contentSearch
;electronicsContentCatalog:Online ;orderExpired                         ;contentSearch
;electronicsContentCatalog:Online ;termsAndConditions                   ;contentSearch
;electronicsContentCatalog:Online ;importCSVSavedCartPage               ;contentSearch
;electronicsContentCatalog:Online ;savedCartDetailsPage                 ;contentSearch
;electronicsContentCatalog:Online ;saved-carts                          ;contentSearch
;electronicsContentCatalog:Online ;quickOrderPage                       ;contentSearch
;electronicsContentCatalog:Online ;product-textfield-configurator       ;contentSearch
;electronicsContentCatalog:Online ;support-tickets                      ;contentSearch
;electronicsContentCatalog:Online ;add-support-ticket                   ;contentSearch
;electronicsContentCatalog:Online ;update-support-ticket                ;contentSearch
;electronicsContentCatalog:Online ;cancel-order                         ;contentSearch
;electronicsContentCatalog:Online ;confirm-cancel-order                 ;contentSearch
;electronicsContentCatalog:Online ;return-order                         ;contentSearch
;electronicsContentCatalog:Online ;confirm-return-order                 ;contentSearch
;electronicsContentCatalog:Online ;returns                              ;contentSearch
;electronicsContentCatalog:Online ;return-request-details               ;contentSearch
;electronicsContentCatalog:Online ;cancel-return                        ;contentSearch

Run a on FULL solr index content-search

Modify the following files in your storefront extension to hold Content Searched Data

<div style="padding: 0 30px 30px; max-width: 60%; text-align: left; margin: 0 auto;">
   <c:forEach items="${contentSearchData}" var="data">
       <a style="display: block; padding: 10px;  margin: 2px 0;" href="https://github.com/garganshulgarg/hybrisEnhancedSearch/blob/master/${request.contextPath}${data.label}">&raquo; ${data.name}</a>
   </c:forEach>
</div>