Skip to content

Commit

Permalink
Merge branch 'silvershop:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MLindenhofer authored Oct 19, 2023
2 parents f7afd7c + 2309115 commit 7d2c416
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Checkout/Component/AddressBook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/ProductVariationsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/VariationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function getFormFields($controller = null)
'',
['attribute' => $attribute->Label]
),
$product->possibleValuesForAttributeType($attribute)
$product->possibleValuesForAttributeType($attribute)->sort(['Sort' => 'ASC'])
);

if ($attributeDropdown) {
Expand Down

0 comments on commit 7d2c416

Please sign in to comment.