Issue with One page checkout without billing account

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

Issue with One page checkout without billing account

Jacques Le Roux
Administrator
Hi,

By default when a new user create his/her profile in eCommerce no billing address is set. So for the moment the one page checkout fails. I propose this patch but I'm not sure it's the best solution (in a hurry)

Index: applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
===================================================================
--- applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy (revision 718550)
+++ applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy (working copy)
@@ -25,6 +25,10 @@
     party = userLogin.getRelatedOne("Party");
     contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "BILLING_LOCATION", "POSTAL_ADDRESS", false));
     if (contactMech) {
+    } else {
+        contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false));
+    }
+    if (contactMech) {        
         postalAddress = contactMech.getRelatedOne("PostalAddress");
         billToContactMechId = postalAddress.contactMechId;
         context.billToContactMechId = billToContactMechId;


Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Issue with One page checkout without billing account

Vikas Mayur-3
Thanks Jacques for reporting this issue. This could be related to my  
recent commits around one page.
I will look at it soonish.

Vikas
On Nov 18, 2008, at 6:31 PM, Jacques Le Roux wrote:

> Hi,
>
> By default when a new user create his/her profile in eCommerce no  
> billing address is set. So for the moment the one page checkout  
> fails. I propose this patch but I'm not sure it's the best solution  
> (in a hurry)
>
> Index: applications/ecommerce/webapp/ecommerce/WEB-INF/actions/
> customer/EditBillingAddress.groovy
> ===================================================================
> --- applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/
> EditBillingAddress.groovy (revision 718550)
> +++ applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/
> EditBillingAddress.groovy (working copy)
> @@ -25,6 +25,10 @@
>     party = userLogin.getRelatedOne("Party");
>     contactMech =  
> EntityUtil.getFirst(ContactHelper.getContactMech(party,  
> "BILLING_LOCATION", "POSTAL_ADDRESS", false));
>     if (contactMech) {
> +    } else {
> +        contactMech =  
> EntityUtil.getFirst(ContactHelper.getContactMech(party,  
> "SHIPPING_LOCATION", "POSTAL_ADDRESS", false));
> +    }
> +    if (contactMech) {
>         postalAddress = contactMech.getRelatedOne("PostalAddress");
>         billToContactMechId = postalAddress.contactMechId;
>         context.billToContactMechId = billToContactMechId;
>
>
> Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Issue with One page checkout without billing account

Vikas Mayur-3
In reply to this post by Jacques Le Roux
Jacques, I think it should be fixed by rev. 718617

Thanks,
Vikas
On Nov 18, 2008, at 6:31 PM, Jacques Le Roux wrote:

> Hi,
>
> By default when a new user create his/her profile in eCommerce no  
> billing address is set. So for the moment the one page checkout  
> fails. I propose this patch but I'm not sure it's the best solution  
> (in a hurry)
>
> Index: applications/ecommerce/webapp/ecommerce/WEB-INF/actions/
> customer/EditBillingAddress.groovy
> ===================================================================
> --- applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/
> EditBillingAddress.groovy (revision 718550)
> +++ applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/
> EditBillingAddress.groovy (working copy)
> @@ -25,6 +25,10 @@
>     party = userLogin.getRelatedOne("Party");
>     contactMech =  
> EntityUtil.getFirst(ContactHelper.getContactMech(party,  
> "BILLING_LOCATION", "POSTAL_ADDRESS", false));
>     if (contactMech) {
> +    } else {
> +        contactMech =  
> EntityUtil.getFirst(ContactHelper.getContactMech(party,  
> "SHIPPING_LOCATION", "POSTAL_ADDRESS", false));
> +    }
> +    if (contactMech) {
>         postalAddress = contactMech.getRelatedOne("PostalAddress");
>         billToContactMechId = postalAddress.contactMechId;
>         context.billToContactMechId = billToContactMechId;
>
>
> Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Issue with One page checkout without billing account

Jacques Le Roux
Administrator
In reply to this post by Vikas Mayur-3
Hi Vikas,

I already checked that, it's older than that
http://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?r1=691980&r2=705874

Jacques

From: "Vikas Mayur" <[hidden email]>

> Thanks Jacques for reporting this issue. This could be related to my  recent commits around one page.
> I will look at it soonish.
>
> Vikas
> On Nov 18, 2008, at 6:31 PM, Jacques Le Roux wrote:
>
>> Hi,
>>
>> By default when a new user create his/her profile in eCommerce no  billing address is set. So for the moment the one page
>> checkout  fails. I propose this patch but I'm not sure it's the best solution  (in a hurry)
>>
>> Index: applications/ecommerce/webapp/ecommerce/WEB-INF/actions/ customer/EditBillingAddress.groovy
>> ===================================================================
>> --- applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ EditBillingAddress.groovy (revision 718550)
>> +++ applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ EditBillingAddress.groovy (working copy)
>> @@ -25,6 +25,10 @@
>>     party = userLogin.getRelatedOne("Party");
>>     contactMech =  EntityUtil.getFirst(ContactHelper.getContactMech(party,  "BILLING_LOCATION", "POSTAL_ADDRESS", false));
>>     if (contactMech) {
>> +    } else {
>> +        contactMech =  EntityUtil.getFirst(ContactHelper.getContactMech(party,  "SHIPPING_LOCATION", "POSTAL_ADDRESS", false));
>> +    }
>> +    if (contactMech) {
>>         postalAddress = contactMech.getRelatedOne("PostalAddress");
>>         billToContactMechId = postalAddress.contactMechId;
>>         context.billToContactMechId = billToContactMechId;
>>
>>
>> Jacques
>