To reproduce:
* add two associated products to a main product, both with "Complementary or Cross-Sell" association type
* view the main product in ecommerce
Expected behaviour: the two associated products are listed near the bottom of the page
Actual behaviour: two products are listed at the bottom of the page, but only one of them is an associated product. The other is the main product.
The problem is caused by the value of a freemarker variable changing at a point where other freemarker code assumes the variable does not change. The execution path is complicated.
The patch fixes the problem by saving the value of the key variable into another variable, and restoring it later. However I do wonder if there is a better solution.
JLR: I did not try to find a better solution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042411 13f79535-47bb-0310-9956-ffa450edef68
To reproduce:
* go to Facility, Inventory Items tab (or any form that uses text-find widget)
* choose "Is Empty" from drop-down next to Product Id
* click Find button
Expected behaviour: no matching items listed, as all items have a Product Id.
Observed behaviour: all items match.
Problem is caused by find code assuming that there is no entity condition to be created if the text field is empty, but of course Is Empty is
different to the other operators in that the text field is expected to be empty.
The attached patch adds a special check for the Is Empty operator.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042396 13f79535-47bb-0310-9956-ffa450edef68
Product Store Email Setting page doesn't allow to configure an email from emailType = PARTY_EMAIL
So when an anonymous contact posts a message, an automated email isn't sent to the store payToPartyId
This patch add other choices (PARTY_EMAIL type) into the drop down email list, for the Product Store Email Setting page
JLR: I can't see any issues adding this OOTB, tough maybe it could be constrained more (using one of the enumId of PARTY_EMAIL)? BTW It's not a bug
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042360 13f79535-47bb-0310-9956-ffa450edef68
To reproduce the bug:
* edit the EditProduct form in applications/product/widget/catalog/ProductForms.xml
* add a new field with a hyperlink sub-element.
* refer to this new field in the first, non-collapsible field-group in the sort-order
* go to this page in the UI (edit a product in the catalog)
* the Expand All and Collapse All buttons do not work properly
The problem is caused by the javascript finding the added hyperlink field in the first field-group, and incorrectly assuming it is
the expand/collapse link for the field-group. This causes the javascript to crash when it gets a null reference to an enclosing li element.
It is not specific to the EditProduct form, but applies to any group of collapsible panes where one contains a hyperlink.
The attached patch simply checks that the li element actually exists.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042348 13f79535-47bb-0310-9956-ffa450edef68
This was causing issue and was not changing the PO line items status to completed one when order comes into complete status.
Thanks Pranay & Amit!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042222 13f79535-47bb-0310-9956-ffa450edef68
Moved the feature that allows a new user to register for an account from MyPortal to the framework so that it is available in any application.
It has also been slightly reworked (code cleaning and internationalization).
Two flags in general.properties allows to configure if the register function must be enabled or not and if the captcha function should be used.
The captcha function needs to be improved because at the moment the code is contained in an hidden field so that it is very easy for a computer to bypass it.
A possible fix for this could be to put the MD5 coding of the captcha code in the hidden field.
Then the event that checks the code should compare the MD5 codes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042196 13f79535-47bb-0310-9956-ffa450edef68
In applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
the setQuantity method should use this.quantity.compareTo(quantity) == 0 instead of this.quantity==quantity like depicted below
protected void setQuantity(BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks) throws CartItemModifyException {
if (this.quantity == quantity) { return; }
The issue is really visible when the cart is fully loaded (lot of products) as the return will never occur and the store is configurerd in an autosavecart mode.
For example a cart with 48 products will take very long time to process for each additem or modifycart event.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042188 13f79535-47bb-0310-9956-ffa450edef68
Added screenlet styles to the ecommain.css
Added several missin screenlet-body tags.
This allows better and more omogeneus rendering when mixing together FTL and screenlet widgets.
To be continued...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042133 13f79535-47bb-0310-9956-ffa450edef68
The error is in applications/order/src/org/ofbiz/order/order/OrderReturnServices.java the getAdjustmentAmount method is prorating using this code:
newAmount = returnTotal.divide(originalTotal, decimals, rounding).multiply(amount).setScale(decimals, rounding);
it should be:
newAmount = returnTotal.multiply(amount).divide(originalTotal, decimals, rounding);
else by dividing first what should be for example 1/3 of the adjustment ends up being 0.33
JLR: I have added the setScale part
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042034 13f79535-47bb-0310-9956-ffa450edef68
This patch adds several closely-related features, intended to improve the display of products and their images in the ecommerce webapp.
When additional images for a product are uploaded via the Catalog, the scaled versions that were already being created in service addAdditionalViewForProduct are now recorded as ProductContent. This makes them easily available for use elsewhere.
New ProductContentType values were added to identify these content types. The obviously consistent string to use for these was too long, and so I had to choose something less consistent, but shorter and hopefully still clear. I used XTRA instead of ADDITIONAL.
The sizes to which additional images are rescaled has been changed, so they better fit in the ecommerce display. Relevant sizes in productdetail.ftl have been updated to match these sizes.
The ecommerce product display now uses the scaled additional images if available, rather than relying on the web browser to scale the images.
When displaying a single product in ecommerce, the main image is larger than the additional images. Hovering over an additional image displays a larger version in place of the main image.
Clicking on an additional image displays a popup with a detailed version of the image.
To use the new features, one or more large images (suggest at least 600x600) should be attached as additional images to a product, using the form on the bottom of the content tab for a product in Catalog. Viewing the product in ecommerce should then exhibit the above behaviour.
I have tried to maintain backwards compatibility, so that products with the old-style use of additional images will continue to display as they did previously. This means some of the code is not as streamlined as it might be.
JLR: You might prefer to keep the old ImageProperties.xml values...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042024 13f79535-47bb-0310-9956-ffa450edef68
When "table name" is required to a "model entity" object, it throws a NPE if "datasource info" object is null.
JLR: I'm not quite sure in which occasions this fix is needed OOTB, but anyway it's safer indeed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040890 13f79535-47bb-0310-9956-ffa450edef68
shoppping list, and it tried to create a new one(based on auto-save), it
wasn't passing the productStoreId to the service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040805 13f79535-47bb-0310-9956-ffa450edef68
then added, the orderItemSeqId would be reused. This is because
OrderReadHelper.getValidOrderItems() does not return cancelled/rejected
items, so the loop to find the highest orderItemSeqId wouldn't consider
them. This means we have to loop over all items, to find the highest
value, then skip the invalid ones locally.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040802 13f79535-47bb-0310-9956-ffa450edef68
review), so protect against its access. What would happen is when no
userLogin was available for the review, the table cell would not be
rendered, and the rest of the row cells would shift.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040796 13f79535-47bb-0310-9956-ffa450edef68
is no longer up, and responding to status requests, but the jsvc process
that managed the pid file has not yet stopped. This means that the
existance test of the pidfile may succeed, but the removal of the
pidfile will fail, as the jsvc process itself removes it. So, do a
forced removal, which then allows the rm to succeed, and the init script
no longer exits early.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040795 13f79535-47bb-0310-9956-ffa450edef68
compiled output more stable, and not depending on any random included
ant support libs. If any are needed, they need to be explicitly added.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040794 13f79535-47bb-0310-9956-ffa450edef68