Forum Replies Created

Viewing 15 replies - 16 through 30 (of 96 total)
  • Thread Starter tom

    (@klickchoice)

    But this email is not to different person . Two emails with different content for one person .

    Thread Starter tom

    (@klickchoice)

    You are correct .

    Please tell how can i add order by Programmatically.

    How to use wc_create_order ?
    Because i am planing to create a new page for staff in which they can add customers order . Just putting the product id , product quantity , customer details etc . When they adding the order shipping charge need to calculate automatically . How to do this ? Is there any function to proceed this ?

    For example :

    Product id=1, qty=1
    customer detail
    first name: ddd
    last name :rr
    email : [email protected]
    phone :123456
    Address : addressxxxx
    state :statexxx
    paymentmethod: cash on delivery

    Please tell which function i need to use .
    I see the following code from stackoverfllow
    https://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically

    Please check this code is valid

    $address = array(
                'first_name' => 'Fresher',
                'last_name'  => 'StAcK OvErFloW',
                'company'    => 'stackoverflow',
                'email'      => '[email protected]',
                'phone'      => '777-777-777-777',
                'address_1'  => '31 Main Street',
                'address_2'  => '',
                'city'       => 'Chennai',
                'state'      => 'TN',
                'postcode'   => '12345',
                'country'    => 'IN'
            );
    
            $order = wc_create_order();
            $order->add_product( get_product( '12' ), 2 ); //(get_product with id and next is for quantity)
            $order->set_address( $address, 'billing' );
            $order->set_address( $address, 'shipping' );
            $order->add_coupon('Fresher','10','2'); // accepted param $couponcode, $couponamount,$coupon_tax
            $order->calculate_totals();
    Thread Starter tom

    (@klickchoice)

    I am going to select order from that particular date by downloading it from posts,post_meta,order_items,order_item_meta . After downloading each table individually with the selected data’s then i am going to insert this details to corresponding tables .

    Is that a good method ? Is that work ?

    Please advice .

    Thread Starter tom

    (@klickchoice)

    Is any one know the solution ,please reply .

    also when i check the database i can see that order is related in 4 tables

    wp_posts
    wp_postmeta
    wp_woocommerce_order_items
    wp_woocommerce_order_itemmeta

    Please reply anyone know the solution .

    Thread Starter tom

    (@klickchoice)

    Could you please tell the step by step instruction . I Created a new database and uploaded backup .

    I understand that order are saved in wp_posts, and post meta .

    So what i need to do ? , i export the all the order in that date from wp_posts,and post meta as sql file . Then just need to import it in to current database ? It make any problem ?

    Thread Starter tom

    (@klickchoice)

    But no progression in that discussion . I have the same problem .Could you please try to solve , instead of fighting here . Now it is my thread. I am not posting to anyone thread .

    the issue is

    (1)WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE ‘_transient_wpseo_sitemap_cache_shop_order_%’ OR option_name LIKE ‘_transient_timeout_wpseo_sitemap_cache_shop_order_%’ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Gateway_COD->process_payment, WC_Abstract_Order->update_status, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, wpseo_invalidate_sitemap_cache_on_save_post, wpseo_invalidate_sitemap_cache, WPSEO_Utils::clear_sitemap_cache

    (2)WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE ‘\\_transient\\_%1458652462’ ORDER BY option_id LIMIT 1000; made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Child-theme/template/template.php’), WC_Abstract_Order->update_status, wc_delete_shop_order_transients, WC_Cache_Helper::get_transient_version, WC_Cache_Helper::delete_version_transients)

    Thread Starter tom

    (@klickchoice)

    Ok No problem , i will correct my mistake . Sorry .

    Could you please solve this issue ?

    Thread Starter tom

    (@klickchoice)

    PHP message: WordPress databasefout Deadlock found when trying to get lock; try restarting transaction query DELETE FROM wp_options WHERE option_name LIKE ‘\_transient\_

    This is the main problem . And we understand that it is from your plugin .

    But friend this is very good plugin . Very useful and we love this . We just tell to solve the issue . Not trying to make angry .

    If you can or cannot solve the issue , any way this is very good & useful plugin . We love this plugin .

    Thread Starter tom

    (@klickchoice)

    So what is the meaning ? We have the same issue , that’s why posting on same thread . This is quiet natural . But instead of solving the issue you deleted the comment ,and you close the topic . You think this is a good practice ?

    Some time customers contributing each others to help to solve issue . If we know the solution then we will discuss the solution , or we cannot then we discuss the problem . So you are sure that every question regarding your plugin is solved by yourself ?

    No problem .

    Thread Starter tom

    (@klickchoice)

    Please see this issue

    PHP message: WordPress databasefout Deadlock found when trying to get lock; try restarting transaction query DELETE FROM wp_options WHERE option_name LIKE ‘\_transient\_

    tom

    (@klickchoice)

    Thread Starter tom

    (@klickchoice)

    Ok.

    Thread Starter tom

    (@klickchoice)

    i got the solution from this link

    https://stackoverflow.com/questions/13178585/contact-form-7-watermark-for-select-menu

    using

    first_as_label

    Thank you .

    Thread Starter tom

    (@klickchoice)

    Please reply .

    Thread Starter tom

    (@klickchoice)

    ok . Really thank you for this reply .

Viewing 15 replies - 16 through 30 (of 96 total)