To alter main content view of commerce summary you need to change results part of view, you can do this in different ways, one of it could be hook_preprocess_views_view or with some of the
To alter main content view of commerce summary you need to change results part of view, you can do this in different ways, one of it could be hook_preprocess_views_view or with some of the
You are using get with fieldname and you are getting array as result, to get value as string, use getString() method like below
$entity->get("fieldName")->getString()
Lets first talk about what does hook_views_data_alter() do in first place. Views is a query editor, it queries DB, so this hook alters how our data is queried. As in views UI you add, fields, filters, sorts, relationships, here you will have an exposure of all DB tables you can make queries on and data on what to use for fields, filters and sorting.
This one is one of the bigger surprises in drupal 8. Form building is straight forward, basic OOP bases on symfony, but then you want your forms to be translatable, you are in for a ride. First you will need to have schema yaml files in install and schema directory.
Currency symbol is not stored in order, so to get it, you need to dig a bit deeper and fetch currency object.
I am assuming you have order stored in $this->order so then we get currency code and with that we load commerce_currency through entity type manager and use getSymbol method to get the symbol.
You maybe added some patch to composer.json, but it didn reflect in composer.lock when you ran "composer install" so to force composer lock to update you should run
composer update --lock
If you wan to get coupon entity from order there is a quick magic method to do that. First load order by some property, we can use ID
You want to get exact class for particular plugin field.type, type in this in your devel for "entity_reference"
$field_type_manager = \Drupal::service('plugin.manager.field.field_type');
$class = $field_type_manager->getDefinition('entity_reference')['class'];
this will show you info
In drupal 7 when you moved modules from one directory to other, usually running drush rr (registry rebuild) would work, maybe you would need to clear caches. In drupal 8, this wont help. Paths are saved in APC and you will probably need to restart server.
For someone maybe
For selenium there is also selenium command runner, called selenium side runner, as I pointed out some tips about how to use NEW Selenium IDE here, here are tips on how to use it with CLI or with some CI/CD.