8 – Custom checkout area for Commerce 2.x for order comments that are not saved

I've created a custom checkout section for Commerce 2.x, Drupal Version 8.7.x. I added a text box called field_order_notes on the order unit. The window works and I can run
$ this-> order-> set (& # 39; field_order_notes & # 39 ;, $ values) In the submit handler of my window, I can debug the job object and display the value set. But when I have finished the order, field_order_notes is empty on the order. I'm not sure what I miss here.

    / **
* Adds a section for order notes.
* @CommerceCheckoutPane (
* id = "order_notes",
* label = @Translation ("Ordering Information"),
* default_step = "order_information",
* /
Class OrderNotes expanded CheckoutPaneBase implements CheckoutPaneInterface {
/ **
* The Inline Form Manager.
* @var  Drupal  commerce  InlineFormManager
* /
protected $ inlineFormManager;
/ **
* {@inheritdoc}
* /
public function __construct (Array $ configuration, $ plugin_id, $ plugin_definition, CheckoutFlowInterface $ checkout_flow, EntityTypeManagerInterface $ entity_type_manager) {
parent :: __ construct ($ configuration, $ plugin_id, $ plugin_definition, $ checkout_flow, $ entity_type_manager);
/ **
* {@inheritdoc}
* /
public function buildPaneForm (Array $ pane_form, FormStateInterface $ form_state, Array & $ complete_form) {
$ pane_form['order_notes'] = [
      '#type' => 'textarea',
      '#title' => $this->t('Order notes'),
      '#default_value' => $this->order->get('field_order_notes')->getString(),
      '#required' => FALSE,
return $ pane_form;
/ **
* {@inheritdoc}
* /
public function submitPaneForm (array & $ pane_form, FormStateInterface $ form_state, array & $ complete_form) {
$ values ​​= $ form_state-> getValue ($ pane_form['#parents']);
$ this-> order-> set (& # 39; field_order_notes & # 39 ;, $ values);

magento2 – Custom text on the country in the delivery address

I would like to add custom text if the shipping country is Sweden. I created the Magento_Checkout module in my custom theme and added an HTML file



                                                            plus shipping and handling
                                                                    Magento_Checkout / js / view / country-component.js

My problem is js, which I have declared as country-component.js

but what do I have to do to filter the country_id attribute to display the text?

entity – Entity form in custom form popup

I have a custom form with a picklist field that contains entity IDs in the options.
I need to add the "Add new" link below the pick list after a pop up window with the entity form opens.
After submitting the form in the popup window, it must be closed and the new entity entered in the selection list.
Are there already solutions for that?

Customization – Add a Custom Taxonomy Slug to the Custom Post Type URL

I have a custom post type called "blog" and a custom taxonomy named "area" (both are set up using the CPT UI plugin). I also used the following code to add the taxonomy slug in the URL so that the default WP POST has the URL structure:% area% /% post-title% /. What can I possibly add to the following code so that my CPT with the name "blog" also has the URL structure example.com/%area%/blog/%post-title%/, if that's even possible? If not, a structure of example.com/blog/%area%/%post-title%/ would be good as well. P.S. The taxonomy "area" is available on both the standard WP-POST and CPT blogs.
Thank you guys!

add_filter ("post_link", "area_permalink", 10, 3);
add_filter (& # 39; post_type_link & # 39 ;, area & # 39 ;, 10, 3);

function area_permalink ($ permalink, $ post_id, $ leavename) {
if (strpos ($ permalink, & # 39;% area% & # 39;) === FALSE) return $ permalink;

// Receive mail
$ post = get_post ($ post_id);
if (! $ post) return $ permalink;

// Retrieve taxonomy terms
$ terms = wp_get_object_terms ($ post-> ID, & # 39; area & # 39;);
if (! is_wp_error ($ terms) &&! empty ($ terms) && is_object ($ terms[0])) $ taxonomy_slug = $ terms[0]-> snail;
else $ taxonomy_slug = & # 39; primary_area & # 39 ;;

return str_replace (& # 39;% area% & # 39 ;, $ taxonomy_slug, $ permalink);

platformer – Data exchange between custom hardware and games

An option on Windows, as far as I've found, is the implementation of a Force Feedback device driver. You must implement a registry for the system DLL with a COM object implemented IDirectInputEffectDriver, and write the CLSID in:

HKEY_LOCAL_MACHINE System CurrentControlSet Control MediaProperties PrivateProperties Joystick OEM

Then you would configure Force Feedback with your device in-game.

See Force Feedback Device Driver Interface.

I think the documentation is missing, and I did not find any code examples.

Create a custom PayPal donation form, as in this example

Look for a custom PayPal donation form, such as https://www.battlefields.org/help-save-battlefields. The PayPal Donate Button Wizard page does not allow more than $ 3 in sums or custom fields. Suppose this is a custom implementation, but not sure where to start. Do I need to store and process all fields myself in a database, can I capture them and send them using the PayPal API or something else? Welcome any help!

Many Thanks,

Theming – selecting, saving, caching custom fonts

I would like to know something about writing paths and caching fonts in Drupal 8 (8.7.2).

My goal is to use a custom font without using the @ font-your-face module.

Just to try it, I added the font family in line 17 of core / themes / bartik / css / components / site-branding.css in my local installation

At this moment, my font file is in my desktop folder, Drupal chaching is disabled.

In fact, the font is displayed correctly – you do not have to put the font file in a Drupal directory and define a path to the font file.

How can that work? How does Drupal know where the font came from?

Even stranger, the fonts are displayed correctly even after deleting the font file from the desktop and clearing the cache in Drupal.

Can someone find out how Drupal draws and stores fonts?

Thanks in advance

rest – query the custom fields of the project server if MSP_EpmProject_UserView is missing

Recently, I wanted to query one of my custom field values ​​from the Project Server 2016 database, but could not find MSP_EpmProject_UserView in my content database views.
After some searches, I found the SharePoint update from March 2017 that fixed this bug. However, after installing the March 2017 CU, the Project Server views will still be discarded.
Finally, I found that if you have multiple PWA sites in the same content database, userviews will not be completed.
How can I query my custom field values?