subscription mails bug fix
This commit is contained in:
parent
8c12e35621
commit
82a3142c73
|
|
@ -1061,9 +1061,13 @@ class Cart {
|
|||
|
||||
return false;
|
||||
} else {
|
||||
$result = $this->moveToCart($id);
|
||||
$simpleOrVariant = $this->product->find($id);
|
||||
|
||||
return $result;
|
||||
if($simpleOrVariant->type == 'simple') {
|
||||
$result = $this->add($id, $data);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -81,13 +81,15 @@ class SubscriptionController extends Controller
|
|||
}
|
||||
};
|
||||
} else {
|
||||
$unique = $this->subscription->findWhere(['email' => $email]);
|
||||
$alreadySubscribed = $this->subscription->findWhere(['email' => $email]);
|
||||
|
||||
if($unique->count() > 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
$unique = function() use($alreadySubscribed){
|
||||
if($alreadySubscribed->count() > 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if($unique()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue