manageAction();
}
public function manageAction()
{
$config = Mage::getSingleton('pap/config');
if (!$config->IsConfigured())
{
$this->doConfigNotice('pap/adminhtml_pap/manage');
return;
}
$this->loadLayout()
->_setActiveMenu('pap/adminhtml_pap/manage')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Manage Affiliate Orders'), Mage::helper('adminhtml')->__('Manage Affiliate Orders'));
$this->_addContent(
$this->getLayout()->createBlock('pap/adminhtml_pap')
);
$this->renderLayout();
}
public function checkconfigAction()
{
$config = Mage::getSingleton('pap/config');
if (!$config->IsConfigured())
{
$this->doConfigNotice('pap/adminhtml_pap/checkconfig');
return;
}
$this->loadLayout()
->_setActiveMenu('pap/adminhtml_pap/checkconfig')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Affiliate Module Configured'), Mage::helper('adminhtml')->__('Affiliate Module Configured'));
// TODO: It would be better to put this markup in a separate block of our own.
ob_start();
?>
Post Affiliate Pro Connector is Configured
The Post Affiliate Pro Connector is ready for use.
getLayout()->createBlock('core/text');
$textblock->addText($text);
$this->_addContent(
$textblock
);
$this->renderLayout();
}
// notice displayed when this hasn't been configured yet.
public function doConfigNotice($menu)
{
$this->loadLayout()
->_setActiveMenu($menu)
->_addBreadcrumb(Mage::helper('adminhtml')->__('Affiliate Module Not Configured'), Mage::helper('adminhtml')->__('Affiliate Module Not Configured'));
// TODO: It would be better to put this markup in a separate block of our own.
// declare the URLs that we will use
$getpapurl = "http://www.priacta.com/code/magento-affiliate/pap.php";
$papinfourl = "http://www.priacta.com/code/magento-affiliate/papinfo.php";
$getpaphostedurl = "http://www.priacta.com/code/magento-affiliate/paphosted.php";
$getpaplicenseurl = "http://www.priacta.com/code/magento-affiliate/paplicense.php";
$papbannerurl = $getpapurl;
$papinstallurl = "http://www.priacta.com/code/magento-affiliate/papinstall.php";
$readNode = Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName');
$customadmin = (string)$readNode;
if (!$customadmin)
{
$customadmin = "admin";
}
$configurl = Mage::getModel('adminhtml/url')->getUrl($customadmin.'/system_config/edit/section/pap_config/');
// Because of the new secret key # in 1.3.0 we MUST use the line above for the URL, however,
// this returns a BROKEN URL with the "admin" portion stripped. We have to correct this.
$configurl = preg_replace("~(/)(/system_config/edit/section/pap_config.*)~", "\\1".$customadmin."\\2", $configurl);
ob_start();
?>
Setting Up Post Affiliate Pro
The Post Affiliate Pro Connector is not ready yet. It has been installed, but not configured.
If you don't have it already, you'll need a license for Post Affiliate Pro.
This isn't free, but it's cheap, and worth it. Quality Unit (the company that sells PAP) currently has
two different licensing options:
Month to month - Hosted Plans currently start as low as $19/mo, with no extra surcharge per commission.
One Time Purchase - Licenses currently start as low as a $119, one time fee. You get source code, and install PAP on your own server, alongside Magento.
Don't be fooled by the low price. This is high quality software, and the feature puts everyone else to shame.