Categories
CMS Magento Mastering Development

Customer and Orders empty after migration 1.9.2.1 to 2.3.5-p1

Im trying to migrate data from 1.9.2.1 to 2.3.5-p1 with the data migration tools but my table customer and orders remain empty … The errors (who became warning with -a) are : [2020-06-30 06:11:28][WARNING]: Source fields are not mapped. Document: customer_eav_attribute. Fields: is_filterable_in_search,used_in_product_listing,store_ids,sorting_order,is_visible_on_front,type_internal,on_order_view,on_registration,is_read_only,used_in_order_grid,file_size,file_types,file_dimentions,account_filled,billing_filled,required_on_front [2020-06-30 06:11:28][WARNING]: Incompatibility in data. Source document: eav_attribute. Field: frontend_input. Error: Attribute […]

Categories
Database Development

How to calculate running balance for many accounts?

please help me fix query below to calculate running balance correctly. What I need to do is: Calculate running balance (debit- credit) by account_no Reset the balance when account_no changes Reset the balance if transaction_date is in a new financial period AND account_type > 5 SELECT acc_account_transactions.id, account_no, account_type, transaction_id, DATE_FORMAT(acc_transactions.transaction_date, “%d/%m/%Y”) transaction_date, debit_balance, credit_balance […]

Categories
Database Development

Why does sql query variable break when using LEFT JOIN? (DBFiddle)

as in this fiddle I’m trying to execute this to calculate running balance for accounts, and reset it between rows when account number changes/financial period changes (for account_type > 5). But my problem is that variable “curr_account_no” gets a wrong value and breaks the running_balance variable when I use LEFT JOIN on financial_periods table (account_no […]

Categories
CMS Mastering Development Wordpress

Woocommerce API usage to create an order

hey guys i need help on creating an order via API. i use postman for the POST api. So I include all datas like total, status, customer_id, line itemes etc. But it dont accept what i filled it just send an order with empty product. this is my code: const data = { “id”: 1441, […]

Categories
CMS Mastering Development Wordpress

Add custom script in woocommerce refund hook

I’m trying to execute a tracking script every time a refund gets processed in woocommerce but for some reason it’s not working. add_action( ‘woocommerce_order_refunded’, ‘custom_order_refunded’, 10, 2 ); function custom_order_refunded( $order_id, $refund_id ) { if ( $order_id > 0 ) { $order = wc_get_order( $order_id ); $order_number = $order->get_id();?> <script> gtag(‘event’, ‘refund’, { “transaction_id”: <?php […]

Categories
Development MySQL SQL

Cannot add or update a child row: a foreign key constraint fails hibernate with mysql

I’m new to hibernate and trying to run a sample program. But when I run the program it throws error as Cannot add or update a child row: a foreign key constraint fails (tel.customer, CONSTRAINT customer_ibfk_1 FOREIGN KEY (transaction_id) REFERENCES transaction (id)). I’m using annotation for mapping entity class. MySQL script create table transaction ( […]

Categories
Development

Summing a transaction chain in a dataframe, rows linked by column values

I’m trying to link multiple rows from a DataFrame in order to get all possible paths formed by connecting receiver ids to sender ids. Here is an example of my DataFrame: transaction_id sender_id receiver_id amount 0 213234 002 125 10 1 223322 017 354 90 2 343443 125 689 70 3 324433 689 233 5 […]

Categories
Database Development

My Java object constructor returning “null” and it register in the database

I have created a class that has constructors for various Activity. However, when I try and subscribe to the object so as to order a product, I receive “null” as the output.but it register in the database how to solve it? I have actually posted something similar to this and got a solution but this […]

Categories
Development

My Java object constructor returning “null” and very confusing

I have created a class that has constructors for various Activity. However, when I try and subscribe to the object so as to order a product, I receive “null” as the output. how to solve it? I have actually posted something similar to this and got a solution but this is kinda perfect to give […]

Categories
Development

Oracle 19c Trigger INSTEAD OF on View; CHAR and VARCHAR2 fields wont bind PLS-00049: bad bind variable ‘NEW.component’

I’m trying to work over views to insert into different tables depending on the contents to be inserted; in the following example it’s using date to insert into different tables using an instead of trigger. The problem i have is that it just will not bind. I’ve tried using dynamic sql in EXECUTE IMMEDIATE statements […]