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

Adding a new field of payment [almost solved]
 
Jonathan Moratelli
Member
 
Total Posts:  35
Joined:  2008-10-30
 

Hi all!!!

I’ve created a new payment method, this method receive a value entered by user.

I’ve created manually fields in database:

INSERT INTO `eav_attribute` (`attribute_id`, `entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_global`, `is_visible`, `is_required`, `is_user_defined`, `default_value`, `is_searchable`, `is_filterable`, `is_comparable`, `is_visible_on_front`, `is_html_allowed_on_front`, `is_unique`, `is_configurable`, `apply_to`, `position`, `note`, `is_visible_in_advanced_search`, `is_used_for_price_rules`, `is_filterable_in_search`) VALUES()
(
50114'clientetv_trocopara'NULLNULL'decimal'NULLNULL'text''Troco Para'NULLNULL1101NULL0001001'0'0''000),
(
50210'clientetv_trocopara'NULLNULL'decimal'NULLNULL'text''Troco Para'NULLNULL1101NULL0001001'0'0''000);

ALTER TABLE `sales_flat_quote_paymentCHANGE `clientetv_trocopara` `clientetv_trocoparaVARCHAR255 CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

I monitore the commands executed by Magento when a sale is made by native module for credit card:

INSERT INTO `sales_order_entity_varchar` (`entity_id`, `entity_type_id`, `attribute_id`, `value`) VALUES ('384''14''277''Gg9MliM8lsCHkoE8BWd7sQ==')
UPDATE `sales_flat_quote_paymentSET `payment_id` = '126', `quote_id` = '86', `created_at` = '2009-03-06 20:54:24', `updated_at` = '2009-03-06 20:57:30', `method` = 'ccsave', `cc_type` = 'VI', `cc_number_enc` = 'Gg9MliM8lsCHkoE8BWd7sQ==', `cc_last4` = '8247', `cc_cid_enc` = '', `cc_owner` = 'abcdob', `cc_exp_month` = '12', `cc_exp_year` = '2011', `cc_ss_owner` = '', `cc_ss_start_month` = '0', `cc_ss_start_year` = '0', `cybersource_token` = '', `paypal_correlation_id` = '', `paypal_payer_id` = '', `paypal_payer_status` = '', `po_number` = '', `parent_id` = '86', `additional_data` = NULL, `cc_ss_issue` = NULL, `clientetv_trocopara` = NULL WHERE (payment_id='126')

And I monitore the commands of my module, in my case the SQL of the order was not executed:

UPDATE `sales_flat_quote_paymentSET `payment_id` = '127', `quote_id` = '87', `created_at` = '2009-03-06 20:59:41', `updated_at` = '2009-03-06 21:00:11', `method` = 'pgtotv', `cc_type` = '', `cc_number_enc` = '', `cc_last4` = '', `cc_cid_enc` = '', `cc_owner` = '', `cc_exp_month` = '0', `cc_exp_year` = '0', `cc_ss_owner` = '', `cc_ss_start_month` = '0', `cc_ss_start_year` = '0', `cybersource_token` = '', `paypal_correlation_id` = '', `paypal_payer_id` = '', `paypal_payer_status` = '', `po_number` = '', `parent_id` = '87', `additional_data` = NULL, `cc_ss_issue` = NULL, `clientetv_trocopara` = '77777777777' WHERE (payment_id='127')

I must have forgotten to create a field.

Does anyone know what field?

Or help me otherwise?

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