on 06-10-2015 8:57 AM
In the B2B storefront i wanted to add one more payment type Paypal apart from the Account and Card Paymnet. So i added the payment type enum in b2bacceleratoreservices-items.xml and i am getting the code and type but i am not able to get the displayName.
public void populate(final CheckoutPaymentType source, final B2BPaymentTypeData target)
{
CheckoutPaymentType checkoutPaymentTypeValue = source;
if (checkoutPaymentTypeValue == null)
{
checkoutPaymentTypeValue = CheckoutPaymentType.ACCOUNT;
}
target.setCode(checkoutPaymentTypeValue.getCode());
target.setDisplayName(getTypeService().getEnumerationValue(checkoutPaymentTypeValue).getName());
}
this is the code to populate the data. but I am getting the null value for displayname for Paypal.
Please help.
Hi,
Have you tried localizing the enum? You could do so by adding the following string into your <extension>-locales_<lang>.properties.
type.CheckoutPaymentType.ACCOUNT.name=Account Display name
Hope this helps.
Regards, Shwetha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
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.