• Resolved canferman

    (@canferman)


    hi i am using wp 4.8.6 and i enabled WooCommerce Live Checkout Field Capture – Save Abandoned Carts.

    when i am testing this plugin (i am visiting my market page, i added a product to my cart, i visited cart page, i visited chekout page and filled all the inputs, i visited another pages also, and also i tried to left open chekout page and i tried close the testing browser etc.), there is no data in database (i looked at wp_captured_wc_fields table) and also there is no data in ….com/wp-admin/admin.php?page=wclcfc page.

    in my chekout page there is input with id #billing_email and other input as it’s supposed to be and my admin-ajax.php file is under ….com/wp-admin/admin-ajax.php

    how else can I test whether it works or not?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter canferman

    (@canferman)

    i forgot to write:

    when i looked with inspect element, on colsole there is an “…com/wp-admin/admin-ajax.php 500()” error

    and also, when i looked to my nginx error.log, there is an error about this:

    
    2018/05/05 12:07:16 [error] 27804#27804: *56049 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method WC_Cart::get_cart_contents() in /var/www/html/eski/wp-content/plugins/woo-save-abandoned-carts/public/class-woocommerce-live-checkout-field-capture-public.php:76
    
    Stack trace:
    #0 /var/www/html/eski/wp-includes/class-wp-hook.php(298): Woocommerce_Live_Checkout_Field_Capture_Public->save_user_data('')
    #1 /var/www/html/eski/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #2 /var/www/html/eski/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /var/www/html/eski/wp-admin/admin-ajax.php(101): do_action('wp_ajax_nopriv_...')
    #4 {main}
      thrown in /var/www/html/eski/wp-content/plugins/woo-save-abandoned-carts/public/class-woocommerce-live-checkout-field-capture-public.php on line 76" while reading response header from upstream, client: ***.***.***.**, server: e*****.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "eski.sevgilibebek.com", referrer: "https://e*****.com/market/chekout/"
    
    • This reply was modified 6 years, 10 months ago by canferman.

    Hi Canferman,

    Do you have a live link where I could take a look at your shop?
    It might be related to the fact that you are using an older WooCommerce version than supported.

    Thread Starter canferman

    (@canferman)

    i am changing line 76 of “class-woocommerce-live-checkout-field-capture-public.php”
    from
    $products = WC()->cart->get_cart_contents();
    to
    $products = WC()->cart->get_cart()->cart_contents;

    and it works correctly…

    but now, always dublicete data, i cant understand why dublicating…

    and thanks for your quick reply ??

    • This reply was modified 6 years, 10 months ago by canferman.
    Thread Starter canferman

    (@canferman)

    my woocommerce version is 3.1.0

    Thanks for additional information.
    I downloaded and setup WooCommerce 3.1.0 which looks kind of am old now and it does not have the method that saves get_cart_contents().
    I also tried out the changes you suggested but the Cart contents are simply not being captured.

    Would you mind telling which WooCommerce Live Checkout Field Capture – Save Abandoned Carts plugin version are you using since you mentioned that you are getting duplicate entries saved?

    Kind regards

    • This reply was modified 6 years, 10 months ago by prowebdesign.
    Thread Starter canferman

    (@canferman)

    sorry for my fault:

    i chaged related line to
    $products = WC()->cart->get_cart();

    i am using wlcfc ver 1.4.3

    and this is screenshot of captured data: https://prnt.sc/je2et8

    Yes, that is the correct method for that version.
    Hmm, can you take a look at your database table wp_captured_wc_fields and send me a screenshot of it as well?

    Thread Starter canferman

    (@canferman)

    Thanks for this. I can see that the Session_id column is empty and that means that either your browser is blocking sessions or there is something else missing in the puzzle. therefore the plugin does not recognize that the user has already been placed in the abandoned carts table and saves him again and again.

    I would suggest to try these solutions:
    1) Clear browser cache and restart it, maybe try different browsers and test to see if the sessions are being generated and saved in the database.
    2) If above fails, try debugging the sessions which are handled in the class-woocommerce-live-checkout-field-capture-public.php lines 137 – 140

    Let me know if anything of this works

    By the way, I altered the plugin code of the latest release and pushed the new code live.
    So if you will ever want to reinstall it, you will not have to worry about changing get_cart_contents() to get_cart()

    Thread Starter canferman

    (@canferman)

    thanks for your help

    i changed related line from:

    
    if ( $this->session_has_started() === false ){
    	session_start();
    	$session_id = session_id();
    }
    

    to:

    
    if ( $this->session_has_started() === false ){
    	session_start();
    }
    $session_id = session_id();
    

    and it works correctly with session_id.
    https://prntscr.com/je38jc

    If there is no oddity, I can use it like this.

    i will pruchase your plugin’s pro version in some days due to the effort you spend.

    thanks a lot again…

    Thanks, canferman, I really appreciate that ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘not captured’ is closed to new replies.