How to get abandoned cart?

Hi,
I am planning to make add-on. But I have some doubt. How to recover abandoned cart ? Is there any inbuilt mail function available like wp_mail. 

Regards
tim
The built-in mail function is in includes/classes/email.inc.php

Here is the usage:

$email = new email();

$email->add_recipient($email, $name)
      ->set_subject(...)
      ->add_body(...)
      ->send();

If you like to check if the mail was accepted by the mail pipe:

$email = new email();
$email->add_recipient(address, name)
      ->set_subject(...)
      ->add_body(...);

if (!$result = $email->send()) {
  .. there was an error ..
}
Abandoned carts are found in `lc_cart_items` but guest carts is your problem.
Thank you..
1. Any hooks in checkout page? 
2. How to get abandoned cart ? (If user login - different browser )
tim
Hooks are limited but yeah the shipping, payment and order modules have events that fires during checkout.

vQmod is unlimited.

I don't understand what you mean how to get abandoned cart. Any cart items are stored in `lc_cart_items`. Use a regular mysql command to fetch them.
Can I login to account by url ? Example : I want get same cart and user account, if I click specific link. (My add-on will send that link to customer's email. 

Regards
tim
No, there is no authetication by url. You would have to create it. If you need to load the customer as the active user for the session use customer::load(id). For the next page load lib_cart will then populate the stored cart items.
An abandoned cart add on would be great. Hopefully, it could also email through to customers who placed orders whose payments failed (eg. Stripe & Paypal failed payments) where an order got created but shows as Unprocessed as the payment failed.  And give them an easy way to pay for their order, without having to place the order again from the start.
Hi,

it's a old theme, but still no option for recover abandoned carts (email). Any progress?
tim
Third party services always did it better. Reinventing a wobbly wheel didn't feel like the right thing to do, when the alternative option is a simple JS third party implementation.
@tim I agree... Can you recomand any good service to integrate ot you have expirience with it?
tim
I'm not a merchant myself, (well in some aspect yes), but I think most recognizable CRM services and email automation providers have this feature.
Typing "cart recovery service" on Google gave a ton of hits. Go for one that speaks to your heart and that you can grow with.
@tim thanks, I mean if you integrate any for your clients or know any good? We use Metorik before (woocommerce) and Klavyo, but Metorik don't have "manual integration" and is pretty high price, Klavyo has lot of bugs, at least for woocommerce (sends email to customers, which have already made purchase that left products in basket, translation problems and so on).
tim
I have seen users use Freshworks CRM, Sendinblue and Salesmanago for various automations. Not limited to only abandoned carts.
@tim I know them yes, but those are pretty expensive to use just for abandoned carts, specially if you already use other CRM. I try to find some abandoed cart recovery service on google and there are some good, but as expected, none support LC, I contacted some of them about integration with LC (like cartfox, which are SMS service, but very good), let's see...

I also think about module and guest users, which is biggest problem I have some idea:

1. Move email and phone fields on top in box_checkout_customer.inc (higher chance that customer will input email).

2. Script (js), which detect when guest input email or name on checkout (fields email and name), items in cart and save details in "potential customer database". Then send email reminder in selected intervals with link to viewed product from cart (or link to recover cart).

3. About recovered carts tracking:

3.1. Script shoud load cookie in customer's browser to track customer, when customer place order from cart.
3.2. LC should assign cart ID and check if order was made from this cart.
3.3. Check if order was made with same email already (don't work for registred customers).

Statistic, how many people click on link in email will be enaugh, at least for start.
tim
none support LC

It's usually just implementing two JS events. One for adding items to cart and one for purchase fulfillment.

 I will try to keep some of your ideas for a 3.1 milestone. I'm late with 3.0 already.