Merge pull request #4543 from devansh-webkul/issue-4542
Fixed the issue in which user cannot apply the coupon if the start date is today regardless the time #4542
This commit is contained in:
commit
528f1aef93
|
|
@ -581,12 +581,12 @@ class CartRule
|
|||
->where('cart_rule_channels.channel_id', $channelId)
|
||||
->where(function ($query1) {
|
||||
/** @var Builder $query1 */
|
||||
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d'))
|
||||
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d H:m:s'))
|
||||
->orWhereNull('cart_rules.starts_from');
|
||||
})
|
||||
->where(function ($query2) {
|
||||
/** @var Builder $query2 */
|
||||
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d'))
|
||||
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d H:m:s'))
|
||||
->orWhereNull('cart_rules.ends_till');
|
||||
})
|
||||
->with([
|
||||
|
|
|
|||
Loading…
Reference in New Issue