Hi All,
Having another couple of issues with setting up a member form for a small sporting club.
Essentially the issue I am currently having is when they chose a membership type I would like the system to automatically calculate the fees from them. I thought that if under the membership type (member_type table) if i created a price field I could just then have a plugin apply the data in the correct form.
The code I have come up with is
when using var_dump($price); exit; it comes up as NULL.
I have also created another form and table to accept payments where it will then minus the payment off this fees owing field but haven't really looked at this yet as I want to get the first bit working 1st.
Any ideas.
Thanks,
Having another couple of issues with setting up a member form for a small sporting club.
Essentially the issue I am currently having is when they chose a membership type I would like the system to automatically calculate the fees from them. I thought that if under the membership type (member_type table) if i created a price field I could just then have a plugin apply the data in the correct form.
The code I have come up with is
Code:
<?php
$member_id = $this->_data['dat_members___membership'];
$db =& JFactory::getDBO();
$member_id_clean = $db->Quote($member_id);
$db->setQuery("SELECT price FROM dat_member_type WHERE id = $member_id");
$price = $db->loadResult();
$formModel->updateFormData('dat_members___fees', $price);
$formModel->updateFormData('dat_members___fees_raw', $price);
?>
when using var_dump($price); exit; it comes up as NULL.
I have also created another form and table to accept payments where it will then minus the payment off this fees owing field but haven't really looked at this yet as I want to get the first bit working 1st.
Any ideas.
Thanks,