Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Created April 3, 2013 23:34
Show Gist options
  • Save amacgregor/5306447 to your computer and use it in GitHub Desktop.
Save amacgregor/5306447 to your computer and use it in GitHub Desktop.
getCustomerRegistryCollection function added to the blokc
<?php
class Mdg_Giftregistry_Block_Add extends Mage_Core_Block_Template
{
public function getCustomerRegistryCollection()
{
$customer = Mage::getSingleton('customer/session')->getCustomer();
if ($customer) {
$collection = Mage::getModel('mdg_giftregistry/entity')->getCollection()
->addFieldToFilter('customer_id', $customer->getId());
return $collection;
} else {
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment