Class Wcap_Cart_Updated
It will capture the logged-in and visitor and guest users cart.
Author: Tyche Softwares
Located at includes/frontend/wcap_cart_updated.php
Methods summary
public static
|
|
public static
|
|
public static
|
#
wcap_insert_new_entry_of_loggedin_user( integer $user_id, string $current_user_lang, string $loggedin_user_ip_address, array $results )
It will insert the new logged-in users cart into the database. It will insert the data immediatly after user add the product to the cart. If user has recovered last cart then it will create the new record for the user. |
public static
|
#
wcap_capture_cart_after_cutoff_loggedin_user( integer $user_id, string $results, string $current_user_lang, array $loggedin_user_ip_address )
It will capture the logged-in users cart after the cutoff time has been passed. It will update the old cart of the user and insert new entry in database. |
public static
|
#
wcap_cart_capture_under_cart_cutoff_loggedin( integer $user_id, string $results, string $current_user_lang, array $loggedin_user_ip_address )
It will update the logged-in users cart under the cutoff time. |
public static
|
|
public static
|
#
wcap_capture_visitors_cart( timestamp $compare_time, json_encode $updated_cart_info, string $current_user_lang, string $visitor_user_ip_address, string $wcap_guest_cart_key )
It will captures the visitors cart from the cart page. |
public static
|
#
wcap_capture_new_visitor_cart( json_encode $cart_info, string $current_user_lang, string $visitor_user_ip_address, string $wcap_guest_cart_key )
It will insert the visitors cart to the database. |
public static
|
#
wcap_capture_after_cutofftime_visitor_cart( json_encode $results, string $current_user_lang, string $visitor_user_ip_address, string $updated_cart_info, array $wcap_guest_cart_key )
It will capture the visitors cart after cutoff time has been reached. It will update the old cart and insert the new data in the database. |
public static
|
#
wcap_capture_within_cutofftime_visitor_cart( json_encode $results, string $current_user_lang, string $visitor_user_ip_address, string $updated_cart_info, array $wcap_guest_cart_key )
It will capture the visitors cart within cutoff time and it will update the cart in the database. |
public static
|
#
wcap_update_guest_cart_after_cutoff_time( integer $user_id, json_encode $updated_cart_info, string $current_user_lang, string $guest_user_ip_address )
It will capture the guest cart after cutoff time has been reached. It will update the old cart and insert the new data in the database. |
public static
|
#
wcap_update_guest_cart_within_cutoff_time( integer $user_id, json_encode $updated_cart_info, string $guest_user_ip_address, string $abandoned_cart_id )
It will update the guest cart withing cutoff time. |
public static
true
|
#
wcap_compare_all_users_carts( json_encode $new_cart, json_encode $last_abandoned_cart )
It will compare old and new cart for the logged-in, visitors & guest users. |
public static
array
|
#
wcap_array_diff_recursive( $array1, $array2 )
It will compare cart values. As we have the recursive array, we need to check all values of the cart array. |
public static
|
#
wcap_check_shipping_charges( string $updated_cart, $existing_cart )
Checks if Shipping charges have been modified for the new and old cart. Returns true when it has been changed, else false. |