Log 2535

// Placeholder values
$leadCreationDate = #תאריך יצירת הליד#;
$timeFromLeadToCall = #זמן מכניסת ליד עד מועד התקשרות#;
$timeForInitialCall = #הזמן שנקבע להתקשרות ראשונית#;

// Calculate new call time based on lead creation date
if (date(‘w’, strtotime($leadCreationDate)) >= 0 && date(‘w’, strtotime($leadCreationDate)) ’19:00′) {
// If lead creation date is between Sunday to Wednesday after 19:00, set call time for next day after 10:00
$newCallTime = date(‘d/m/Y H:i’, strtotime(‘+1 day +10 hours’, strtotime($leadCreationDate)));
} elseif ((date(‘w’, strtotime($leadCreationDate)) == 4 && date(‘H:i’, strtotime($leadCreationDate)) > ’19:00′) || (date(‘w’, strtotime($leadCreationDate)) >= 5 && date(‘w’, strtotime($leadCreationDate)) <=6 )) {
// If lead creation date is Thursday after 19:00 or Friday/Saturday, set call time for next Sunday close to 10:00
$newCallTime = date('d/m/Y H:i', strtotime('+'.(7 – date('w')).' days +10 hours',strtotime($leadCreationDate)));
} else {
// For any other case, set call time as lead creation date + time from lead to call
$newCallTime = date('d/m/Y H:i', strtotime($leadCreationDate.' +'.$timeFromLeadToCall.' hours'));
}

return $newCallTime;

Note: Replace the placeholders `#תאריך יצירת הליד#`, `#זמן מכניסת ליד עד מועד התקשרות#`, and `#הזמן שנקבע להתקשרות ראשונית#` with actual values.

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