0
votes

I am working on the SAP Commerce (formally known as Hybris) ecommerice system.

The Warehousing extension is being added to a B2B site. Upon adding it, On the Stock Level item the Invoice Event collection is visable on the admin tab. An ATP Formula has been set on the Base Store. The stock is now displayed on the PDP. In an OTB site I have seen an OTB instance adjust the stock levels accordingly upon completing an order, but that is not happening on the local dev instance. The question is why?

Is the impression correct that some facade within the warehousing extension is called during the order-processing process? If so, how exactly is that wired up? There doesn't seem to be any relationship to the warehousing extension and any other code.

UPDATE 1:

Here is an example of the question: After adding a new product populator to the custom facade, a few entries are added to the *-spring.xml file, one of them being adding the populator to the configurablePopulatorModification. Finally the option needs to be added to the ProductOptions list in the controller. Then the populator is called when that controller is called.

In this example the connection between the controller and the popular is clear, once it is understood how things are wired up. There is a connection to the ProductOptions in the custom core extension, custom facade extension, and custom accelerator. Once someone knows how this is "wired up" it can be easily duplicated.

What I am trying to understand is this: The warehousing extension has been added to the localextensions.xml, but there is NO reference to any aspect of that anywhere else in the system, AT ALL. Somehow some extension between the storefront accelerator and the platform code has to know about the new functionality found in the warehousing extension so that it is called. How?????

UPDATE 2:

After adding the warehousing extension, there are new attributes added to existing itemTypes that show up in Backoffice. It is my understanding that this is the concept which Modifying Lists and Maps in Spring Context explains.

The issue I am having problems understanding is how the business logic within the warehousing extension is being called to modify the stock levels. My best guess is that the function doing the change is WarehousingStockLevelFacade.createStockLevelAdjustements(...). I have searched high and low for where createStockLevelAdjustements(...) is called and it is ONLY called in the warehousingwebservices.

I am at a total loss on how exactly any of the facades wihtin warehousingfacades or warehousingwebservices is being called by

1

1 Answers

1
votes

Hmmm, your text contains more than one question I think. So I try to answer each part of them separately.

In an OTB site I have seen an OTB instance adjust the stock levels accordingly upon completing an order, but that is not happening on the local dev instance

There should be no difference on the systems. You should always look, that you have the same configuration on each system. Normally the 'config' folder here is the part where you define the configuration. From system to system there can be small difference. But for example, the 'localextensions.xml' shold always be the same.

Is the impression correct that some facade within the warehousing extension is called during the order-processing process?

No. You define your extensions in the 'localextensions.xml' and than the new parts are on any system. Have you done an 'UPDATE' on each system, so that the new types are also imported in the type system and the database?

So overall. You define your extensions. And than hybris includes all needed extensions automatically. You can see this, when you start the server, which extensions are loaded.

UPDATE 1

I think, now I got your point. I try to stay in common and not to specify on the 'warehouse' extension. Hybris has some funtionalities how to modify code 'afterwards'. Here are some useful links

Also have a look left in the navigation about the 'Extnsion Concept'. Maybe some points will than be clear.

So in your example, think what happens is: first new attributes in the *-items.xml, than there will be a 'modifiyPopulatorList' bean somewhere.

UPDATE 2

I don't know the 'warehousing' extension. But I think there must be a part that overwrites the 'normal' beans with the 'warehousing' beans. Something like:

<bean id="stockLevelBean" ...>
    <property name="normalProvider" ref="normalProvider"/>
</bean>

<bean id="stockLevelBean" ...>
    <property name="warehousingProvider" ref="warehousingProvider"/>
</bean>