Notice removed Draw attention by Stordon
    Bounty Ended with Roman Kabanov's answer chosen by Stordon
6 added 236 characters in body
| link

Helper method Method returns null when called from observer/ If statement not working

5 added 236 characters in body
source | link

UPDATED:

Ok, I just found out my first if in my method isn't working. This one:

if ($codigo == null) {
    # Stuff 
} else {
    #other stuff
} 

But I also don't know whats wrong.

PREVIOUS:

UPDATED:

Ok, I just found out my first if in my method isn't working. This one:

if ($codigo == null) {
    # Stuff 
} else {
    #other stuff
} 

But I also don't know whats wrong.

PREVIOUS:

    Notice added Draw attention by Stordon
    Bounty Started worth 50 reputation by Stordon
4 deleted 75 characters in body
source | link
public function stockUpdate(Varien_Event_Observer $observer)
{
    # Produto
    $event = $observer->getEvent()->getItem()->getProduct();

    if ($event->getAllnationsSync() == 1) {
        # Verifica qual o atributo que representa o ID da All Nations
        $control = Mage::getStoreConfig('allnations/general/id_allnations', Mage::app()->getStore());

        $id = $event->getData($control);
        Mage::helper('novapc_allnations')->updateStock($id);
    }
}
public function stockUpdate(Varien_Event_Observer $observer)
{
    # Produto
    $event = $observer->getEvent()->getItem()->getProduct();

    if ($event->getAllnationsSync() == 1) {
        # Verifica qual o atributo que representa o ID da All Nations
        $control = Mage::getStoreConfig('allnations/general/id_allnations', Mage::app()->getStore());

        $id = $event->getData($control);
        Mage::helper('novapc_allnations')->updateStock($id);
    }
}
public function stockUpdate(Varien_Event_Observer $observer)
{
    # Produto
    $event = $observer->getEvent()->getItem()->getProduct();

    if ($event->getAllnationsSync() == 1) {
        $control = Mage::getStoreConfig('allnations/general/id_allnations', Mage::app()->getStore());

        $id = $event->getData($control);
        Mage::helper('novapc_allnations')->updateStock($id);
    }
}
3 added 7271 characters in body
source | link
2 deleted 210 characters in body
source | link
1
source | link