Users - checkout with new user does not work

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

Users - checkout with new user does not work

Hans Bakker
Hi,

i just found a problem with a clean system, run-install etc.

if I put an item in the shopping cart, select 'quickcheckout' and select
'create a new account' enter a new user and press 'save' I get:

org.ofbiz.base.util.GeneralException: Error rendering screen
[checkoutoptions]: org.ofbiz.base.util.GeneralException: Error running BSH
script at location
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh]:
org.ofbiz.base.util.GeneralException: Error running BSH script at
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh],
line [54]: Sourced file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh :
null : at Line: 54 : in file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh :
party .getRelated ( "PaymentMethod" , null , UtilMisc .toList
( "paymentMethodTypeId" ) )

This is cause because the shoppingCart is not available and so the newly
created partyId cannot retrieved from it....

if i get the party id from the logonId the problem is gone however the screen
goes to the main screen and not to the checkout options....

anybody having the same problems? I have to deliver a shop this weekend....and
this a real showstopper....

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Users - checkout with new user does not work

Jacopo Cappellato
Hi Hans,

I'm rather sure that the problem you are seeing is related by the 6052
commit (see attached mail for details).
It should be rather easy to change back that code.

Si, could you have a look at it as well?

Thanks,

Jacopo



Hans Bakker wrote:
 > Hi,
 >
 > i just found a problem with a clean system, run-install etc.
 >
 > if I put an item in the shopping cart, select 'quickcheckout' and select
 > 'create a new account' enter a new user and press 'save' I get:
 >
 > org.ofbiz.base.util.GeneralException: Error rendering screen
 > [checkoutoptions]: org.ofbiz.base.util.GeneralException: Error
running BSH
 > script at location
 >
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh]:

 > org.ofbiz.base.util.GeneralException: Error running BSH script at
 >
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh],

 > line [54]: Sourced file:
 >
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
:
 > null : at Line: 54 : in file:
 >
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
:
 > party .getRelated ( "PaymentMethod" , null , UtilMisc .toList
 > ( "paymentMethodTypeId" ) )
 >
 > This is cause because the shoppingCart is not available and so the newly
 > created partyId cannot retrieved from it....
 >
 > if i get the party id from the logonId the problem is gone however
the screen
 > goes to the main screen and not to the checkout options....
 >
 > anybody having the same problems? I have to deliver a shop this
weekend....and
 > this a real showstopper....
 >
 >
 >
 > ------------------------------------------------------------------------
 >
 >
 > _______________________________________________
 > Users mailing list
 > [hidden email]
 > http://lists.ofbiz.org/mailman/listinfo/users


Author: sichen
Date: 2005-10-31 15:01:02 -0600 (Mon, 31 Oct 2005)
New Revision: 6052

Modified:
   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
Log:
Fixed a couple of places where the ecommerce app should be using the party from the cart rather than from the userLogin

Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
===================================================================
--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 20:59:05 UTC (rev 6051)
+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 21:01:02 UTC (rev 6052)
@@ -34,7 +34,8 @@
 
 shoppingCart = session.getAttribute("shoppingCart");
 currencyUomId = shoppingCart.getCurrency();
-party = userLogin.getRelatedOne("Party");
+partyId = shoppingCart.getPartyId();
+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
 productStore = ProductStoreWorker.getProductStore(request);
 
 shippingEstWpr = null;

Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
===================================================================
--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 20:59:05 UTC (rev 6051)
+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 21:01:02 UTC (rev 6052)
@@ -34,9 +34,9 @@
 cart = session.getAttribute("shoppingCart");
 currencyUomId = cart.getCurrency();
 userLogin = session.getAttribute("userLogin");
-party = userLogin.getRelatedOne("Party");
+partyId = cart.getPartyId();
+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
 productStoreId = ProductStoreWorker.getProductStoreId(request);
-partyId = userLogin.getString("partyId");
 
 checkOutPaymentId = "";
 if (cart != null) {

 
_______________________________________________
Svn mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/svn


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - checkout with new user does not work

Si Chen-2
No, don't change the code back, because it would break the use of these
forms in the order manager.  I will take a look and see what the problem
might be.

Si

Jacopo Cappellato wrote:

> Hi Hans,
>
> I'm rather sure that the problem you are seeing is related by the 6052
> commit (see attached mail for details).
> It should be rather easy to change back that code.
>
> Si, could you have a look at it as well?
>
> Thanks,
>
> Jacopo
>
>
>
> Hans Bakker wrote:
> > Hi,
> >
> > i just found a problem with a clean system, run-install etc.
> >
> > if I put an item in the shopping cart, select 'quickcheckout' and
> select
> > 'create a new account' enter a new user and press 'save' I get:
> >
> > org.ofbiz.base.util.GeneralException: Error rendering screen
> > [checkoutoptions]: org.ofbiz.base.util.GeneralException: Error
> running BSH
> > script at location
> >
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh]:
>
> > org.ofbiz.base.util.GeneralException: Error running BSH script at
> >
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh],
>
> > line [54]: Sourced file:
> >
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
> :
> > null : at Line: 54 : in file:
> >
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
> :
> > party .getRelated ( "PaymentMethod" , null , UtilMisc .toList
> > ( "paymentMethodTypeId" ) )
> >
> > This is cause because the shoppingCart is not available and so the
> newly
> > created partyId cannot retrieved from it....
> >
> > if i get the party id from the logonId the problem is gone however
> the screen
> > goes to the main screen and not to the checkout options....
> >
> > anybody having the same problems? I have to deliver a shop this
> weekend....and
> > this a real showstopper....
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
>
>Return-Path: <[hidden email]>
>Delivered-To: [hidden email]
>Received: from jaz.jportfolio.com (unknown [69.26.131.105])
> by ns.sastau.it (Postfix) with ESMTP id 4ACDFE467
> for <[hidden email]>; Mon, 31 Oct 2005 22:02:38 +0100 (CET)
>Received: from jaz.jportfolio.com (jaz.jportfolio.com [127.0.0.1])
> by jaz.jportfolio.com (8.11.6/8.11.6) with ESMTP id j9VFfeo01392;
> Mon, 31 Oct 2005 10:41:40 -0500
>Received: from ofbiz01.contegix.com (63-246-7-15.contegix.com [63.246.7.15])
> by jaz.jportfolio.com (8.11.6/8.11.6) with ESMTP id j9VFfco01379
> for <[hidden email]>; Mon, 31 Oct 2005 10:41:38 -0500
>Received: (qmail 15812 invoked by uid 48); 31 Oct 2005 21:01:05 -0000
>Date: 31 Oct 2005 21:01:05 -0000
>Message-ID: <[hidden email]>
>To: [hidden email]
>From: [hidden email]
>Content-Type: text/plain; charset=UTF-8
>Content-Transfer-Encoding: 8bit
>Subject: [OFBiz] SVN: r6052 -
> trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order
>X-BeenThere: [hidden email]
>X-Mailman-Version: 2.1.5
>Precedence: list
>Reply-To: "OFBiz SVN Commit Notifications (High Traffic)" <[hidden email]>
>List-Id: "OFBiz SVN Commit Notifications \(High Traffic\)"
> <svn.lists.ofbiz.org>
>List-Unsubscribe: <http://lists.ofbiz.org/mailman/listinfo/svn>,
> <mailto:[hidden email]?subject=unsubscribe>
>List-Archive: <http://lists.ofbiz.org/pipermail/svn>
>List-Post: <mailto:[hidden email]>
>List-Help: <mailto:[hidden email]?subject=help>
>List-Subscribe: <http://lists.ofbiz.org/mailman/listinfo/svn>,
> <mailto:[hidden email]?subject=subscribe>
>Sender: [hidden email]
>Errors-To: [hidden email]
>
>Author: sichen
>Date: 2005-10-31 15:01:02 -0600 (Mon, 31 Oct 2005)
>New Revision: 6052
>
>Modified:
>   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
>   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
>Log:
>Fixed a couple of places where the ecommerce app should be using the party from the cart rather than from the userLogin
>
>Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
>===================================================================
>--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 20:59:05 UTC (rev 6051)
>+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 21:01:02 UTC (rev 6052)
>@@ -34,7 +34,8 @@
>
> shoppingCart = session.getAttribute("shoppingCart");
> currencyUomId = shoppingCart.getCurrency();
>-party = userLogin.getRelatedOne("Party");
>+partyId = shoppingCart.getPartyId();
>+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
> productStore = ProductStoreWorker.getProductStore(request);
>
> shippingEstWpr = null;
>
>Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
>===================================================================
>--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 20:59:05 UTC (rev 6051)
>+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 21:01:02 UTC (rev 6052)
>@@ -34,9 +34,9 @@
> cart = session.getAttribute("shoppingCart");
> currencyUomId = cart.getCurrency();
> userLogin = session.getAttribute("userLogin");
>-party = userLogin.getRelatedOne("Party");
>+partyId = cart.getPartyId();
>+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
> productStoreId = ProductStoreWorker.getProductStoreId(request);
>-partyId = userLogin.getString("partyId");
>
> checkOutPaymentId = "";
> if (cart != null) {
>
>
>_______________________________________________
>Svn mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/svn
>
>  
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - checkout with new user does not work

Si Chen-2
In reply to this post by Jacopo Cappellato
This is fixed in SVN r 6303 and 6304.  The right answer was to set the
cart's partyId after creating the user.

Si

Jacopo Cappellato wrote:

> Hi Hans,
>
> I'm rather sure that the problem you are seeing is related by the 6052
> commit (see attached mail for details).
> It should be rather easy to change back that code.
>
> Si, could you have a look at it as well?
>
> Thanks,
>
> Jacopo
>
>
>
> Hans Bakker wrote:
> > Hi,
> >
> > i just found a problem with a clean system, run-install etc.
> >
> > if I put an item in the shopping cart, select 'quickcheckout' and
> select
> > 'create a new account' enter a new user and press 'save' I get:
> >
> > org.ofbiz.base.util.GeneralException: Error rendering screen
> > [checkoutoptions]: org.ofbiz.base.util.GeneralException: Error
> running BSH
> > script at location
> >
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh]:
>
> > org.ofbiz.base.util.GeneralException: Error running BSH script at
> >
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh],
>
> > line [54]: Sourced file:
> >
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
> :
> > null : at Line: 54 : in file:
> >
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
> :
> > party .getRelated ( "PaymentMethod" , null , UtilMisc .toList
> > ( "paymentMethodTypeId" ) )
> >
> > This is cause because the shoppingCart is not available and so the
> newly
> > created partyId cannot retrieved from it....
> >
> > if i get the party id from the logonId the problem is gone however
> the screen
> > goes to the main screen and not to the checkout options....
> >
> > anybody having the same problems? I have to deliver a shop this
> weekend....and
> > this a real showstopper....
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
>
>Return-Path: <[hidden email]>
>Delivered-To: [hidden email]
>Received: from jaz.jportfolio.com (unknown [69.26.131.105])
> by ns.sastau.it (Postfix) with ESMTP id 4ACDFE467
> for <[hidden email]>; Mon, 31 Oct 2005 22:02:38 +0100 (CET)
>Received: from jaz.jportfolio.com (jaz.jportfolio.com [127.0.0.1])
> by jaz.jportfolio.com (8.11.6/8.11.6) with ESMTP id j9VFfeo01392;
> Mon, 31 Oct 2005 10:41:40 -0500
>Received: from ofbiz01.contegix.com (63-246-7-15.contegix.com [63.246.7.15])
> by jaz.jportfolio.com (8.11.6/8.11.6) with ESMTP id j9VFfco01379
> for <[hidden email]>; Mon, 31 Oct 2005 10:41:38 -0500
>Received: (qmail 15812 invoked by uid 48); 31 Oct 2005 21:01:05 -0000
>Date: 31 Oct 2005 21:01:05 -0000
>Message-ID: <[hidden email]>
>To: [hidden email]
>From: [hidden email]
>Content-Type: text/plain; charset=UTF-8
>Content-Transfer-Encoding: 8bit
>Subject: [OFBiz] SVN: r6052 -
> trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order
>X-BeenThere: [hidden email]
>X-Mailman-Version: 2.1.5
>Precedence: list
>Reply-To: "OFBiz SVN Commit Notifications (High Traffic)" <[hidden email]>
>List-Id: "OFBiz SVN Commit Notifications \(High Traffic\)"
> <svn.lists.ofbiz.org>
>List-Unsubscribe: <http://lists.ofbiz.org/mailman/listinfo/svn>,
> <mailto:[hidden email]?subject=unsubscribe>
>List-Archive: <http://lists.ofbiz.org/pipermail/svn>
>List-Post: <mailto:[hidden email]>
>List-Help: <mailto:[hidden email]?subject=help>
>List-Subscribe: <http://lists.ofbiz.org/mailman/listinfo/svn>,
> <mailto:[hidden email]?subject=subscribe>
>Sender: [hidden email]
>Errors-To: [hidden email]
>
>Author: sichen
>Date: 2005-10-31 15:01:02 -0600 (Mon, 31 Oct 2005)
>New Revision: 6052
>
>Modified:
>   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
>   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
>Log:
>Fixed a couple of places where the ecommerce app should be using the party from the cart rather than from the userLogin
>
>Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
>===================================================================
>--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 20:59:05 UTC (rev 6051)
>+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh 2005-10-31 21:01:02 UTC (rev 6052)
>@@ -34,7 +34,8 @@
>
> shoppingCart = session.getAttribute("shoppingCart");
> currencyUomId = shoppingCart.getCurrency();
>-party = userLogin.getRelatedOne("Party");
>+partyId = shoppingCart.getPartyId();
>+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
> productStore = ProductStoreWorker.getProductStore(request);
>
> shippingEstWpr = null;
>
>Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh
>===================================================================
>--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 20:59:05 UTC (rev 6051)
>+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutpayment.bsh 2005-10-31 21:01:02 UTC (rev 6052)
>@@ -34,9 +34,9 @@
> cart = session.getAttribute("shoppingCart");
> currencyUomId = cart.getCurrency();
> userLogin = session.getAttribute("userLogin");
>-party = userLogin.getRelatedOne("Party");
>+partyId = cart.getPartyId();
>+party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", partyId));
> productStoreId = ProductStoreWorker.getProductStoreId(request);
>-partyId = userLogin.getString("partyId");
>
> checkOutPaymentId = "";
> if (cart != null) {
>
>
>_______________________________________________
>Svn mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/svn
>
>  
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users