Suggestion plugin reminder

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 1 month ago #345737

Hi Nicolas.
I would like to make a suggestion about the Reminder plugin.
When a user deletes all items from their shopping cart and is left with 0 products, when the Hikashop cron is triggered it also sends a shopping cart reminder, even though the cart contains no products.
Could an "if" be added where if the number of products in the cart is 0, the reminder is not sent?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345738

Hi,

There is already the code to check that the cart is not empty before sending a reminder notification for it with the code:

// skip cart if the cart has no products
		$this->db->setQuery('SELECT * FROM #__hikashop_cart_product WHERE cart_id = '.$cart->cart_id);
		$products = $this->db->loadObjectList();

		if(empty($products))
			return false;

		$hasProducts = false;
		foreach($products as $p) {
			if($p->cart_product_quantity>0) {
				$hasProducts = true;
				break;
			}
		}

		if(!$hasProducts)
			return false;
in the file plugins/hikashop/reminder/reminder.php of the reminder plugin.
So I'm surprised you're saying this.

Please Log in or Create an account to join the conversation.

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 1 month ago #345774

attached shipping

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345777

Hi,

Could you go in the Customers>Carts menu in your backend and open the details of the cart corresponding to this email and provide a screenshot of what you see there ?
I suppose it must be a special case we forgot about but without knowing more about the cart, it's hard to say what it could be.

Please Log in or Create an account to join the conversation.

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 1 month ago #345781

I have deleted this shopping cart.
I try to do this when I see empty shopping carts to avoid the email.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum