Skip to content

Commit

Permalink
Merge branch '5.x' into feature/support-with-fields-param-on-resave-a…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
lukeholder authored Nov 20, 2024
2 parents 3db9742 + 03cebf1 commit f63fc97
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Added the `--with-fields` option to all Commerce `resave/*` commands.
- Fixed a SQL error that could occur when updating. ([#3778](https://github.com/craftcms/commerce/issues/3778))

## 5.2.4 - 2024-11-14

Expand Down
1 change: 0 additions & 1 deletion src/elements/db/OrderQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,6 @@ protected function beforePrepare(): bool
}

if (isset($this->reference) && $this->reference) {
// $this->subQuery->andWhere(['commerce_orders.reference' => $this->reference]);
$this->subQuery->andWhere(Db::parseParam('commerce_orders.reference', $this->reference));
}

Expand Down
8 changes: 8 additions & 0 deletions src/fields/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public function __construct(array $config = [])
parent::__construct($config);
}

/**
* @inheritdoc
*/
public static function icon(): string
{
return 'tag';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 8 additions & 0 deletions src/fields/Variants.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public static function displayName(): string
return Craft::t('commerce', 'Commerce Variants');
}

/**
* @inheritdoc
*/
public static function icon(): string
{
return 'tags';
}

/**
* @inheritdoc
*/
Expand Down
4 changes: 2 additions & 2 deletions src/migrations/m240308_133451_tidy_shipping_categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public function safeUp(): bool

$this->dropForeignKeyIfExists(Table::SHIPPINGCATEGORIES, ['storeId']);

$this->addForeignKey(null, Table::SHIPPINGCATEGORIES, ['storeId'], Table::STORES, ['id'], 'CASCADE');

$this->alterColumn(Table::SHIPPINGCATEGORIES, 'storeId', $this->integer()->notNull());

$this->addForeignKey(null, Table::SHIPPINGCATEGORIES, ['storeId'], Table::STORES, ['id'], 'CASCADE');

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/migrations/m240313_131445_tidy_shipping_methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public function safeUp(): bool

$this->dropForeignKeyIfExists(Table::SHIPPINGMETHODS, ['storeId']);

$this->addForeignKey(null, Table::SHIPPINGMETHODS, ['storeId'], Table::STORES, ['id'], 'CASCADE');

$this->alterColumn(Table::SHIPPINGMETHODS, 'storeId', $this->integer()->notNull());

$this->addForeignKey(null, Table::SHIPPINGMETHODS, ['storeId'], Table::STORES, ['id'], 'CASCADE');

return true;
}

Expand Down

0 comments on commit f63fc97

Please sign in to comment.