diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0330d2db..54a8d00c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,5 @@ jobs: with: composer_require_extra: phpunit/phpunit:^9.5 - silverstripe/silverstripe-omnipay:dev-master + silverstripe/silverstripe-omnipay:dev-main php-http/discovery:^1.18.1 diff --git a/src/Checkout/Component/AddressBook.php b/src/Checkout/Component/AddressBook.php index 90b76b5a..3915f774 100644 --- a/src/Checkout/Component/AddressBook.php +++ b/src/Checkout/Component/AddressBook.php @@ -72,7 +72,7 @@ public function getExistingAddressFields() $member = Security::getCurrentUser(); if ($member && $member->AddressBook()->exists()) { $addressoptions = $member->AddressBook()->sort('Created', 'DESC')->map('ID', 'toString')->toArray(); - $addressoptions['newaddress'] = _t('SilverShop\Model\Address.CreateNewAddress', 'Create new address'); + $addressoptions['newaddress'] = _t('SilverShop\Model\Address.CreateNewAddress', 'Create new {AddressType} address', '', ["AddressType" => $this->addresstype]); $fieldtype = count($addressoptions) > 3 ? DropdownField::class : OptionsetField::class; $label = _t("SilverShop\Model\Address.Existing{$this->addresstype}Address", "Existing {$this->addresstype} Address"); diff --git a/src/Extension/ProductVariationsExtension.php b/src/Extension/ProductVariationsExtension.php index 3a663b64..90061118 100644 --- a/src/Extension/ProductVariationsExtension.php +++ b/src/Extension/ProductVariationsExtension.php @@ -57,7 +57,7 @@ public function updateCMSFields(FieldList $fields) GridFieldConfig_RecordEditor::create(100) ) ]); - + $variationsGridField->getConfig()->addComponent($sort = new GridFieldOrderableRows('Sort')); if ($this->owner->Variations()->exists()) { @@ -210,7 +210,7 @@ public function possibleValuesForAttributeType($type) '"SilverShop_Variation_AttributeValues"."SilverShop_VariationID" = "SilverShop_Variation"."ID"' )->where( "TypeID = $type AND \"SilverShop_Variation\".\"ProductID\" = " . $this->owner->ID - )->sort('"SilverShop_Variation"."Sort" ASC'); + ); if (!Product::config()->allow_zero_price) { $list = $list->where('"SilverShop_Variation"."Price" > 0'); diff --git a/src/Forms/VariationForm.php b/src/Forms/VariationForm.php index c3079aae..969a7215 100644 --- a/src/Forms/VariationForm.php +++ b/src/Forms/VariationForm.php @@ -130,7 +130,7 @@ protected function getFormFields($controller = null) '', ['attribute' => $attribute->Label] ), - $product->possibleValuesForAttributeType($attribute) + $product->possibleValuesForAttributeType($attribute)->sort(['Sort' => 'ASC']) ); if ($attributeDropdown) {