Ordering Decimals

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

Ordering Decimals

Jacques Le Roux
Administrator
Hi,

In OFBiz, OOTB you can order decimals of products. For instance you may want to sell half pizza. That is an user decision. The user may want to allow
decimals by store or by product as shown in

https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204

We though should not be able to order a part of finished product like "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17 locally.

We should set orderDecimalQuantity to false for all products data of FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should be set on a product basis.

I think it's worth to do. Because it's demo data and would show to correctly set things. For a store which sells only not splittable products (which I
guess is most of the time when using OFBiz ecommerce) then it's possible to set the same at the store level.

What do you think?

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Pritam Kute
I think its a good idea to have orderDecimalQuantity set to N for the
products in demo data. What I have noticed in demo data is there is no
practical product data available for which we can set this flag to Y. IMO,
we can add one or two demo products that can be ordered in
decimal quantities.

For the product store level flag, we can modify the field description in
entity definition to convey the message to the user to set the flag to Y
for a global setting. If it is set to Y then the user may not need to set
the flag at each product level.

Kind Regards,
--
Pritam Kute


On Mon, Jul 20, 2020 at 10:48 PM Jacques Le Roux <
[hidden email]> wrote:

> Hi,
>
> In OFBiz, OOTB you can order decimals of products. For instance you may
> want to sell half pizza. That is an user decision. The user may want to
> allow
> decimals by store or by product as shown in
>
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
>
> We though should not be able to order a part of finished product like
> "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17
> locally.
>
> We should set orderDecimalQuantity to false for all products data of
> FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should
> be set on a product basis.
>
> I think it's worth to do. Because it's demo data and would show to
> correctly set things. For a store which sells only not splittable products
> (which I
> guess is most of the time when using OFBiz ecommerce) then it's possible
> to set the same at the store level.
>
> What do you think?
>
> Jacques
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Jacques Le Roux
Administrator
Hi Pritam,

Le 21/07/2020 à 08:13, Pritam Kute a écrit :
> I think its a good idea to have orderDecimalQuantity set to N for the
> products in demo data. What I have noticed in demo data is there is no
> practical product data available for which we can set this flag to Y. IMO,
> we can add one or two demo products that can be ordered in
> decimal quantities.

I'd advocate that products like pizza, ie Configurable Foods products, can be sell as parts.


> For the product store level flag, we can modify the field description in
> entity definition to convey the message to the user to set the flag to Y
> for a global setting. If it is set to Y then the user may not need to set
> the flag at each product level.

+1

Jacques

>
> Kind Regards,
> --
> Pritam Kute
>
>
> On Mon, Jul 20, 2020 at 10:48 PM Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi,
>>
>> In OFBiz, OOTB you can order decimals of products. For instance you may
>> want to sell half pizza. That is an user decision. The user may want to
>> allow
>> decimals by store or by product as shown in
>>
>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
>>
>> We though should not be able to order a part of finished product like
>> "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
>> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17
>> locally.
>>
>> We should set orderDecimalQuantity to false for all products data of
>> FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
>> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should
>> be set on a product basis.
>>
>> I think it's worth to do. Because it's demo data and would show to
>> correctly set things. For a store which sells only not splittable products
>> (which I
>> guess is most of the time when using OFBiz ecommerce) then it's possible
>> to set the same at the store level.
>>
>> What do you think?
>>
>> Jacques
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Pawan Verma
+1 for setting orderDecimalQuantity to N in demo data and introduce some(at
least 2-3) demo decimal quantity products.
--
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com


On Tue, Jul 21, 2020 at 12:21 PM Jacques Le Roux <
[hidden email]> wrote:

> Hi Pritam,
>
> Le 21/07/2020 à 08:13, Pritam Kute a écrit :
> > I think its a good idea to have orderDecimalQuantity set to N for the
> > products in demo data. What I have noticed in demo data is there is no
> > practical product data available for which we can set this flag to Y.
> IMO,
> > we can add one or two demo products that can be ordered in
> > decimal quantities.
>
> I'd advocate that products like pizza, ie Configurable Foods products, can
> be sell as parts.
>
>
> > For the product store level flag, we can modify the field description in
> > entity definition to convey the message to the user to set the flag to Y
> > for a global setting. If it is set to Y then the user may not need to set
> > the flag at each product level.
>
> +1
>
> Jacques
>
> >
> > Kind Regards,
> > --
> > Pritam Kute
> >
> >
> > On Mon, Jul 20, 2020 at 10:48 PM Jacques Le Roux <
> > [hidden email]> wrote:
> >
> >> Hi,
> >>
> >> In OFBiz, OOTB you can order decimals of products. For instance you may
> >> want to sell half pizza. That is an user decision. The user may want to
> >> allow
> >> decimals by store or by product as shown in
> >>
> >>
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
> >>
> >> We though should not be able to order a part of finished product like
> >> "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we
> have an
> >> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17
> >> locally.
> >>
> >> We should set orderDecimalQuantity to false for all products data of
> >> FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
> >> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it
> should
> >> be set on a product basis.
> >>
> >> I think it's worth to do. Because it's demo data and would show to
> >> correctly set things. For a store which sells only not splittable
> products
> >> (which I
> >> guess is most of the time when using OFBiz ecommerce) then it's possible
> >> to set the same at the store level.
> >>
> >> What do you think?
> >>
> >> Jacques
> >>
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Suraj Khurana-2
In reply to this post by Pritam Kute
Hi,

+1 to have some products in demo data with decimal quantity configuration.

Also, if we agree for product store level configuration, it should be
entertaining in a similar manner as we have done for requireInventory
(Check service isStoreInventoryRequiredInline).
Means, giving priority to product level configuration and then store level.

HTH.
--
Best Regards,
Suraj Khurana
Senior Technical Consultant


On Tue, Jul 21, 2020 at 11:44 AM Pritam Kute <[hidden email]>
wrote:

> I think its a good idea to have orderDecimalQuantity set to N for the
> products in demo data. What I have noticed in demo data is there is no
> practical product data available for which we can set this flag to Y. IMO,
> we can add one or two demo products that can be ordered in
> decimal quantities.
>
> For the product store level flag, we can modify the field description in
> entity definition to convey the message to the user to set the flag to Y
> for a global setting. If it is set to Y then the user may not need to set
> the flag at each product level.
>
> Kind Regards,
> --
> Pritam Kute
>
>
> On Mon, Jul 20, 2020 at 10:48 PM Jacques Le Roux <
> [hidden email]> wrote:
>
> > Hi,
> >
> > In OFBiz, OOTB you can order decimals of products. For instance you may
> > want to sell half pizza. That is an user decision. The user may want to
> > allow
> > decimals by store or by product as shown in
> >
> >
> >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
> >
> > We though should not be able to order a part of finished product like
> > "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have
> an
> > issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17
> > locally.
> >
> > We should set orderDecimalQuantity to false for all products data of
> > FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
> > ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should
> > be set on a product basis.
> >
> > I think it's worth to do. Because it's demo data and would show to
> > correctly set things. For a store which sells only not splittable
> products
> > (which I
> > guess is most of the time when using OFBiz ecommerce) then it's possible
> > to set the same at the store level.
> >
> > What do you think?
> >
> > Jacques
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Jacques Le Roux
Administrator
Le 21/07/2020 à 09:29, Suraj Khurana a écrit :
> Also, if we agree for product store level configuration, it should be
> entertaining in a similar manner as we have done for requireInventory
> (Check service isStoreInventoryRequiredInline).
> Means, giving priority to product level configuration and then store level.

+1

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
I created OFBIZ-11916 for that

Le 20/07/2020 à 19:17, Jacques Le Roux a écrit :

> Hi,
>
> In OFBiz, OOTB you can order decimals of products. For instance you may want to sell half pizza. That is an user decision. The user may want to
> allow decimals by store or by product as shown in
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
>
> We though should not be able to order a part of finished product like "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17 locally.
>
> We should set orderDecimalQuantity to false for all products data of FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should be set on a product basis.
>
> I think it's worth to do. Because it's demo data and would show to correctly set things. For a store which sells only not splittable products (which
> I guess is most of the time when using OFBiz ecommerce) then it's possible to set the same at the store level.
>
> What do you think?
>
> Jacques
>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Jacques Le Roux
Administrator
Hi All,

I believe OFBIZ-11899 is due to a mismatch in the Boostrap "recent" changes (also in R18, R17 OK).

The browser log says: "TypeError: document.addform.quantity is undefined"

Here is the generated code:

<form method="post" action="https://localhost:8443/ecomseo/additem/product" name="addform"><input type="hidden" name="product_id"
value="ENCHILADAS"><input type="hidden" name="add_product_id" value="ENCHILADAS"><div class="tabletext"><b></b></div></form></td></tr><tr><td><div
id="add_amount" class="hidden"><label>Amount</label><input type="text" size="5" class="form-control mb-2" name="add_amount" value=""></div><div
class="input-group"><input type="text" size="5" name="quantity" value="1" class="form-control form-control-sm"><span class="input-group-button"><a
href="javascript:addItem()" class="btn btn-outline-secondary btn-sm">Add to Cart </a></span></div></td></tr><tr>Though it seems OK in ecommerce
ConfigProductDetail.ftl, addform form is closed before enclosing add_amount and quantity fields, As I have no competencies in Boostrap, and don't want
to have, could somebody competent have a look? I need that before fixing OFBIZ-11916. TIA Jacques

Le 25/07/2020 à 12:05, Jacques Le Roux a écrit :

> I created OFBIZ-11916 for that
>
> Le 20/07/2020 à 19:17, Jacques Le Roux a écrit :
>> Hi,
>>
>> In OFBiz, OOTB you can order decimals of products. For instance you may want to sell half pizza. That is an user decision. The user may want to
>> allow decimals by store or by product as shown in
>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
>>
>> We though should not be able to order a part of finished product like "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
>> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17 locally.
>>
>> We should set orderDecimalQuantity to false for all products data of FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
>> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should be set on a product basis.
>>
>> I think it's worth to do. Because it's demo data and would show to correctly set things. For a store which sells only not splittable products
>> (which I guess is most of the time when using OFBiz ecommerce) then it's possible to set the same at the store level.
>>
>> What do you think?
>>
>> Jacques
>>
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Decimals

Jacques Le Roux
Administrator
Hi,

I was wrong. It's not due to Boostrap. I could not understand how a theming feature could do that.
So I searched and found the reason of this regression. It's due to
https://gitbox.apache.org/repos/asf?p=ofbiz-plugins.git;h=a802ae0


With 88224620  I reverted Suraj's workaround and the change in ConfigProductDetail.ftl by
commit a802ae0. I'll ask James to fix the root of the issue in OFBIZ-11706.

I hope there are no other types or regressions...

Jacques

Le 07/08/2020 à 11:20, Jacques Le Roux a écrit :

> Hi All,
>
> I believe OFBIZ-11899 is due to a mismatch in the Boostrap "recent" changes (also in R18, R17 OK).
>
> The browser log says: "TypeError: document.addform.quantity is undefined"
>
> Here is the generated code:
>
> <form method="post" action="https://localhost:8443/ecomseo/additem/product" name="addform"><input type="hidden" name="product_id"
> value="ENCHILADAS"><input type="hidden" name="add_product_id" value="ENCHILADAS"><div class="tabletext"><b></b></div></form></td></tr><tr><td><div
> id="add_amount" class="hidden"><label>Amount</label><input type="text" size="5" class="form-control mb-2" name="add_amount" value=""></div><div
> class="input-group"><input type="text" size="5" name="quantity" value="1" class="form-control form-control-sm"><span class="input-group-button"><a
> href="javascript:addItem()" class="btn btn-outline-secondary btn-sm">Add to Cart </a></span></div></td></tr><tr>Though it seems OK in ecommerce
> ConfigProductDetail.ftl, addform form is closed before enclosing add_amount and quantity fields, As I have no competencies in Boostrap, and don't
> want to have, could somebody competent have a look? I need that before fixing OFBIZ-11916. TIA Jacques
>
> Le 25/07/2020 à 12:05, Jacques Le Roux a écrit :
>> I created OFBIZ-11916 for that
>>
>> Le 20/07/2020 à 19:17, Jacques Le Roux a écrit :
>>> Hi,
>>>
>>> In OFBiz, OOTB you can order decimals of products. For instance you may want to sell half pizza. That is an user decision. The user may want to
>>> allow decimals by store or by product as shown in
>>>
>>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java#L1204
>>>
>>> We though should not be able to order a part of finished product like "Tiny Chrome Widget" (try 3.5 as mini is 3). You may notice that we have an
>>> issue in trunk and R18: see OFBIZ-11899. It works in stable demo and R17 locally.
>>>
>>> We should set orderDecimalQuantity to false for all products data of FINISHED_GOOD, SERVICE, AGGREGATED, MARKETING_PKG_AUTO, DIGITAL_GOOD,
>>> ASSET_USAGE, etc. as can be seen in ProductSeedData.xml. Anyway it should be set on a product basis.
>>>
>>> I think it's worth to do. Because it's demo data and would show to correctly set things. For a store which sells only not splittable products
>>> (which I guess is most of the time when using OFBiz ecommerce) then it's possible to set the same at the store level.
>>>
>>> What do you think?
>>>
>>> Jacques
>>>