Support

Home Forums Event Espresso Premium Bug in cart.php?

Bug in cart.php?

Posted: April 17, 2013 at 1:26 pm


dupagechildrens

April 17, 2013 at 1:26 pm

I noticed this while modifying another part of  the code in includes/functions/cart.php:

1151 if ($early_price_data = early_discount_amount($event_id, $result->event_cost)) {

Should it read:

1151 if ($early_price_data == early_discount_amount($event_id, $result->event_cost)) {

?

 


Brent Christensen

  • Support Staff

April 17, 2013 at 2:53 pm

no it’s basically setting a value for $early_price_data then wrapping that in a conditional to see whether that function returned a value or not. The function early_discount_amount probably returns FALSE if no other value is found.

it would be equivalent to:

$early_price_data = early_discount_amount($event_id, $result->event_cost);

if ( $early_price_data ) { // does this have a value ?
...
}


dupagechildrens

April 17, 2013 at 3:03 pm

I see, thanks. I’m still learning the ins and outs of how PHP works.

The support post ‘Bug in cart.php?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso