You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Suraj Khurana <su...@apache.org> on 2018/09/05 10:43:49 UTC
Add to cart with zero quantity
Hello team,
Currently, it is possible to add items in cart with zero quantity. I can't
think of any use case for this.
We also have a method available in shopping cart as *removeEmptyCartItems*,
but it is always called while handling exceptions.
I think we can call this method before create order to make sure no items
in cart have zero quantity.
Please share your thoughts.
--
Thanks and Regards,
Suraj Khurana
Omnichannel OMS Technical Expert
HotWax Systems
Re: Add to cart with zero quantity
Posted by Pierre Smits <pi...@apache.org>.
At the moment I can't see the business case either. If you have the time
and the willingness, please raise a JIRA ticket and address accordingly.
Best regards,
Pierre Smits
Apache Trafodion <https://trafodion.apache.org>, Vice President
Apache Directory <https://directory.apache.org>, PMC Member
Apache Incubator <https://incubator.apache.org>, committer
*Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
since 2008*
Apache Steve <https://steve.apache.org>, committer
On Wed, Sep 5, 2018 at 12:43 PM, Suraj Khurana <su...@apache.org> wrote:
> Hello team,
>
> Currently, it is possible to add items in cart with zero quantity. I can't
> think of any use case for this.
> We also have a method available in shopping cart as *removeEmptyCartItems*,
> but it is always called while handling exceptions.
>
> I think we can call this method before create order to make sure no items
> in cart have zero quantity.
> Please share your thoughts.
>
> --
> Thanks and Regards,
> Suraj Khurana
> Omnichannel OMS Technical Expert
> HotWax Systems
>
Re: Add to cart with zero quantity
Posted by Suraj Khurana <su...@hotwaxsystems.com>.
Thanks everyone for your inputs.
I have created a Jira here
<https://issues.apache.org/jira/browse/OFBIZ-10555>.
--
Best Regards,
Suraj Khurana
Omnichannel OMS Technical Expert
HotWax Systems
m: +91 96697-50002
e: suraj.khurana@hotwaxsystems.com
On Mon, Sep 10, 2018 at 11:48 AM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:
> Hi Suraj,
>
> I did not get enough time yet to continue on my idea of creating a
> [PROPOSAL] following the thread "[QUESTION] Should we not check fields
> consistency?"
>
> So please feel free to create an improvement Jira for this task. We can
> later link appropriately.
>
> Thanks
>
> Jacques
>
>
> Le 05/09/2018 à 12:43, Suraj Khurana a écrit :
>
>> Hello team,
>>
>> Currently, it is possible to add items in cart with zero quantity. I can't
>> think of any use case for this.
>> We also have a method available in shopping cart as
>> *removeEmptyCartItems*,
>> but it is always called while handling exceptions.
>>
>> I think we can call this method before create order to make sure no items
>> in cart have zero quantity.
>> Please share your thoughts.
>>
>> --
>> Thanks and Regards,
>> Suraj Khurana
>> Omnichannel OMS Technical Expert
>> HotWax Systems
>>
>>
>
Re: Add to cart with zero quantity
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Suraj,
I did not get enough time yet to continue on my idea of creating a [PROPOSAL] following the thread "[QUESTION] Should we not check fields consistency?"
So please feel free to create an improvement Jira for this task. We can later link appropriately.
Thanks
Jacques
Le 05/09/2018 à 12:43, Suraj Khurana a écrit :
> Hello team,
>
> Currently, it is possible to add items in cart with zero quantity. I can't
> think of any use case for this.
> We also have a method available in shopping cart as *removeEmptyCartItems*,
> but it is always called while handling exceptions.
>
> I think we can call this method before create order to make sure no items
> in cart have zero quantity.
> Please share your thoughts.
>
> --
> Thanks and Regards,
> Suraj Khurana
> Omnichannel OMS Technical Expert
> HotWax Systems
>
Re: Add to cart with zero quantity
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Suraj,
Thanks for you report and suggestion.
I'd recommend to make this part of the global reflection about fields validation I called about in the "[QUESTION] Should we not check fields
consistency?" thread.
The idea is not not have such changes scattered all over the place when we could have a coordinated effort in Jiras with subtasks. It would be then
easier to define an to later document.
We though still to clarify what we want to do or not and make a Proposal.
Your suggestion would be a point, maybe part of related such things (empty or zero non sense fields). So a subtask of a Jira which still need to be
defined.
Jacques
Le 05/09/2018 à 12:43, Suraj Khurana a écrit :
> Hello team,
>
> Currently, it is possible to add items in cart with zero quantity. I can't
> think of any use case for this.
> We also have a method available in shopping cart as *removeEmptyCartItems*,
> but it is always called while handling exceptions.
>
> I think we can call this method before create order to make sure no items
> in cart have zero quantity.
> Please share your thoughts.
>
> --
> Thanks and Regards,
> Suraj Khurana
> Omnichannel OMS Technical Expert
> HotWax Systems
>
Re: Add to cart with zero quantity
Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Sharan for the details,
There are certainly other "little" quirks like that and we should try to act globally on them
OK, I'm rehashing my idea and should rather create a Jira main task/umbrella and begin to work on it :D
Jacques
Le 06/09/2018 à 17:37, Sharan Foga a écrit :
> Hi Suraj
>
> I also can’t think of a reason a zero quantity of an item would need to be added to the shopping cart. So yes I think adding a check so that any zero quantities are removed from the cart before creating the order would be good.
>
> For info - I did a quick test using the stable demo and added a zero quantity widget to the shopping cart. It created an order and gave me all the discounts and promotional items as if I’d actually bought something.
>
> Realistically, I think what you've found is a little hole in the order creation logic that needs to fixed.
>
> Thanks
> Sharan
>
> On 2018/09/05 10:43:49, Suraj Khurana <su...@apache.org> wrote:
>> Hello team,
>>
>> Currently, it is possible to add items in cart with zero quantity. I can't
>> think of any use case for this.
>> We also have a method available in shopping cart as *removeEmptyCartItems*,
>> but it is always called while handling exceptions.
>>
>> I think we can call this method before create order to make sure no items
>> in cart have zero quantity.
>> Please share your thoughts.
>>
>> --
>> Thanks and Regards,
>> Suraj Khurana
>> Omnichannel OMS Technical Expert
>> HotWax Systems
>>
Re: Add to cart with zero quantity
Posted by Sharan Foga <sh...@apache.org>.
Hi Suraj
I also can’t think of a reason a zero quantity of an item would need to be added to the shopping cart. So yes I think adding a check so that any zero quantities are removed from the cart before creating the order would be good.
For info - I did a quick test using the stable demo and added a zero quantity widget to the shopping cart. It created an order and gave me all the discounts and promotional items as if I’d actually bought something.
Realistically, I think what you've found is a little hole in the order creation logic that needs to fixed.
Thanks
Sharan
On 2018/09/05 10:43:49, Suraj Khurana <su...@apache.org> wrote:
> Hello team,
>
> Currently, it is possible to add items in cart with zero quantity. I can't
> think of any use case for this.
> We also have a method available in shopping cart as *removeEmptyCartItems*,
> but it is always called while handling exceptions.
>
> I think we can call this method before create order to make sure no items
> in cart have zero quantity.
> Please share your thoughts.
>
> --
> Thanks and Regards,
> Suraj Khurana
> Omnichannel OMS Technical Expert
> HotWax Systems
>