0

In checkout (onestepcheckout) selecting payment method "Bank Transfer" Clicking "Place Order Now" then spinning and finally page is not reloading or doing anything to confirm the payment is done. In backend I can see order, amount and status "Pending" but If I click again on "Place Order Now" getting (obviously) error:

"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update
 a child row: a foreign key constraint fails`database_name`.`sales_flat_order`
, CONSTRAINT `FK_SALES_FLAT_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID`
 FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE S), query was: INSERT INTO `sales_flat_order` (`coupon_code`, 
`protect_code`, `shipping_description`, `is_virtual`, `store_id`, `customer_id`, `base_discount_amount`, `base_grand_total`, `base_shipping_amount`, `base_shipping_tax_amount`, `base_subtotal`, `base_tax_amount`, 
`base_to_global_rate`, `base_to_order_rate`, `discount_amount`, `grand_total`, `shipping_amount`, `shipping_tax_amount`, `store_to_base_rate`, 
`store_to_order_rate`, `subtotal`, `tax_amount`, `total_qty_ordered`, `customer_is_guest`, `customer_note_notify`, `customer_group_id`, `quote_id`, `base_shipping_discount_amount`, `base_subtotal_incl_tax`, 
`shipping_discount_amount`, `subtotal_incl_tax`, `weight`, `customer_dob`, `increment_id`, `applied_rule_ids`, `base_currency_code`, `customer_email`, `customer_firstname`, `customer_lastname`, `customer_middlename`, 
`customer_prefix`, `customer_suffix`, `customer_taxvat`, `discount_description`, `global_currency_code`, `order_currency_code`, `remote_ip`, `shipping_method`, `store_currency_code`, `store_name`, `x_forwarded_for`, `customer_note`, `created_at`, `updated_at`, 
`total_item_count`, `customer_gender`, `hidden_tax_amount`, `base_hidden_tax_amount`, `shipping_hidden_tax_amount`, 
`base_shipping_hidden_tax_amnt`, `shipping_incl_tax`, `base_shipping_incl_tax`, `gift_message_id`, `customer_credit_amount`, `base_customer_credit_amount`, `onestepcheckout_customercomment`, 
`onestepcheckout_customerfeedback`, `iosc_ddate`, `iosc_ddate_slot`, `iosc_dnote`) VALUES (... ?, ?, ?, ?, ?, '2017-06-20 11:20:30', '2017-06-20 11:20:30', ?, ?, ?, ?, ?... ?, "

Did anyone of you guys met this or similar problem ? Urgently need to solve it :(

1 Answer 1

1

In the first clic. When you say nothing is happening, have you check your JavaScript console?. Surely Magento is having an issue when is trying to catch the AJAX response.

6
  • It seems that the error appears if I click again then magento is sending empty query again. Somehow it won't go to success page once the payment is done. I hope you know what I mean :)
    – Rob D. A.
    Jun 20, 2017 at 12:59
  • Yes, but the "first" clic should work. I mean, to avoid the second clic and then the second insert.
    – Ricardo M
    Jun 20, 2017 at 13:05
  • Exactly, for some unknown reason transaction was made (checked in backend) but success page is not displayed, just checkout.
    – Rob D. A.
    Jun 20, 2017 at 13:13
  • Can't find anything in console, don't really know where to look at ...
    – Rob D. A.
    Jun 20, 2017 at 13:53
  • Searching internet I found that there is more like myself who have this issue. So there must be a solution.
    – Rob D. A.
    Jun 20, 2017 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.