Magento allows you to set five email addresses in the store admin:
General Contact
Sales Representative
Customer Support
Custom Email 1
Custom Email 2
What do I do if I want more?
You need to create a new module (or extends existing one in local code pool) and add a system.xml file.
Here's a quick example. Lets assume that you'd like to add 'Technical support' and 'HR department' email addresses. Your system.xml file would look like this:
<config>
<sections>
<trans_email>
<groups>
<ident_technical translate="label">
<label>Technical Support</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<email translate="label">
<label>Sender Email</label>
<frontend_type>text</frontend_type>
<backend_model>adminhtml/system_config_backend_email_address</backend_model>
<validate>validate-email</validate>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</email>
<name translate="label">
<label>Sender Name</label>
<frontend_type>text</frontend_type>
<backend_model>adminhtml/system_config_backend_email_sender</backend_model>
<validate>validate-emailSender</validate>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</name>
</fields>
</ident_technical>
<ident_hr translate="label">
<label>HR department</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<email translate="label">
<label>Sender Email</label>
<frontend_type>text</frontend_type>
<backend_model>adminhtml/system_config_backend_email_address</backend_model>
<validate>validate-email</validate>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</email>
<name translate="label">
<label>Sender Name</label>
<frontend_type>text</frontend_type>
<backend_model>adminhtml/system_config_backend_email_sender</backend_model>
<validate>validate-emailSender</validate>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</name>
</fields>
</ident_hr>
</groups>
</trans_email>
</sections>
</config>
In your code you can get e.g. Technical support data by
Mage::getStoreConfig('trans_email/ident_technical/email');
I found a blog on this. Maybe this is useful
http://www.excellencemagentoblog.com/magento-sending-custom-emails
You can create a new module and create an adminhtml folder in the etc folder. Here, create a system.xml and add the following code:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="trans_email" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
<tab>general</tab>
<group id="ident_custom3" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Custom Email 3</label>
<field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Sender Email</label>
<validate>validate-email</validate>
<backend_model>Magento\Config\Model\Config\Backend\Email\Address</backend_model>
</field>
<field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Sender Name</label>
<backend_model>Magento\Config\Model\Config\Backend\Email\Sender</backend_model>
<validate>validate-emailSender</validate>
</field>
</group>
</section>
</system>
</config>
This will add a Custom Email 3 section at Stores ->Configurations ->General ->Store Email Addresses.
Related
I'm creating a Magento 1.9 module, and have so far defined settings(which work), then I went onto adding default values for my settings fields. Now, I was wondering, is it at all possible to have a value in config that's going to be linked to some other value? As in, I want to add default setting for the field where value will be Site name or site description.
Create system.xml and use the below example code:
<?xml version="1.0"?>
<config>
<sections>
<folder translate="label" module="modulename">
<groups>
<site_details>
<label>Website discription</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<name translate="label">
<label>Site name</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</name>
<description>
<label>description</label>
<comment><![CDATA[description]]></comment>
<frontend_type>textarea</frontend_type>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</description>
</fields>
</site_details>
</groups>
</floder>
</sections>
</config>
I have created a custom configuration tab in back end under system configuration. I am getting 404 page when i click on my tab link.
My system.xml file:
<?xml version="1.0"?>
<config>
<tabs>
<instagram translate="label" module="instagram">
<label>Instagram Extensions</label>
<sort_order>100</sort_order>
</instagram>
</tabs>
<sections>
<instagram translate="label" module="instagram">
<label>Instagram Options</label>
<tab>instagram</tab>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<instagram_group translate="label" module="instagram">
<label>My Extension Options</label>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</instagram_group>
</groups>
</instagram>
</sections>
</config>
Can anyone tell me the mistake i have done??
Thanks in advance.
have a look on these blogs.create-configuration-for-your-magento-extension
custom_magento_system_configuration
According to your code you might miss the ACL implementation.
I've created my system.xml under app/code/local/[Namespace]/[Module]/etc directory but it doesn't seem to work.
I understand that the same name given to the tab must be the one I place in the tab tag of the section, and I already have my acl configuration in my config.xml file too.
Can some one help me with this?
<config>
<tabs>
<minimum translate="label" module="minimum">
<label>Ari Modules</label>
<sort_order>10</sort_order>
</minimum>
</tabs>
<sections>
<minimum translate="label" module="minimum">
<label>Minimum Shop Amount</label>
<tab>minimum</tab>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<shown_in_default>1</shown_in_default>
<shown_in_website>1</shown_in_website>
<shown_in_store>1</shown_in_store>
<groups>
<general translate="label" module="minimum">
<label>Configuration</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<yes_no_active translate="label">
<label>Active</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>00</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</yes_no_active>
<minimum_amount translate="label">
<label>Minimum shopping amount</label>
<frontend_type>text</frontend_type>
<sort_order>01</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</minimum_amount>
<minimum_message translate="label">
<label>Message to show if the minimum shopping amount is not met</label>
<frontend_type>textarea</frontend_type>
<sort_order>02</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</minimum_message>
</fields>
</general>
</groups>
</minimum>
</sections>
This is my config.xml
<config>
<modules>
<Ari_Minimum>
<version>0.1.0</version>
</Ari_Minimum>
</modules>
<global>
<models>
<minimum>
<class>Ari_Minimum_Model</class>
</minimum>
</models>
<helpers>
<minimum>
<class>Ari_Minimum_Helper</class>
</minimum>
</helpers>
</global>
<default>
<ari>
<general>
<yes_no_active>0</yes_no_active>
<minimum_amount>1500</minimum_amount>
<minimum_message><![CDATA[The minimum shopping amount is %s euros]]></minimum_message>
</general>
</ari>
</default>
<frontend>
<events>
<sales_quote_save_after>
<observers>
<ari_minimum_verifyminimum>
<type>singleton</type>
<class>Ari_Minimum_Model_Observer</class>
<method>verifyMinimum</method>
</ari_minimum_verifyminimum>
</observers>
</sales_quote_save_after>
</events>
</frontend>
<?xml version="1.0" encoding="UTF-8"?>
<config>
<tabs>
<ari translate="label" module="minimum">
<label>Ari Modules</label>
<sort_order>10</sort_order>
</ari>
</tabs>
<sections>
<minimum translate="label" module="minimum">
<label>Minimum Shop Amount</label>
<tab>ari</tab>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<general translate="label" module="minimum">
<label>Configuration</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<yes_no_active translate="label">
<label>Active</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</yes_no_active>
<minimum_amount translate="label">
<label>Minimum shopping amount</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</minimum_amount>
<minimum_message translate="label">
<label>Message to show if the minimum shopping amount is not met</label>
<frontend_type>textarea</frontend_type>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</minimum_message>
</fields>
</general>
</groups>
</minimum>
</sections>
Then create a file called adminhtml.xml on your module's etc/ folder
<config>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<minimum translate="title" module="minimum">
<title>Ari Minimum</title>
<sort_order>999</sort_order>
</minimum>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
Log out and in , delete your cache storage and try it, you wrote shown_in_* instead of show_in_*
Also, on config .xml, use this instead
<default>
<minimum>
<general>
<yes_no_active>0</yes_no_active>
<minimum_amount>1500</minimum_amount>
<minimum_message><![CDATA[The minimum shopping amount is %s euros]]></minimum_message>
</general>
</minimum>
</default>
Hope this helps
I am trying to add multiple section under same tab in magento admin panel. I added this in system.xml file. It works fine for one section but when i add another it display the section but after click it throw 404 not fount error.
I am using the below code :
<tabs>
<mss translate="label" module="sqlite">
<label>Mss Extensions</label>
<sort_order>100</sort_order>
</mss>
</tabs>
<sections>
<mss translate="label" module="sqlite">
<label>Auto Indexing</label>
<tab>mss</tab>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<mss_group translate="label" module="sqlite">
<label>Indexing Options</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<mss_input translate="label">
<label>Auto Products</label>
<frontend_type>select</frontend_type>
<sort_order>90</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<source_model>adminhtml/system_config_source_yesno</source_model>
</mss_input>
</fields>
</mss_group>
</groups>
</mss>
</sections>
<sections
<sqlite translate="label" module="sqlite">
<label>Auto Indexing</label>
<tab>mss</tab>
<sort_order>100</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<sqlite_group translate="label" module="sqlite">
<label>Sqlite Process</label>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<sqlite_input translate="label">
<label>Sqlite Product</label>
<frontend_type>select</frontend_type>
<sort_order>90</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<source_model>adminhtml/system_config_source_yesno</source_model>
</sqlite_input>
</fields>
</sqlite_group>
</groups>
</sqlite>
</sections>
1 ) This is my mss section this works fine
2) This is section which i am trying to with name sqlite (when i click on this section this throws 404 error)
Please help me how to add new section in tab or where i am doing wrong.
Please change adminhtml.xml file in your module as shown below :
<?xml version="1.0"?>
<config>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<mss translate="title" module="sqlite">
<title>Auto Indexing</title>
<sort_order>0</sort_order>
</mss>
<sqlite translate="title" module="sqlite">
<title>Auto Indexing</title>
<sort_order>1</sort_order>
</sqlite>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</config>
And then clear your magento cache and session.
Please check your modules config.xml. In it check if this section exists if not add it
<adminhtml>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<mss>
<title>Mss - All</title>
</mss>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
This should solve 404 error.
I have included Payment method module on my website.That payment method is visible in Admin Configurations but not on frontend on Payment Step.
I have a config file named config.xml whose code is
<?xml version="1.0"?>
<config>
<modules>
<Goodahead_Santander>
<version>1.0.0</version>
</Goodahead_Santander>
</modules>
<global>
<models>
<goodahead_santander>
<class>Goodahead_Santander_Model</class>
<resourceModel>goodahead_santander_resource</resourceModel>
</goodahead_santander>
<goodahead_santander_resource>
<class>Goodahead_Santander_Model_Resource</class>
<entities>
<finance_id>
<table>goodahead_santander_finance_id</table>
</finance_id>
</entities>
</goodahead_santander_resource>
</models>
<resources>
<goodahead_santander_setup>
<setup>
<module>Goodahead_Santander</module>
<class>Mage_Eav_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</goodahead_santander_setup>
<goodahead_santander_write>
<use>core_write</use>
</goodahead_santander_write>
<goodahead_santander_read>
<use>core_read</use>
</goodahead_santander_read>
</resources>
<blocks>
<goodahead_santander>
<class>Goodahead_Santander_Block</class>
</goodahead_santander>
</blocks>
<helpers>
<goodahead_santander>
<class>Goodahead_Santander_Helper</class>
</goodahead_santander>
</helpers>
</global>
<frontend>
<layout>
<updates>
<goodahead_santander>
<file>goodahead/santander.xml</file>
</goodahead_santander>
</updates>
</layout>
<events>
<controller_action_predispatch_checkout_cart_index>
<observers>
<goodahead_messages_postdispatch_checkout_cart_add>
<class>goodahead_messages/observer</class>
<method>addIsInCart</method>
</goodahead_messages_postdispatch_checkout_cart_add>
</observers>
</controller_action_predispatch_checkout_cart_index>
<controller_action_predispatch_checkout_onepage_savePayment>
<observers>
<goodahead_santander_controller_action_predispatch_savePayment>
<class>goodahead_santander/observer</class>
<method>onSavePaymentMethod</method>
</goodahead_santander_controller_action_predispatch_savePayment>
</observers>
</controller_action_predispatch_checkout_onepage_savePayment>
<checkout_submit_all_after>
<observers>
<goodahead_santander_checkout_submit_all_after>
<class>goodahead_santander/observer</class>
<method>sendOrderEmail</method>
</goodahead_santander_checkout_submit_all_after>
</observers>
</checkout_submit_all_after>
</events>
</frontend>
<default>
<payment>
<santander>
<active>1</active>
<model>goodahead_santander/Finanzierung</model>
<order_status>1</order_status>
<title>Finanzierung</title>
<allowspecific>0</allowspecific>
<form_block_type>0</form_block_type>
<payment_action>authorize</payment_action>
<show_bank_accounts_in_pdf>1</show_bank_accounts_in_pdf>
<show_customtext_in_pdf>1</show_customtext_in_pdf>
</santander>
</payment>
</default>
</config>
and system.xml is
<?xml version="1.0"?>
<config>
<sections>
<payment>
<groups>
<santander translate="label" module="goodahead_santander">
<label>Finanzierung</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<active translate="label">
<label>Enabled</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</active>
<title translate="label">
<label>Title</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</title>
<vendornumber translate="label">
<label>Vendor number</label>
<frontend_type>text</frontend_type>
<sort_order>21</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Your account number</comment>
</vendornumber>
<vendorpassword translate="label">
<label>Vendor password</label>
<frontend_type>password</frontend_type>
<sort_order>22</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Your account password</comment>
</vendorpassword>
<endpoint translate="label">
<label>WSDL endpoint</label>
<frontend_type>text</frontend_type>
<sort_order>23</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>WSDL endpoint URL (Given by bank)</comment>
</endpoint>
<url translate="label">
<label>Financing URL</label>
<frontend_type>text</frontend_type>
<sort_order>24</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Financing URL (Given by bank)</comment>
</url>
<order_status translate="label">
<label>New order status</label>
<frontend_type>select</frontend_type>
<source_model>goodahead_santander/source_order_status</source_model>
<sort_order>40</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</order_status>
<sort_order translate="label">
<label>Sort order</label>
<frontend_type>text</frontend_type>
<sort_order>50</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</sort_order>
<allowspecific translate="label">
<label>Payment from applicable countries</label>
<frontend_type>allowspecific</frontend_type>
<sort_order>60</sort_order>
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</allowspecific>
<specificcountry translate="label">
<label>Payment from Specific countries</label>
<frontend_type>multiselect</frontend_type>
<sort_order>70</sort_order>
<source_model>adminhtml/system_config_source_country</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</specificcountry>
<min_order_total>
<label>Minimum Order Total</label>
<frontend_type>text</frontend_type>
<sort_order>71</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</min_order_total>
<max_order_total>
<label>Maximum Order Total</label>
<frontend_type>text</frontend_type>
<sort_order>72</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</max_order_total>
</fields>
</santander>
</groups>
</payment>
</sections>
<!-- FINANCING CALCULATOR -->
<tabs>
<goodahead translate="label" module="goodahead_santander">
<label>Goodahead</label>
<sort_order>300</sort_order>
</goodahead>
</tabs>
<sections>
<goodahead_calculator translate="label">
<label>Financing Calculator</label>
<tab>goodahead</tab>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<rates translate="label">
<label>Rates</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<cms_page translate="label">
<label>CMS page:</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Enter CMS page url key</comment>
</cms_page>
<shipping translate="label">
<label>Shipping cost:</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Shipping cost included to calculation</comment>
</shipping>
<rates translate="label">
<label>Months and Rates:</label>
<frontend_type>text</frontend_type>
<frontend_model>goodahead_santander/adminhtml_rates</frontend_model>
<backend_model>adminhtml/system_config_backend_serialized</backend_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</rates>
</fields>
</rates>
</groups>
</goodahead_calculator>
</sections>
</config>
and model file named Finanzierung.php is
<?php
class Goodahead_Santander_Model_Finanzierung extends Mage_Payment_Model_Method_Abstract
{
protected $_code = 'santander';
// protected $_canAuthorize = true;
protected $_formBlockType = 'goodahead_santander/form';
protected $_infoBlockType = 'goodahead_santander/info';
/**
* SoapClient object
* #var SoapClient
*/
protected $_soapClient;
/**
* WSDL endpoint url
* #var string
*/
protected $_endpoint;
/**
* Parameters for SOAP request
* #var array
*/
protected $_params;
/**
* #see Mage_Payment_Model_Method_Abstract::isAvailable()
*/
public function isAvailable($quote = null)
{
if (!$this->getEndpoint()
|| !$this->_getVendorNumber()
|| !$this->_getVendorPassword()
|| !$this->getConfigData('url')
) {
return false;
}
return parent::isAvailable($quote);
}
}
?>
and layout design file is
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<checkout_onepage_index>
<reference name="head">
<action method="addJs"><script>goodahead/santander/calculator.js</script></action>
</reference>
</checkout_onepage_index>
<santander_redirect_index>
<reference name="content">
<block type="goodahead_santander/redirect" name="redirect" as="redirect" template="goodahead/santander/redirect.phtml" />
</reference>
</santander_redirect_index>
<checkout_cart_index>
<reference name="head">
<action method="addJs"><script>goodahead/santander/calculator.js</script></action>
</reference>
<reference name="checkout.cart">
<block type="goodahead_santander/calculator" name="goodahead.santander.calculator" as="calculator" template="goodahead/santander/calculator.phtml"/>
</reference>
</checkout_cart_index>
</layout>
Please help.
<?php
class Goodahead_Santander_Model_Finanzierung extends Mage_Payment_Model_Method_Abstract
{
protected $_code = 'santander';
protected $_canUseInternal = true;
protected $_canUseCheckout = true;
}
?>
Please refer above sample code
$_canUseInternal = true; //this means you have to used payment in admin
$_canUseInternal = true; // this means you have to used payment in checkout