[jira] Commented: (OFBIZ-230) Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-230) Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters.

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613111#action_12613111 ]

Jacques Le Roux commented on OFBIZ-230:
---------------------------------------

Jacopo,

In the same spirit, on my side I should have said that before choising this solution, from the clues you gave in your 1st comment, I have
1. Checked out productdetail.ftl to quickly understand that there was not the problem since the "list..." functions where not build there
2. So I looked in productdetail.bsh and tried to find a solution there without rewriting all the code (ie trying to change the "lis.." functions names). But what was annoying me was the javascript reserved words aspect of the bug.
3. So I decided to cut the problem at the root. Hence my solution. It does not interfere with the current working code (1st do not harm ;o) and have any drawbacks.

To summarize,
*. I agree with Jacopo that all that is a bit hacky.
* To provide a cleaner solution a part of the couple productdetail.bsh/ftl should be rewritten.
* At least for now it works :o)

> Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters.
> ----------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-230
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-230
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ecommerce, order
>            Reporter: Jacopo Cappellato
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> In productdetail page (both in ecommerce and ordermgr applications) for virtual products, select-boxes are dynamically built to allow features' selection.
> JavaScript functions are used to populate the select-boxes with the allowed options.
> Some of the JavaScript functions' names are built using the productFeatureTypeId code.
> The problem is that, if the productFeatureTypeId field contains characters such as '-' (for example 'SIZE-A') the Javascript functions are built with invalid names (such as 'listSIZE-A()').
> As a consequence, no options are shown in the select-boxes.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.