Saving fields of new extension in Magento - magento

I am new in Magento and creating a custom extension. My module is not in Configuration tab under System. I have two fields in module and wanted to save these fields in db.
Kindly help me with this. Should I create a new table for this or simply save it to config table of Magento?

Related

add custom image field for custom options in magento

I am working on magento 1.9 version.I want to add a custom image field in drop down of custom options.
I added a text field using following guide
http://magento.ikantam.com/qa/how-add-custom-attributes-custom-options
which is working fine.but when I add a file field then it shows in admin but not save image field value in database.
please help me to solve this.
Neeraj,
Did you specifically click "flush cache storage" By following this guide and adding new tables directly to the database, Magento already has this record in cache. By flushing cache storage, you will allow magento to recognize the new structure and be able to save the record. I have accidentally forgotten to do this quite a few times and you end up with the inability to save a record even though your structure is there.

Any tutorial to create new product type in Magento with custom attributes?

We have an requirement to create custom product type in magento with custom attributes but not getting any good references for this??
Some of the references we followed:-
1.)http://blog.paulclegg.me/post/4183393562/magento-how-to-create-a-custom-product-type-the-bare
2.)http://blog.magestore.com/2014/02/03/add-custom-magento-product-type-magento-tutorial/
But it's not working at all.
Any references for same??
Please use the following URL:
http://inchoo.net/ecommerce/magento/how-to-create-a-new-product-type-in-magento/
They have created a module to create a new product type in Magento.

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.

How to add an extra field in magento admin panel to upload a pdf?

I'm new to magento. I need to give an option to upload the pdf in the add product page.
Just need to give the file upload option with extra field.
I'm using magento 1.7.
Thanks in advance.
There are two ways you can achieve this:
1. Easy one
Create a new product attribute, let's say product_pdf text field, and assign it to some group and attribute set. This field should now reflect in your admin's product page and allow you to save PDF name.
Then make a directory on your Magento (may be in media/pdf) and save all your PDFs if you have. If not, then each time you save the value in Product's custom attribute that we created (product_pdf), also upload the PDF manually at the location you created (media/pdf).
So whenever in frontend you want to show the PDF of product, you will always get the file name from product_pdf attribute and the location should be media/pdf.
2. Difficult/Lengthy one:
Create a file uploader in your Magento Admin's Manage Product screen. Here everything should be in your custom module, from creating a new field to uploading it.
I will not go far, but give you some place where you can exactly know how to go with it: http://www.magentocommerce.com/boards/viewthread/11667/P0/

how to insert data to db in magento

I created a new module following with this url:
In my module i created a registration form.
So now i want to insert the data entered into my registration form.
How is it possible?
Take a look at these instructions about models and database access:
http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-5-magento-models-and-orm-basics
This should get you up and running.
You need a custom db table with a custom model and collection of this table. There are lots of way but this is the magento way.
This link will help you http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table

Resources