Page 1 of 1

Chose tax code in admin...

Posted: Fri May 08, 2015 5:05 am
by kiteflo
Dear forum members,

I'm banging my head against walls and wanna achieve sth really simple (and well documented): I wanna add a simple tax provider enabling me to chose the tax rate in the admin while creating a product, there is a "Financial" section in the bottom which shows "Tax Code => No Values found for this enumeration".

I followed the instructions to add a SimpleTaxProvider by modifying my applicationContext-admin.xml (btw.: is this the place the bean should be configured in or should it be site/applicationContext.xml or core/applicationContext.xml?):

<!-- tax stuff -->
<bean id="blTaxModule" class="org.broadleafcommerce.core.pricing.service.tax.provider.SimpleTaxProvider">
<property name="itemPostalCodeTaxRateMap">
<map>
<entry key="4410" value=".095" />
<entry key="75034" value=".085" />
</map>
</property>
</bean>
<bean id="myTaxProviders" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="blTaxModule" />
</list>
</property>
</bean>
<bean class="org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor">
<property name="collectionRef" value="myTaxProviders"/>
<property name="targetRef" value="blTaxProviders"/>
</bean>

But nothing changes in the admin UI, I can not chose a tax rate at all - so I do get the tax stuff configured her to show up in the admin UI?

Help is highly appreciated,
thanx in advance,
Florian

Re: Chose tax code in admin...

Posted: Wed May 20, 2015 12:05 am
by phillipuniverse
What you have is right.

We do not currently have the ability to modify the simple tax provider values in the admin. The tax code that you see in the admin isn't about the specific rate but more about the type of product that it is to determine how it should be taxed. It is basically another, optional facet of whatever tax provider to determine how to compute the tax.

If you want tax rates modifiable in the admin you'll have to write your own domain for it and write something that implements the TaxProvider interface.

I followed the instructions to add a SimpleTaxProvider by modifying my applicationContext-admin.xml (btw.: is this the place the bean should be configured in or should it be site/applicationContext.xml or core/applicationContext.xml?):


Since the SimpleTaxProvider is designed to be apart of pricing then this bean should not be configured in the admin applicationContext but instead site or core.