Getting Enties for Field

mamies

Member
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

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,
 
I think I have found what I am missing but am not 100% sure.

I believe that I am writing for Joomla 1.5 instead of Joomla 2.5. I will have a research on what I need to do to write for 2.5 and will post an update.

Thanks
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top