Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Hints for development of own Payment Methods
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi guys,

for german market we need to implement two new Payment Methods, one is an additional CC Method, the othner is debit advice.
Now iam looking for some concept and programming hints to implement following.

* Need new attributes for debit advice in Order-View, how to add new attributes to that
* Need new attribute for saving status of credit rating for customer, how could i add new attributes shown in backend
* General, how to add new attributes ex. for customer, order...

Debit advice needs new fields like account number [bank.], account owner, bank code, so this information should be saved within the order. I think i need new attributes for the order. As saied, how to create new attributes for order?

Iam really new to magento and try to use forum, wiki etc to get more information about architecture and working with magento, but most topics are about past versions of magento.

I tried to install NewPaymentMethod from tutorial but it doesnt apply in backend, maybe coz of new version of magento?

Please excuse my bad english, last lessons are 15 years ago rasberry! Understanding english is no problem, only writing correct sentences rasberry!

Btw! Magento is great, iam looking forward to RC1

KR from Stuttgart/Germany

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mark_Kimsal
Sr. Member
 
Total Posts:  186
Joined:  2007-09-12
Michigan, USA
 

http://www.magentocommerce.com/wiki/groups/174/custom_sized_products

you can use this to create new attributes for the order.

select @entity_type_id:=entity_type_id from eav_entity_type
where entity_type_code
='order_item';

insert into eav_attribute
    
(entity_type_idattribute_codebackend_typefrontend_input)
values (@entity_type_id'new_attribute''varchar''text');

Make a new helper to listen for events:

class Mage_MyModule_Helper_Event extends Mage_Core_Helper_Abstract
{
      
static function attachSpecialOrderAttribs($observer{
        $event 
$observer->getEvent();
        
$orderItem $event->getOrderItem();
        
$quoteItem $event->getItem();

        
$orderItem->setNewAttribute'get your value here );
      }
}

Add this XML to some module/etc/config.xml to turn on the events

<events>
          <
sales_convert_quote_item_to_order_item>
            <
observers>
              <
my_cart_checker>
                <
type>helper</type>
                <class>
Mage_SomeModule_Helper_Event</class>
                <
method>attachSpecialOrderAttribs</method>
              </
my_cart_checker>
            </
observers>
          </
sales_convert_quote_item_to_order_item>
        </
events>
 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

thanks for that and the link, ill start today…

KR

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top