[ 
https://issues.apache.org/jira/browse/OFBIZ-7010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux updated OFBIZ-7010:
-----------------------------------
    Description: 
If we create any Promo condition by selecting any Shipping Method.

Now for all the conditions, we create after this, automatically includes the 
previously selected Shipping Method.
___________________________________________________________

Reason:

Basically, it's a UI issue, the Promo Condition created in the database are 
correct.

In EditProductPromoRules.ftl, we assign 'carrierShippingMethod' and 
'carrierParty' in iteration with the Promotion condition 'productPromoConds'

{code}
<#list productPromoConds as productPromoCond>
...
   <#assign carrierShippingMethod = productPromoCond.otherValue!>
...
{code}
___________________________________________________________

Solution:

Before assigning the 'carrierShippingMethod' and 'carrierParty' from Promo 
Condition, reset the previously set value.
for e.g.
{code}
<#assign carrierShippingMethod = ""/>
<#if otherValue?has_content && otherValue.contains("@")>
  <#assign carrierShippingMethod = productPromoCond.otherValue!>
</#if>
{code}

  was:
If we create any Promo condition by selecting any Shipping Method.

Now for all the conditions, we create after this, automatically includes the 
previously selected Shipping Method.
___________________________________________________________

Reason:

Basically, it's a UI issue, the Promo Condition created in the database are 
correct.

In EditProductPromoRules.ftl, we assign 'carrierShippingMethod' and 
'carrierParty' in iteration with the Promotion condition 'productPromoConds'

{{code}}
<#list productPromoConds as productPromoCond>
...
   <#assign carrierShippingMethod = productPromoCond.otherValue!>
...
{{code}}
___________________________________________________________

Solution:

Before assigning the 'carrierShippingMethod' and 'carrierParty' from Promo 
Condition, reset the previously set value.
for e.g.
<#assign carrierShippingMethod = ""/>
<#if otherValue?has_content && otherValue.contains("@")>
  <#assign carrierShippingMethod = productPromoCond.otherValue!>
</#if>


> Shipping method is shown on all Promo Conditions even when only a single 
> condition includes Shipping Method
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-7010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7010
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Release Branch 13.07, Release Branch 14.12, Trunk, 
> Release Branch 15.12
>            Reporter: Swapnil M Mane
>            Assignee: Mridul Pathak
>            Priority: Minor
>             Fix For: 14.12.01, 15.12.01, 13.07.04
>
>         Attachments: OFBIZ-7010-For1307.patch, OFBIZ-7010.patch
>
>
> If we create any Promo condition by selecting any Shipping Method.
> Now for all the conditions, we create after this, automatically includes the 
> previously selected Shipping Method.
> ___________________________________________________________
> Reason:
> Basically, it's a UI issue, the Promo Condition created in the database are 
> correct.
> In EditProductPromoRules.ftl, we assign 'carrierShippingMethod' and 
> 'carrierParty' in iteration with the Promotion condition 'productPromoConds'
> {code}
> <#list productPromoConds as productPromoCond>
> ...
>    <#assign carrierShippingMethod = productPromoCond.otherValue!>
> ...
> {code}
> ___________________________________________________________
> Solution:
> Before assigning the 'carrierShippingMethod' and 'carrierParty' from Promo 
> Condition, reset the previously set value.
> for e.g.
> {code}
> <#assign carrierShippingMethod = ""/>
> <#if otherValue?has_content && otherValue.contains("@")>
>   <#assign carrierShippingMethod = productPromoCond.otherValue!>
> </#if>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to