Error message: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND main_table.points_spent > 0
In order to fix the possible issue that some admin user could experience when trying to add customer from Magento® admin, please modify the file app/code/community/Rewardpoints/Block/Adminhtml/Customer/Edit/Tab.php and replace:
this->addTab(‘rewardpoints’, array(
‘label’ => Mage::helper(‘rewardpoints’)->__(‘Reward Points’),
//’content’ => $this->getLayout()->createBlock(‘rewardpoints/adminhtml_customerstats’)->toHtml()
‘content’ => $this->getLayout()->createBlock(‘rewardpoints/adminhtml_customerpoints’)->initForm()->toHtml()
));
$this->_updateActiveTab();
by
$customer = Mage::registry(‘current_customer’);
if ($customer->getId()){
$this->addTab(‘rewardpoints’, array(
‘label’ => Mage::helper(‘rewardpoints’)->__(‘Reward Points’),
‘content’ => $this->getLayout()->createBlock(‘rewardpoints/adminhtml_customerpoints’)->initForm()->toHtml()
));
$this->_updateActiveTab();
}