Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft Commerce

## Unreleased

- Fixed a bug where product variant field layout tabs displayed incorrectly on variant slideouts. ([#4335](https://github.com/craftcms/commerce/issues/4335))

## 5.7.0 - 2026-07-16

### Store Management
Expand Down
27 changes: 13 additions & 14 deletions src/fieldlayoutelements/PurchasablePriceField.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@ public function inputHtml(ElementInterface $element = null, bool $static = false
$toggleAttributes['data-init-prices'] = 'true';
$toggleContent = PurchasableHelper::catalogPricingRulesTableByPurchasableId($element->id, $element->storeId) .
Html::beginTag('div', ['class' => 'flex']) .
// New catalog price button
Html::button(Craft::t('commerce', 'Add catalog price'), [
'class' => 'btn icon add js-cpr-slideout',
'data-icon' => 'plus',
'data-store-id' => $element->storeId,
'data-store-handle' => $element->getStore()->handle,
'data-purchasable-id' => $element->id,
'data-asdsa' => $element->firstSave,
]) .
Cp::renderTemplate('commerce/prices/_status', [
'areCatalogPricingJobsRunning' => Plugin::getInstance()->getCatalogPricing()->areCatalogPricingJobsRunning(),
]);
// New catalog price button
Html::button(Craft::t('commerce', 'Add catalog price'), [
'class' => 'btn icon add js-cpr-slideout',
'data-icon' => 'plus',
'data-store-id' => $element->storeId,
'data-store-handle' => $element->getStore()->handle,
'data-purchasable-id' => $element->id,
]) .
Comment thread
Copilot marked this conversation as resolved.
Cp::renderTemplate('commerce/prices/_status', [
'areCatalogPricingJobsRunning' => Plugin::getInstance()->getCatalogPricing()->areCatalogPricingJobsRunning(),
]) .
Html::endTag('div');
} else {
/** @var Sale[] $relatedSales */
$relatedSales = Plugin::getInstance()->getSales()->getSalesRelatedToPurchasable($element);
Expand Down Expand Up @@ -204,8 +204,7 @@ public function inputHtml(ElementInterface $element = null, bool $static = false
Html::tag(
'div',
// Prices table
$toggleContent .
Html::endTag('div'),
$toggleContent,
[
'id' => 'purchasable-toggle',
'class' => 'hidden',
Expand Down
Loading