Add to cart with zero quantity

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

Add to cart with zero quantity

surajk
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
Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Jacques Le Roux
Administrator
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
>

Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Pierre Smits-3
In reply to this post by surajk
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Sharan Foga
In reply to this post by surajk
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Jacques Le Roux
Administrator
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 <[hidden email]> 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
>>

Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Jacques Le Roux
Administrator
In reply to this post by surajk
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
>

Reply | Threaded
Open this post in threaded view
|

Re: Add to cart with zero quantity

Suraj Khurana
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: [hidden email]

On Mon, Sep 10, 2018 at 11:48 AM, Jacques Le Roux <
[hidden email]> 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
>>
>>
>