0

Am trying to setup B2B punchout add-on, trying to add the custom component and set up the website.

Issue observed: Hitting the Site URL in the browser resulting in the server error, could not see any errors on the console logs (actually no movement of the logs on the console)

Have followed the following steps,

  1. Installed B2C recipe.
  2. Followed by B2B add-on installation.
  3. Followed by B2B punchout add-on installation.
  4. Have removed unnecessary extensions like electronics, apparel, powertools from the localextensions.xml and added the entries of my website in local.properties Am trying to create a custom Component for a B2B punchout.

 Have created the necessary impexes for my component in as follows,

INSERT_UPDATE ContentSlotForPage;$contentCV[unique=true];uid[unique=true];position[unique=true];page(uid,$contentCV)[unique=true][default='homepage'];contentSlot(uid,$contentCV)[unique=true]
;;Section2A-Homepage;Section2A;;Section2ASlot-Homepage

INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;active;cmsComponents(&componentRef)
;;Section2ASlot-Homepage;Section2A Slot for Homepage;true;trainingCustomComponent

INSERT_UPDATE CustomComponent;$contentCV[unique=true];uid[unique=true];name;number;date;deliveryDate;total;&componentRef
;;trainingCustomComponent;training Homepage Custom Component;;;;;;trainingCustomComponent

 Controller class which looks as follows,

@Controller("CustomComponentController")
@RequestMapping(value = ControllerConstants.Actions.Cms.CustomComponent)
public class CustomComponentController extends AbstractCMSAddOnComponentController<CustomComponentModel>

 In the *-items.xml added the itemtype to create the model,

<typegroup name="Components">
            <itemtype code="CustomComponent" autocreate="true"
                generate="true" extends="SimpleCMSComponent"
                jaloclass="org.training.core.jalo.CustomComponent">
                <description>Custom Component</description>
                <deployment table="CustomComponent"
                    typecode="11001" />
                <attributes>
                    ......
                </attributes>
            </itemtype>
        </typegroup>

 Also created a JSP and placed in the path , trainingstorefront\web\webroot\WEB-INF\views\responsive\cms\customcomponent.jsp


Kindly help me by providing the exact extension/path where I need to place all the classes/xml’s/files if you find above ones are wrong 

  • What error are you getting. The error log will be most helpful. – Farrukh Chishti Mar 18 '19 at 06:10
  • 1
    Thanks for volunteering to help.As i mentioned above,I was not getting any error that is where i found very difficult to tackle the issue.But I found out that in WCMS ->website the channel was set to "B2C" instead of "B2B".I just changed it, my site is coming up now. – Ranjana Shivanna Mar 20 '19 at 14:40

0 Answers0