what's the event name when you create a new invoice in magento? - magento

when you create an invoice in the admin panel, what is the name of that event for an observer? I've tried *sales_order_invoice_register* and *sales_order_invoice_pay* but it doesn't work.

For Magento >= 1.4 there are a couple of options - the best choice would be the event which you've listed, sales_order_invoice_register.
Because the invoice model sets the _eventPrefix property to sales_order_invoice, you can observe sales_order_invoice_save_after.
Make sure that you are using the correct event configuration area: adminhtml vs frontend vs global.

Related

Magento drop down to be selected by buyer

I am new to Magento. The website I am working on sells contact lenses and some custom attributes need to be added on the product page. Now requirement states that user has to select some prescription values from drop-down fields before adding the product to cart. I am totally lost on how to do it. This question asks the same thing:
Fields to be filled by the buyer in magento product page
But the answer points to dead link. How to retrieve some custom information from user on product page and store it along with order?
This is possible with custom option. Magento provide custom option facility. when you create custom option then it displayed on product page and you will get information from customer and that information stored in order automatically.
reference link : https://www.youtube.com/watch?v=wfZCXjWqrSM
You can create Dynamic custom option. I have answered thw whole process here:
dynamically add product custom options magento
As the Custom option applicaple to particular category. so you need to add required conditionon on precription form on product detail page.
You can manage this using custom option and there is a great module available in magento connect to achieve your goal.
http://www.magentocommerce.com/magento-connect/custom-option-manger.html

change system table information (newsletter_subscriber)

I am developing website in Magento in which i have used default newsletter feature provided by Magento.
But i want to customize default feature provided by Magento.
customizations i want to do
Change the default table name to "emails"
add fields to the table(found way to do this, but don't know if it's possible after changing table name)
Is this possible to do this customizations?
If it's possible, then how i can do this ?
Changing the default new letter email structure can be done with changing the format of newsletter in your themes locale folder or creating a new newsletter template in admin panel and assigning it throught the configuration menu.
Suppose you want to change the template of unsubscribe of newsletter, In admin panel, we have the option of creating a newsletter template by system/transaction emails. Here you can create a new template. After creating the template as required, In system/configuration, customers/newsletters, Here if we select the tetbox of unsubscription email sender dropdown, You can see your newly created newsletter template. Then save page. I hope it helps u.

Customize Newsletter Template?

i am using Magento 1.5.1.0. I Have already changed all transaction E-Mails in my Magento Project. But i have one last Problem. I have not found a way to change the newsletter Template? Is there a way to change the used template like the other transaction E-Mails?
Regards,
Bertie
I have 1.7 but i think the menu is the same
If i understand your question, in your admin dashboard you should look under System > Transactional Emails > Add new template. From the options field (labeled Template) choose Newsletter ... (there are three templates), load each of them and change them.
Also for the actual newsletter, from admin dashboard chose Newsletter > Newsletter Templates and add a new email.

Magento CE 1.6.2 - how to make customer attribute read-only?

I've successfully added a new customer attribute (accountnumber), but I need to make this field read-only in the backend (it's populated from ERP software and needs to be visible but not editable through the Magento Admin Panel).
I've used an observer with the lockAttribute method to make catalog attributes (category/product) read-only in the Admin Panel, but there doesn't appear to be a corresponding method for customer attributes.
What's the best way to accomplish this?
You can set the frontend_input property as label
So it will be read-only in customer edit form.

Automatically generating Customer Attribute Form Fields

When you add customer attributes, Magento's admin dashboard for customer's automatically generates the relative form element for that new attribute.
Is there a way to do the same thing on the front end via a controller in a module?
nope, the frontend customer fields are hard coded, check out the phtml inside customer/form to see it.
What are you trying to achieve? Customer attributes are displayed on the form if "Show on frontend" is enabled. However those fields aren't saved from frontend by default. You need to extend fieldsets in your module for that, see config.xml in core Mage/Customer module
EDIT: actually that is true for enterprise edition, on CE you have to edit register.phtml (preferably by making a copy in your theme)

Resources