Reported by Deepak Dixit:
Steps to reproduce:
- Create an order (productId:WG-5569) as a logged in user.
- Go to eCommerce order history screen.
- Select newly crate order.
- On order status screen we have option to "Add all to cart"
- Click on "Add all to cart".
Current Behavior:
- All item added to cart including promotion item and promotion item added for item WG-5569.
- Now promotion item display twice one for promotion and one a line item.
Expected Behavior:
- Promotion item should be excluded at the time of "Add all to cart"
jleroux: addToCartFromOrder is only used in ecommerce OOTB (request addordertocart) so it's OK
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1607457 13f79535-47bb-0310-9956-ffa450edef68
file.
* Automatically find the correct ant-launcher.jar version.
* You can now run the batch file from sub directories. ../../ant works.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605836 13f79535-47bb-0310-9956-ffa450edef68
If an anonymous customer changes his/her locale (/control/setSessionLocale) and then places an order in an ecommerce-application, the event ShoppingCartEvents.clearCart(HttpServletRequest, HttpServletResponse) invalidates the session and creates a new one. Due to that the previous locale-switch is lost and is set back to browser- or server-default.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605354 13f79535-47bb-0310-9956-ffa450edef68
When creating a new person, Salutation field is translate in "Salutation" in French. It is a false friend. Salutation in french is : "Civilité"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605348 13f79535-47bb-0310-9956-ffa450edef68
Note: sendCommEventAsEmail service also update the status of communication event by calling an inline service setCommEventComplete if there is no error in sendMail result. The service updateCommEventAfterEmail is also triggered by an eca on sendEmail which also do the same. They both eventually callthe service updateCommunicationEvent. In this case we should option (1) not call updateCommEventAfterEmail or option (2) make changes to updateCommunicationEvent so that it check for a status valid change before updating the communciation event record or option(3) just make updateCommEventAfterEmail responsible for updating the communication event record by removing the inline code that update the communication event to complete. Option (2) seemsright to me.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605286 13f79535-47bb-0310-9956-ffa450edef68
engine tests, when run with java1.7. Apparently, the order of methods
returned by reflection varies between runs, so if methods have implicit
requirements on each other, you get spurious errors.
The are 3 types of fixes:
* Combine the separate testCase methods into one
* Add explict method ordering.
* Make use testCase method completely stand-alone.
The product inventory tests were combined, while the entity engine tests
were restructured to be stand-alone.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605269 13f79535-47bb-0310-9956-ffa450edef68
create a src-dir patternset, the default *empty* src-dir pattern set was
used. Then, when javac would compile src/**/*.jar, it would *also*
compile any *other* java files it happened to find in the folder.
In other words, if there was an unpacked tree, let's say named 'p', and
there was a set of folders in there that eventually had java files, they
would all get compiled.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605223 13f79535-47bb-0310-9956-ffa450edef68
runtime container; also fixes the classpath used to define the ant
task. Now, command-line api tests run underneath cobertura work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605216 13f79535-47bb-0310-9956-ffa450edef68
returns financial account.
Now that EntityCondition lookups work against encrypted fields, there is
no longer a need to do the field encryption locally in the above method.
So, just pass the value directly into the entity engine.
There are also test cases, to prevent this breakage from occurring
again.
This commit depends on r1604967 and r1604968, at the minimum.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604993 13f79535-47bb-0310-9956-ffa450edef68
encryption/decryption happens at the jdbc layer, when values are set
into a PreparedStatement, or fetched from a ResultSet.
This means that conditions are no longer munged to contain the encrypted
value, and entities are no longer updated to temporarily contain the
encrypted value. In all cases, the value of a field in memory will be
unecncrypted.
This fixes the following code patterns:
person = delegator.create("Person", [partyId: "my-party"]);
person.socialSecurityNumber = "1234";
person.store();
// this fails, the encrypted value is stored inside entity
assertEquals("1234", person.socialSecurityNumber);
currentValue = person.socialSecurityNumber
person.store();
// this fails, the field is doubly-encrypted
assertEquals(currentValue, person.socialSecurityNumber);
origCondition = EntityCondition.makeCondition(
"socialSecurityNumber",
EntityOperator.EQUALS,
"1234"
);
list = delegator.findList("Person", origCondition);
newCondition = EntityCondition.makeCondition(
"socialSecurityNumber",
EntityOperator.EQUALS,
"1234"
);
// this fails, because the condition is updated in-place, with the
// encrypted field value.
assertEquals(origCondition, newCondition);
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604976 13f79535-47bb-0310-9956-ffa450edef68
condition; this allows the wrapped value to be changed, as the builder
api is used, and will make it possible for the actual condition object
to be made final.
To allow for this wrapper to be passed to the delegator, it extends
EntityCondition, and delegates all calls to the contained condition
object.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604974 13f79535-47bb-0310-9956-ffa450edef68
classes/fields not yet finalized are left undone due to there being
side-effects with other parts of the code base. These side-effects will
be fixed shortly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604969 13f79535-47bb-0310-9956-ffa450edef68
This is done by just setting the length of salt bytes to 0, but still
having a length byte prepended.
Add a feature to allow for certain fields to actually have a salt
prefix. This is enabled by setting encrypt=salt in the entity
definition.
This change is slightly incompatible with existing code. Old database
values will continue to be decrypted correctly. However, newly
encrypted values will no longer have a salt prepended, while originally
they would. This shouldn't be a problem in practice.
This change, along with the previous commit, finally allow for direct
lookup of encrypted values. However, already stored values will not be
found. To fix those, each database row will have to be read in by
ofbiz, then immediately written back out.
This is part two to completely fix OFBIZ-5959:
Person.socialSecurityNumber can't be used for findByAnd.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604968 13f79535-47bb-0310-9956-ffa450edef68