Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7091

Two empty options are shown in shipping method select box on Edit promo screen

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: product
    • Labels:
      None

      Description

      On Edit promo screen, in existing condition section's select box two empty options are shown.
      Please find the screenshot for more detail.

      Reason and Solution:
      As per the code in EditProductPromoRules.ftl,

      <option value = "${carrierShippingMethod!}">${carrierParty!}&nbsp;${description}</option
      <option value = "">&nbsp;</option>
      

      And the carrierParty is calculated above, if it is not available the first option will show automatically as empty option

      <option value = "${carrierShippingMethod!}">${carrierParty!}&nbsp;${description}</option>
      

      So, we don't need the second empty option field and can remove it.

      <option value = "">&nbsp;</option>
      
      1. EditProductPromoRules.png
        266 kB
        Swapnil M Mane
      2. OFBIZ-7091.patch
        1.0 kB
        Swapnil M Mane
      3. OFBIZ-7091.patch
        1.0 kB
        Swapnil M Mane

        Activity

        Hide
        deepak.dixit Deepak Dixit added a comment -

        Hi Swapnil,

        If you remove empty option then how can we empty the value.
        Means in case of update.

        Show
        deepak.dixit Deepak Dixit added a comment - Hi Swapnil, If you remove empty option then how can we empty the value. Means in case of update.
        Hide
        swapnilmmane Swapnil M Mane added a comment -

        Dear Deepak,
        Thanks for reviewing patch and pointing out the thing, making perfect sense to me

        After looking at the code again, I think, this updated code block will address the UI issue as well as the case of the update.

        <#if carrierShippingMethod?has_content>
          <option value = "${carrierShippingMethod!}">${carrierParty!} ${description}</option>
        </#if>
          <option value = ""> </option>
        

        I request you to please review this updated code, if looks good, I will proceed update the patch.

        Thanks!

        Show
        swapnilmmane Swapnil M Mane added a comment - Dear Deepak, Thanks for reviewing patch and pointing out the thing, making perfect sense to me After looking at the code again, I think, this updated code block will address the UI issue as well as the case of the update. <# if carrierShippingMethod?has_content> <option value = "${carrierShippingMethod!}" >${carrierParty!} ${description}</option> </# if > <option value = ""> </option> I request you to please review this updated code, if looks good, I will proceed update the patch. Thanks!
        Hide
        deepak.dixit Deepak Dixit added a comment -

        Yup its looks good. Please upload patch with this changes.

        Show
        deepak.dixit Deepak Dixit added a comment - Yup its looks good. Please upload patch with this changes.
        Hide
        swapnilmmane Swapnil M Mane added a comment -

        Thanks!

        Show
        swapnilmmane Swapnil M Mane added a comment - Thanks!
        Hide
        pandeypranay Pranay Pandey added a comment -

        Thanks Swapnil M Mane for the contribution. Your patch committed in trunk at revision 1744904.

        Show
        pandeypranay Pranay Pandey added a comment - Thanks Swapnil M Mane for the contribution. Your patch committed in trunk at revision 1744904.

          People

          • Assignee:
            pandeypranay Pranay Pandey
            Reporter:
            swapnilmmane Swapnil M Mane
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development