Closed PericlesBogris closed 6 years ago
Hey, thanks for the report.
Mage_Esignature/observer
is, the alternative is to just add the prefix as a string in the class
node like Mage_Esignature_Observer
http://inchoo.net/magento/creating-an-eav-based-models-in-magento/If this doesn't help, tell us (by commenting). But please understand, that we don't earn any money with this module and there is no official support.
I managed to fixed this with your very helpful comment ! Thank you very much.
I am trying to get from the order lets say the VAT of the customer
<?php
class Esignature_Model_Observer
{
/**
* Add my super fancy stuff
*
* @param Varien_Event_Observer $observer observer object
*
* @return $this
*/
public function addFancyStuff(Varien_Event_Observer $observer)
{
$customer = Mage::getModel('customer/customer')->load($customerId);
$vatNumber = $customer->getData('taxvat');
$page = $observer->getPage();
$page->drawText($vatNumber, 10, 10, 'UTF-8');
return $this;
}
}
In this way nothing appears. I am doing it all wrong ?
Again thank you for helping me so fast
Check wether the vat id is on the customer or only on the order.
Oh no, where is the customerId from? You have an empty customer object.
Yeah i am doing it wrong... I need to pick the Vat (if it have one) , and the price of each product on the order but i cant find a way always crashes or if it creates the PDF its empty... Anyway thanks for helping !
You need to get the customer from the order, the order should be part of the observer.
I have followed the istructions here : https://github.com/firegento/firegento-pdf/wiki/FAQs
I Create my own module with the following files:
/app/etc/modules/Esignature.xml
/app/code/local/Mage/Esignature/etc/config.xml
/app/code/local/Mage/Esignature/Model/observer.php
Magento can see the module and its active. But when i print the invoice the custom text dont appear.
I tried to add on config.xml
as they say on this issue https://github.com/firegento/firegento-pdf/issues/109 but still didnt work
I use Magento 1.9.3
Any help ?