on 11-10-2016 9:30 AM
I did some changes in CartRestorationfilter which is present in storefront and now i dont want these changes present in my storefront i would like to move the cartRestorationFilter to my custom addon.Is it possible?Any help is much appreciated
Hi,
Try like below, in your storefront you can see some config like below,
<bean id="cartRestorationFilter" class="com.rodanandfields.storefront.filters.CartRestorationFilter" >
</bean>
<alias name="defaultStorefrontTenantDefaultFilterChainList" alias="storefrontTenantDefaultFilterChainList" />
<util:list id="defaultStorefrontTenantDefaultFilterChainList">
<!-- filter to restore items in cart -->
<ref bean="cartRestorationFilter"/>
</util:list>
change configuration like,
<alias name="cartRestorationFilter" alias="aliasRestorationCartFilter" />
<bean id="cartRestorationFilter" class="com.rodanandfields.storefront.filters.CartRestorationFilter" >
</bean>
<alias name="defaultStorefrontTenantDefaultFilterChainList" alias="storefrontTenantDefaultFilterChainList" />
<util:list id="defaultStorefrontTenantDefaultFilterChainList">
<!-- filter to restore items in cart -->
<ref bean="aliasRestorationCartFilter"/>
</util:list>
now you are using alias , so now in your addon define another bean and configure like below,
<alias name="newCartRestorationFilter" alias="aliasRestorationCartFilter" />
<bean id="newCartRestorationFilter" class="newclass" parent="cartRestorationFilter" >
</bean>
now your addon aliasRestorationCartFilter bean will override the storefornt bean
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.