Log 2541

$leadCreationDate = #תאריך יצירת הליד#;
$leadEntryTime = 2; // placeholder value for time in hours from lead creation to lead entry

// Convert the lead creation date to a timestamp
$creationTimestamp = strtotime($leadCreationDate);

// Get the day of the week (0: Sunday, 1: Monday, …)
$dayOfWeek = date(‘w’, $creationTimestamp);

// Check if the lead creation date is between Sunday and Wednesday after 19:00
if ($dayOfWeek >= 0 && $dayOfWeek = 19) {
// Set next day’s call time as 10:00
$nextDayCallTime = strtotime(‘+1 day’, strtotime(date(‘Y-m-d’) . ‘ 10:00’));
return date(‘d/m/Y H:i’, $nextDayCallTime);
} elseif ($dayOfWeek == 4 && date(‘H’, $creationTimestamp) >= 19 || $dayOfWeek >= 5) {
// Set closest Sunday’s call time as 10:00
$closestSundayCallTime = strtotime(‘next Sunday ‘ . ’10:00’);
return date(‘d/m/Y H:i’, $closestSundayCallTime);
} else {
// Calculate call time based on lead entry time in hours
$callTime = strtotime(“+$leadEntryTime hour”, $creationTimestamp);
return date(‘d/m/Y H:i’, $callTime);
}

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
  • Attributes
  • Custom attributes
  • Custom fields
Click outside to hide the comparison bar
Compare