Log 2663

// Input values
$creationDate = #תאריך יצירה#;
$lastOrderDate = #הזמנה אחרונה בתאריך#;
$currentDate = #תאריך של היום#;

// Remove any leading or trailing spaces from the input values
$creationDate = trim($creationDate);
$lastOrderDate = trim($lastOrderDate);
$currentDate = trim($currentDate);

// Check if the last order date is empty
if (empty($lastOrderDate)) {
// Calculate the number of days between creation date and current date
$daysPassed = round((strtotime($currentDate) – strtotime($creationDate)) / (60*60*24));
} else {
// Calculate the number of days between last order date and current date
$daysPassed = round((strtotime($currentDate) – strtotime($lastOrderDate)) / (60*60*24));
}

// Echo the result
return $daysPassed;

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