Hi guys,
I am trying to add SkuImpl.fulfillmentFlatRates into Admin Presentation layer, so that I can edit the value on admin tools. I followed the instruction of Admin Metadata Overrides, and was trying to use xml-based overrides, but not working.
My questions are:
First, I suspect the override doesn't work is because the field has no @AdminPresentation or @AdminPresentationMap annotation announced. How could I add annotation onto this field without change SkuImpl? I tried to re-inject another SkuExtImpl class to the site and admin, but it doesn't work; the ProductImpl only looks for SkuImpl.
Here is my dependency injection configuration:
in core/src/main/resources/applicationContext-entity.xml
<bean id="org.broadleafcommerce.core.catalog.domain.Sku" class="com.mycompany.broadleaf.ext.domain.SkuExtImpl" scope="prototype"/>
in persistence-core.xml
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source>jdbc/web</non-jta-data-source>
<class>com.mycompany.broadleaf.ext.domain.SkuExtImpl</class>
.....
I don't understand why the ProductImpl is still looking for SkuImpl. By the way there is a typo in "Extending Entities Tutorial"
"<bean id="org.broadleafcommerce.core.catalog.domain.Product" class="com.mycompany.core.catalog.domain.HotSauceImpl" scope="prototye"/>" should be "prototype".
Secondly, I believe the fulfillmentFlatRates mapping the FulfillmentOptions which should include a filter like "UseFlatRates=true"; how to add this filter on hibernate annotation? or any other annotations?
Finally I attached my xml-based override configuration
<!-- Admin Edit MetaData Overrides -->
<mo:override id="blMetadataOverrides">
<mo:overrideItem ceilingEntity="org.broadleafcommerce.core.catalog.domain.Sku">
<mo:field name="fulfillmentFlatRates">
<mo:property name="group" value="ProductWeight_Shipping" />
<mo:property name="tab" value="ProductImpl_Shipping_Tab" />
<mo:property name="tabOrder" value="6000" />
<mo:property name="groupOrder" value="1000" />
<mo:property name="order" value="10000" />
<mo:property name="friendlyName" value="SkuImpl_FulfillmentFlatRates" />
</mo:field>
</mo:overrideItem>
</mo:override>
Would you please advise where did i do incorrect? I was blocked here for a while.
Regards,
Dan
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.