Skip to content

Commit

Permalink
Merge branch '1.x' into vi-translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngô Quốc Đạt authored Jan 13, 2025
2 parents 5985a7d + 1952a4a commit e9c9462
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/Managers/DiscountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public function getDiscounts(?Cart $cart = null): Collection
$this->channel($defaultChannel);
}

if ($cart && $customerGroups = $cart->customer?->customerGroups) {
$this->customerGroup($customerGroups);
}

if ($this->customerGroups->isEmpty() && $defaultGroup = CustomerGroup::getDefault()) {
$this->customerGroup($defaultGroup);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Search/ProductOptionIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function makeAllSearchableUsing(Builder $query): Builder

public function toSearchableArray(Model $model): array
{
$data['id'] = $model->id;
$data['id'] = (string) $model->id;

// Loop for add option name
foreach ($model->name as $locale => $name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function state($state): self
/**
* Set the value for the postcode.
*/
public function postcode(string $postcode): self
public function postcode(?string $postcode): self
{
$this->postcode = $postcode;

Expand Down

0 comments on commit e9c9462

Please sign in to comment.