You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by james_sg <sn...@hotmail.com> on 2010/02/12 02:54:46 UTC

Selected Amount and Quantity

Hi,

I am looking at the Order Manager module.
May I know what is the difference between the SelectedAmount and Quantity
attributes in the CustRequestItem entity? 

Regards,
James
-- 
View this message in context: http://n4.nabble.com/Selected-Amount-and-Quantity-tp1478030p1478030.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Selected Amount and Quantity

Posted by prateek <pr...@gmail.com>.
Hello Bilgin, James,

Are you able to reload / replenish a gift card from Apache OFBiz 
13.07.01?

I'm unable to replenish it and add it to cart.

I see https://issues.apache.org/jira/browse/OFBIZ-1605 and seems that 
issue is still there.

Could anyone please look at this issue?

regards,
________________________________________________________________________


james_sg snowmedal <at hotmail.com writes:
 
Thanks all. The explanations help.
 
BJ Freeman wrote:
 
the code is taking the results of a quantity price look up and 
calculating the price for this quote. selected amount is the quantity 
price range selected Price to be used to calculate the final price 
Quantity is the pieces quoting on. The product price break is in the 
catalog component. if you don't have any quantity price breaks then 
selected amount is not used. 
 
looking up the code is the only way to figure these things out. I use 
Eclipse search feature. 
 
 
Bilgin Ibryam-2 wrote:
 
Taka a look at "Gift Card Reload" GC-002 product to see how amount field 
is used together with quantity in order creation. In a similar manner 
you can create a request item with amount, then receive a quote for the 
selected amount and create order.
 
Bilgin
 
 


Re: Selected Amount and Quantity

Posted by james_sg <sn...@hotmail.com>.
Thanks all. The explanations help.


BJ Freeman wrote:
> 
> the code is taking the results of a quantity price look up and 
> calculating the price for this quote . 
> selected amount is the quantity price range selected Price to be used to 
> calculate the final price 
> Quantity is the pieces quoting on. 
> The product price break is in the catalog component. 
> if you don't have any quantity price breaks then selected amount is not 
> used. 
> 
> looking up the code is the only way to figure these things out. 
> I use Eclipse search feature. 
> 



Bilgin Ibryam-2 wrote:
> 
> Taka a look at "Gift Card Reload" GC-002 product to see how amount field 
> is used together with quantity in order creation.
> In a similar manner you can create a request item with amount, then 
> receive a quote for the selected amount and create order.
> 
> Bilgin
> 

-- 
View this message in context: http://n4.nabble.com/Selected-Amount-and-Quantity-tp1478030p1558888.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Selected Amount and Quantity

Posted by Bilgin Ibryam <bi...@gmail.com>.
james_sg wrote:
> Anyone? The two attributes seem the same to me..
>
>
> james_sg wrote:
>   
>> Hi,
>>
>> I am looking at the Order Manager module.
>> May I know what is the difference between the SelectedAmount and Quantity
>> attributes in the CustRequestItem entity? 
>>
>> Regards,
>> James
>>
>>     
>
>   
Taka a look at "Gift Card Reload" GC-002 product to see how amount field 
is used together with quantity in order creation.
In a similar manner you can create a request item with amount, then 
receive a quote for the selected amount and create order.

Bilgin

Re: Selected Amount and Quantity

Posted by james_sg <sn...@hotmail.com>.
Anyone? The two attributes seem the same to me..


james_sg wrote:
> 
> Hi,
> 
> I am looking at the Order Manager module.
> May I know what is the difference between the SelectedAmount and Quantity
> attributes in the CustRequestItem entity? 
> 
> Regards,
> James
> 

-- 
View this message in context: http://n4.nabble.com/Selected-Amount-and-Quantity-tp1478030p1558408.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Selected Amount and Quantity

Posted by james_sg <sn...@hotmail.com>.
Hi Freeman,

I have taken a look at the code below. 
Basically it calls the calculateProductPrice method from PriceServices.java. 
As the amount attribute is to be used with a custom method that doesn't
exists in the demo data, 
I am not able to know what the amount attribute is used for.

Regards,
James


BJ Freeman wrote:
> 
> take a look at
> applications\order\script\org\ofbiz\order\quote\QuoteServices.xml
> 
> <set from-field="product" field="calculateProductPriceMap.product"/>
>                         <set from-field="parameters.quantity"
> field="calculateProductPriceMap.quantity"/>
>                         <if-not-empty field="parameters.selectedAmount">
>                             <set from-field="parameters.selectedAmount"
> field="calculateProductPriceMap.amount"/>
>                         </if-not-empty>
>                         <call-service
> service-name="calculateProductPrice"
> in-map-name="calculateProductPriceMap">
>                             <result-to-field result-name="price"
> field="newEntity.quoteUnitPrice"/>
>                         </call-service>
> 
> 
> 

-- 
View this message in context: http://n4.nabble.com/Selected-Amount-and-Quantity-tp1478030p1558508.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Selected Amount and Quantity

Posted by BJ Freeman <bj...@free-man.net>.
the code is taking the results of a quantity price look up and
calculating the price for this quote .
selected amount is the quantity price range selected Price to be used to
calculate the final price
Quantity is the pieces quoting on.
The product price break is in the catalog component.
if you don't have any quantity price breaks then selected amount is not
used.

looking up the code is the only way to figure these things out.
I use Eclipse search feature.



james_sg sent the following on 2/17/2010 3:10 AM:
> Hi Freeman,
> 
> I have taken a look at the code below. 
> Basically it calls the calculateProductPrice method from PriceServices.java. 
> As the amount attribute is to be used with a custom method that doesn't
> exists in the demo data, 
> I am not able to know what the amount attribute is used for.
> 
> Regards,
> James
> 
> 
> BJ Freeman wrote:
>> take a look at
>> applications\order\script\org\ofbiz\order\quote\QuoteServices.xml
>>
>> <set from-field="product" field="calculateProductPriceMap.product"/>
>>                         <set from-field="parameters.quantity"
>> field="calculateProductPriceMap.quantity"/>
>>                         <if-not-empty field="parameters.selectedAmount">
>>                             <set from-field="parameters.selectedAmount"
>> field="calculateProductPriceMap.amount"/>
>>                         </if-not-empty>
>>                         <call-service
>> service-name="calculateProductPrice"
>> in-map-name="calculateProductPriceMap">
>>                             <result-to-field result-name="price"
>> field="newEntity.quoteUnitPrice"/>
>>                         </call-service>
>>
>>
>>
> 


Re: Selected Amount and Quantity

Posted by BJ Freeman <bj...@free-man.net>.
take a look at
applications\order\script\org\ofbiz\order\quote\QuoteServices.xml

<set from-field="product" field="calculateProductPriceMap.product"/>
                        <set from-field="parameters.quantity"
field="calculateProductPriceMap.quantity"/>
                        <if-not-empty field="parameters.selectedAmount">
                            <set from-field="parameters.selectedAmount"
field="calculateProductPriceMap.amount"/>
                        </if-not-empty>
                        <call-service
service-name="calculateProductPrice" in-map-name="calculateProductPriceMap">
                            <result-to-field result-name="price"
field="newEntity.quoteUnitPrice"/>
                        </call-service>


james_sg sent the following on 2/17/2010 1:31 AM:
> Anyone? The two attributes seem the same to me..
> 
> 
> james_sg wrote:
>> Hi,
>>
>> I am looking at the Order Manager module.
>> May I know what is the difference between the SelectedAmount and Quantity
>> attributes in the CustRequestItem entity? 
>>
>> Regards,
>> James
>>
>