Forum OpenACS Q&A: Response to More ecommerce bugs (solutions included)

Collapse
Posted by Gaizka Villate on
Hi! I sent the diff file to Roberto, but luckily he hasn't included them into the CVS. I was wrong in bug #2 (of the list above). The original code reads:
# valid offer codes must be <= 20 characters, so if it's more than 20 characters, pretend
# it isn't there
if { [info exists offer_code] && [string length $offer_code] <= 20 } {
    ad_return_complaint 1 "<li> You need to have cookies turned on in order to have special ..."
    return
} 

And, instead of the silly thing i wrote above, it should read (i've checked it against Oracle ACS):

# valid offer codes must be <= 20 characters, so if it's more than 20 characters, pretend
# it isn't there
if { ![info exists user_session_id] } {
    if { [info exists offer_code] && [string length $offer_code] <= 20 } {
        ad_return_complaint 1 "<li>You need to have cookies turned on in order to have special ..."
        return
    }
} 

I'll send the new diff to Roberto.

Sorry about that, guys!