Wednesday, December 30, 2015

PropertyDescriptor to Compare and return value based comparison (ATG Oracle Commerce)


Find below Property descriptor that will compare 2 values that will be set as attribute tags, along with the comparison to do, it will
return the boolean with the result of the operation:

It works as follows, it requires  the followinng attirbutes:

  • compareOperator, it can be any logical operator such as lt,gt,eq, based on el notation.
  • leftSideType it can be a number type or a property type
  • leftSideValue it can be the value in number, or the property that contains the value
  • rightSideType it can be a number type or a property type
  • rightSideValue it can ve the value in number, or the property that contains the value


Here are 2 examples:

And here is the Java Class that makes this possible

Wednesday, December 16, 2015

PropertyDescriptor to Concatenate properties (ATG Oracle Commerce)

We have faced with a scenario where a property needed to contain it's value and also have concatenated other value.
There are not property descriptors to Concatenate Items, So I have created one, that works as follows:

It will concatenate n values that will be set as attribute tags as property, and will separate them by parameter called
separator.

An example for a property using this PropertyDescriptor is described below:
this means that it will use the value from the current property.

The class to make this happen is this:

I hope you find this useful for your project.

How to Make coupon codes be case Insensitive (ATG Oracle Commerce)


As you might know ATG OOTB supports the creation of coupons and batch coupons, and you can redeem them or check are valids with /atg/commerce/claimable/ClaimableManager
By default Coupon Codes are Case Sensitive, menaing FREESHIP is different that freeShip.

But this can be changed with a Flag @ /atg/commerce/claimable/ClaimableTools

# This will make sure that coupons can be entered with different cases
caseInsensitiveClaimableIds=true



This will make the code check for couponCode without considering the case and is just a change on a flag.

You can find this on the documentation at http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGCommProgGuide/html/s0704theclaimabletoolscomponent01.html