mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-23 01:03:23 -05:00
Provides membership discount value on callback.
This commit is contained in:
parent
f69c4d49c9
commit
20741bd9d6
@ -23,6 +23,7 @@ $volunteer_hour_value = VOLUNTEER_HOUR_VALUE;
|
|||||||
$volunteer_discount = VOLUNTEER_DISCOUNT;
|
$volunteer_discount = VOLUNTEER_DISCOUNT;
|
||||||
$special_volunteer_hours_qualification = SPECIAL_VOLUNTEER_HOURS_QUALIFICATION;
|
$special_volunteer_hours_qualification = SPECIAL_VOLUNTEER_HOURS_QUALIFICATION;
|
||||||
$special_volunteer_discount = SPECIAL_VOLUNTEER_DISCOUNT;
|
$special_volunteer_discount = SPECIAL_VOLUNTEER_DISCOUNT;
|
||||||
|
$membership_discount = MEMBERSHIP_DISCOUNT;
|
||||||
|
|
||||||
|
|
||||||
// Is there a current shop?
|
// Is there a current shop?
|
||||||
@ -97,7 +98,7 @@ $special_volunteer_discount = SPECIAL_VOLUNTEER_DISCOUNT;
|
|||||||
// Membership Benefits - send contact_id
|
// Membership Benefits - send contact_id
|
||||||
if (isset($_POST['membership_benefits'])) {
|
if (isset($_POST['membership_benefits'])) {
|
||||||
|
|
||||||
echo json_encode(membership_benefits($_POST['contact_id']));
|
echo json_encode(membership_benefits($_POST['contact_id'], $membership_discount));
|
||||||
|
|
||||||
} // Membership Benefits
|
} // Membership Benefits
|
||||||
|
|
||||||
@ -658,7 +659,7 @@ $special_volunteer_discount = SPECIAL_VOLUNTEER_DISCOUNT;
|
|||||||
|
|
||||||
} // End Deposit Calculator
|
} // End Deposit Calculator
|
||||||
|
|
||||||
function membership_benefits($contact_id) {
|
function membership_benefits($contact_id, $membership_discount) {
|
||||||
|
|
||||||
global $database_YBDB, $YBDB;
|
global $database_YBDB, $YBDB;
|
||||||
mysql_select_db($database_YBDB, $YBDB);
|
mysql_select_db($database_YBDB, $YBDB);
|
||||||
@ -674,6 +675,7 @@ $special_volunteer_discount = SPECIAL_VOLUNTEER_DISCOUNT;
|
|||||||
|
|
||||||
$sql = mysql_query($query, $YBDB) or die(mysql_error());
|
$sql = mysql_query($query, $YBDB) or die(mysql_error());
|
||||||
$result = mysql_fetch_assoc($sql);
|
$result = mysql_fetch_assoc($sql);
|
||||||
|
$result['membership_discount'] = $membership_discount;
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
} // end membership_benefits
|
} // end membership_benefits
|
||||||
|
Loading…
x
Reference in New Issue
Block a user