[OFBiz] Dev - Price Rule Discount for Role Type
Si Chen
schen at graciousstyle.com
Mon Sep 20 18:39:42 EDT 2004
Hi David,
I did notice that in the ShoppingCart, the clear() method does not
actually clear the orderPartyId member field. Thus, if someone already
created an order and then logs out, the cart will still keep his/her
orderPartyId. I thought that this was an intentional feature, but is
it? Could this be what caused the a non-logged in user to get a
role-based promotion?
Si
David E. Jones wrote:
>
> The price and promo calculations are done with the currently logged
> in user, or the user associated with the shopping cart. I don't think
> they use the visit anywhere...
>
> In general if this is happening then something is wrong. ALL of the
> session data should be cleared, including the shopping cart, when a
> user logs out. Though, it seems like at one point the shopping cart
> was saved and put into the new session, which it shouldn't be doing,
> that's not a good idea for security reasons.
>
> -David
>
>
> On Sep 16, 2004, at 1:22 PM, Si Chen wrote:
>
>> It was using the same computer/ip address. Basically, create a
>> special discount rule. Have someone who qualifies for the rule log
>> in. Then log that person out. Then try to add items to cart as an
>> anonymous user. I saw the same discounts being offered to this other
>> user.
>>
>> I think that each visit is associated with a party, and the
>> promotions/price rule system is using the visit to find the party
>> for the price rules. And the visit system works such that even
>> after someone is logged out, the visit is still associated with that
>> party.
>>
>> My theory (though I haven't tested it) is that once the anonymous
>> party starts the check out process and puts in a different
>> username/password or creates a new account to identify himself, the
>> promotions rules will run on this new party, and the discounts will
>> no longer be applied. This has the effect of "taking away" the
>> discounts from this person once he has identified himself--maybe not
>> something he would appreciate.
>>
>> I think visit is based on a cookie for the session, so it would be
>> for the same computer (though maybe not necessarily requiring the
>> same ip.)
>>
>> I think it is logical to think that even after someone has logged
>> out, the visit is still of the same party. But perhaps the
>> promotions manager and price rule should check not only the party of
>> the visit, but also whether that party is logged in, before applying
>> special party-specific rules. Does this make sense?
>>
>> Si
>>
>> Daniel L. Kunkel wrote:
>>
>>> Hi
>>>
>>> Gobal Price Rules seem to me to be different than the Product
>>> Promos... they're on a different tab, seem to be a little less
>>> confusing in term of setup and operation.
>>>
>>> I haven't tried my first party specific promo yet, but I was hoping
>>> to soon, and will try out the abandoned cart functionality... Do
>>> you know if it matters at all if it's from the same computer/ip
>>> address or a different one?
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>> Date sent: Thu, 16 Sep 2004 11:23:33 -0700
>>> From: Si Chen <schen at graciousstyle.com>
>>> Organization: Gracious Style
>>> To: OFBiz Development <dev at lists.ofbiz.org>
>>> Subject: Re: [OFBiz] Dev - Price Rule Discount for Role Type
>>> Send reply to: OFBiz Development <dev at lists.ofbiz.org>
>>> <mailto:dev-request at lists.ofbiz.org?subject=unsubscribe>
>>> <mailto:dev-request at lists.ofbiz.org?subject=subscribe>
>>>
>>>
>>>> Hi Daniel,
>>>>
>>>> I was able to use the Product Promo and Party Role to create
>>>> role-based price discounts earlier. It worked fairly well. The
>>>> only difficulty I had was that after someone logged out, the
>>>> party apparently is still recorded, so the next anonymous party
>>>> who adds items to cart will also get the same discount. I think
>>>> this is because once there is a party associated with a visit,
>>>> after you log out, the same party is still associated with the
>>>> visit. Have you tried this, and have you seen the same problem?
>>>>
>>>> Si
>>>>
>>>> Daniel L. Kunkel wrote:
>>>>
>>>>
>>>>> Hi Again...
>>>>>
>>>>> I just figured out what happened with the Global Price Rule
>>>>> system in my case...
>>>>>
>>>>> Price Rules REQUIRE a List price for each product, even if the
>>>>> action is based on the Default Price.
>>>>>
>>>>> It may have also been helpful that I added a condition "Product
>>>>> Category" "is not" "Empty"
>>>>>
>>>>> We had removed the "List" prices from entries, because it often
>>>>> looked weird, but everything is looking much better now.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> Daniel
>>>>>
>>>>> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-
>>>>> .,,.-
>>>>> Have a GREAT Day!
>>>>>
>>>>> Daniel Kunkel DanielKunkel at BioWaves.com
>>>>> BioWaves, LLC
>>>>> 14150 NE 20th Street, Suite 121
>>>>> Bellevue, WA 98007
>>>>> 800-734-3588 425-895-0050
>>>>> http://www.BioWaves.com
>>>>> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-
>>>>> .,,.-
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> Dev at lists.ofbiz.org
>>>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at lists.ofbiz.org
>>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>>
>>>
>>>
>>> Daniel
>>>
>>> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-
>>> Have a GREAT Day!
>>>
>>> Daniel Kunkel DanielKunkel at BioWaves.com
>>> BioWaves, LLC
>>> 14150 NE 20th Street, Suite 121
>>> Bellevue, WA 98007
>>> 800-734-3588 425-895-0050
>>> http://www.BioWaves.com
>>> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at lists.ofbiz.org
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.ofbiz.org
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>Dev at lists.ofbiz.org
>http://lists.ofbiz.org/mailman/listinfo/dev
>
More information about the Dev
mailing list