Lisa Streeter: Order Receipt Preview

Planet Drupal - 8. Januar 2024 - 18:24
The Goal

Administrative users creating and updating orders in the backend may want to:

  • Preview the order receipt before emailing customers.
  • Send a copy of the order receipt to an email address other than the contact email address for the order.

Developers may want to:

  • Preview the order receipt for testing purposes when working on environments with outgoing emails disabled
A Solution

We can add a button to the right of the existing, "Resend receipt" button that appears on Order View pages, like this:

Lisa Streeter: Conditional Order Receipts

Planet Drupal - 8. Januar 2024 - 18:24
The Goal

Core Drupal Commerce provides Order Receipt functionality. An Order Receipt is an email notification sent to a customer when an order is placed. It lets the customer know that the order has been received and includes a summary of the order. For each Order Type, you can turn order receipts on/off and, if enabled, specify that a copy be sent to a specific recipient.

The Drop Times: TDT is a Media Partner for Drupal Mountain Camp 2024

Planet Drupal - 8. Januar 2024 - 18:24
The Drop Times is now the official media partner for Drupal Mountain Camp 2024. Expect the latest camp updates and insights exclusively from us. Stay connected for all things Drupal Mountain Camp!

DrupalEasy: Test-driving the Rancher Desktop Docker provider with DDEV on MacOS

Planet Drupal - 8. Januar 2024 - 18:24

Recently, Randy Fay of the DDEV project blogged about two new Docker providers available (and supported by DDEV) for MacOS: Rancher Desktop and OrbStack. Both of these join Colima and Docker Desktop as supported Docker providers for DDEV on MacOS. 

What is a Docker provider?

I know that I certainly have asked this question - more times than I care to admit. As Randy explains in the blog post:

All of the Docker Providers on every platform (except Linux) are actually wrappers on the open-source Docker/Moby project, which is supported by Docker, Inc.

In other words, in order for DDEV to talk to Docker, it needs a provider. But, not all Docker providers are created equal. Neither Docker Desktop nor OrbStack are open-source - both have free versions (with restrictions); for most commercial use cases, there is a cost involved. Colima and Rancher Desktop are both open-source.

Features vary between Docker providers as well, so it only makes sense that performance differences also exist. Fortunately, Randy has written another blog post summarizing the performance differences between the various Docker providers on MacOS.

tl;dr if you have Mutagen enabled with DDEV, then they're all pretty fast, with OrbStack having the edge.

Why switch Docker providers?

While Colima is (IMHO) heads-and-tails better than Docker Desktop for Mac, upgrading Colima itself has been a bit of a rocky road. I have learned to never assume that my databases will remain intact during a Colima upgrade. This usually isn't a deal-breaker, but for me, it is squarely in the inconvenience category.

I'm hoping that the situation is smoother with Rancher Desktop.

Getting started with Rancher Desktop

As I (currently) use DDEV on MacOS with Colima (and Mutagen enabled,) I decided to give Rancher Desktop a try, as it is an open-source option. 

Using the instructions provided by the DDEV project, I downloaded Rancher Desktop from the official site. A bit surprisingly, the recommended installation method was not Homebrew, but rather a bit of an old-school MacOS .dmg file.

After downloading Rancher Desktop (but before installing it,) the steps I took to install and change over from Colima began with:

$ ddev poweroff $ colima stop

Next, I double-clicked to install Rancher Desktop - making sure to uncheck the "Kubernetes" checkbox as the DDEV instructions suggested. I didn't touch any other settings during the Rancher Desktop install.

Once that was installed, I restarted my Terminal app, then navigated to one of my DDEV projects.

$ cd ~/sites/d10 $ docker context use rancher-desktop $ ddev start

If you haven't used it before, the docker context use rancher-desktop bit basically tells Docker which provider to use. In other words, you can have multiple providers installed (like I do with Colima and Rancher Desktop) and switch between them using the docker context use command.

With that, installation was complete. 

My experience with Rancher Desktop

In short: uneventful (in a good way)

I didn't have any issues at all - it all went very smoothly. From a performance standpoint, Drupal 10 sites feel a little bit snappier than with Colima, but this is purely qualitative, not quantitative. 

The (minor) downside

When switching Docker providers, while project code isn't touched, unfortunately, project databases don't automatically come along. In his blog post, Randy suggests using ddev snapshot --all as an initial step in the process to back up all databases. I tend to take a more piecemeal approach - individually exporting databases while using Colima, then importing them while using Rancher Desktop. For example, here's my process for moving a database from Colima to Rancher Desktop (assuming my system is currently using Rancher Desktop):

$ cd ~/sites/d10 $ ddev poweroff $ colima start $ docker context use colima $ ddev start $ ddev export-db > db-backup.sql.gz $ ddev poweroff $ docker context use rancher-desktop $ ddev start $ ddev import-db –file=db-backup.sql.gz $ ddev drush cr

Granted, it's a bit wordy, but it works for me.

So, Orbstack?

At the present time, I have no plans to test-drive Orbstack. While Randy's blog post does indicate I would experience a minor performance boost, at this time, I'd rather just stick with an open-source solution.

One of our Professional Module Development course graduates, Jay Volk, recounted his recent experience with Orbstack:

My experience is that OrbStack is really fast and while not open source (it's $8/mo.) it seems well worth the cost and I'm happy to support this project.  Orbstack will take your existing Docker settings and move them to Orbstack when starting up (it asks your permission.) This proved to be no problem for DDEV but occasionally causes problems with the other solution I sometimes need, Lando.  Easy enough, Docker can reclaim settings back from OrbStack and with a Docker restart you're good to go again with that (albeit slower) solution.

Conclusion

I wrote the first draft of this blog post about 2 weeks ago - since then I've stuck with Rancher Desktop and have no plans to go back to Colima. I'm pretty sure the performance is a bit better than Colima and I've had absolutely zero issues. The real test (for me at least) will be when it comes time to update Rancher Desktop - assuming it is a smooth experience, I doubt I'll be returning to Colima. 

Header image generated by ChatGPT-4 using the prompt: "Create a cartoon image of a cowboy lassoing a giant laptop computer using 2:1 aspect ratio". If someone could identify the two flying objects to the right of the laptop, I'd be most appreciative.

Intel erringt Teilerfolg gegen Patent-Troll VLSI

heise online Newsticker - 5. Dezember 2023 - 5:40

Intel hat ein VLSI-Patent doch nicht verletzt. Ein US-Bundesberufungsgericht schickt den Fall zurück nach Texas.​

Schufa-Pendant: Bürgerrechtler verklagen Auskunftei Crif und Adresshändler AZ​

heise online Newsticker - 4. Dezember 2023 - 23:43

Max Schrems und seine Organisation Noyb bringen den Streit über "illegale und heimliche Datenverarbeitung" durch Crif vor Gericht.​

Meta: Spanische Medien fordern 550 Millionen Euro wegen "unlauteren Wettbewerbs"

heise online Newsticker - 4. Dezember 2023 - 23:43

Mehr als 80 spanische Medien haben eine Klage gegen Meta eingereicht. Sie werfen dem US-Konzern Verstöße gegen europäische Datenschutzbestimmungen vor.

Brasilien: Erste vollständig von KI geschriebene Verordnung

heise online Newsticker - 4. Dezember 2023 - 22:32

Der Stadtrat von Porto Alegre beschließt einstimmig für eine Verordnung über Wasserzähler, ohne zu wissen, dass sie vollständig von ChatGPT geschrieben wurde.

TechStage | Lampen für Stromausfall: Mobile Leuchten – griffbereit und geladen

heise online Newsticker - 4. Dezember 2023 - 21:00

Notlichter für die Steckdose garantieren Licht bei Stromausfall. TechStage zeigt fünf Modelle ab 13 Euro und erklärt, wie sie sich in der Praxis unterscheiden.

Talking Drupal: Talking Drupal #427 - Melissa Turns The Tables

Planet Drupal - 4. Dezember 2023 - 21:00

On today’s show we are turning the tables and Nic and John will be interviewed by our guest host Melissa Bent. We’ll also cover Content Model Documentation as our module of the week.

For show notes visit: www.talkingDrupal.com/427

Topics
  • What made you decide to start the podcast
  • Who does what tasks
  • The first episode was on May 30 2013. What do you know now that you wish you knew then
  • When did the guest host start
  • What has been your favorite episode
  • How did you come to this format
  • Where did the tagline come from
  • What technology do you use in production
  • The show is supported by multiple platforms, would you recommend this
  • What advice would you give someone just starting
Resources Guests

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi

Hosts

Melissa Bent - linkedin.com/in/melissabent merauluka

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Content Model & Site Documentation

  • Brief description:
    • Have you wanted to make your Drupal site self-documenting directly within the admin UI? There’s a module for that.
  • Brief history
    • How old: created in Jan 2023
    • Versions available: 1.0.23, compatible with Drupal 9 and 10
  • Maintainership
    • Actively maintained, latest release was a week ago
    • Test coverage
    • No official guide, but there was a recent talk about the module at GovCon, so you can watch that
    • Number of open issues: 43 open, 9 of which are bugs
  • Usage stats:
    • 82 sites
  • Maintainer(s):
    • Steve Wirt (swirt) who works for Civic Actions
  • Module features and usage
    • Allows your Drupal site to generate its own documentation
    • Has fieldable Content Model Document entities that allow you to customize what data will be stored
    • Can optionally document things like your content types, taxonomies, block types, paragraph types, and more
    • Documentation elements can also be associated with parts of your site configuration, and they become available within the relevant parts of your admin UI. For example, if you add documentation for a specific content type, when a site builder goes into edit that content type they will see a link to the documentation as a tab
    • You can generate entity relationship diagrams using MermaidJS
    • Also includes a field search capability originally developed as a separate module by Matthieu Scarset, who was a guest on this show back in episode #298
    • Will also generate diagrams to illustrate your content workflows, showing the states defined and the transitions between them

Weltfunkkonferenz: Internationale Fernmeldeunion ebnet Weg für 6G

heise online Newsticker - 4. Dezember 2023 - 19:56

Die nächste Mobilfunkgeneration soll mit Datenraten bis zu 200 GBit/s KI, Gesundheitsanwendungen, Konnektivität und Nachhaltigkeit voranbringen.​

Nach WebEx: Nun auch Zoom für tvOS – iPhone oder iPad nötig

heise online Newsticker - 4. Dezember 2023 - 19:25

Wie im Sommer angekündigt, kommt nun der Videoconferencing-Dienst aufs Apple TV. Nutzer benötigen dazu noch eine Kamera, die ein anderes Apple-Gerät liefert.

KI-Update kompakt: Gemini später, KI-Egoisten, Q plaudert, Copyright in China​

heise online Newsticker - 4. Dezember 2023 - 18:42

Das "KI-Update" liefert werktäglich eine Zusammenfassung der wichtigsten KI-Entwicklungen.

Filmic Pro: Eigentümer entlässt offenbar alle Mitarbeiter

heise online Newsticker - 4. Dezember 2023 - 18:25

Lange galt Filmic Pro auf iPhone- und Androidgeräten als Kamera-App für gehobene Ansprüche. Jetzt wurde laut Medienberichten das gesamte Team entlassen.

Neue Elektroautos von Toyota: Ein Urban-SUV und eine Fastback-Studie

heise online Newsticker - 4. Dezember 2023 - 18:19

2024 und 2025 sollen zwei weitere Toyota-Elektroautos auch in Europa auf den Markt kommen. Der Konzern holte sich dazu Entwicklungshilfe von BYD aus China.

Phishing-Angriffe: Betrüger missbrauchen Hotelbuchungsplattform booking.com

heise online Newsticker - 4. Dezember 2023 - 17:47

Mit auf Datendiebstahl spezialisierte Malware griffen Cyberkriminelle zunächst Hotelmitarbeiter an und verschickten dann über Booking betrügerische Mails.

heise+ | Kryptografie: Vigenère-Chiffre mit dem Kasiski-Test knacken

heise online Newsticker - 4. Dezember 2023 - 17:30

Der Kasiski-Test greift das Verwundbarste in einem Kryptosystem an – den Schlüssel. Wir erklären die Funktionsweise des Tests und programmieren ihn in Python.

E-Signatur: Automatisiertes VideoIdent-Verfahren geht in die Verlängerung​

heise online Newsticker - 4. Dezember 2023 - 17:27

Trotz Sicherheitsbedenken hat das BSI gemeinsam mit dem Digitalministerium und der Bundesnetzagentur einer weiteren mehrmonatigen Evaluierungsphase zugestimmt.​

TechStage | Top 9: Die besten Überwachungskameras für innen im Test

heise online Newsticker - 4. Dezember 2023 - 17:00

Moderne PTZ-Überwachungskameras bieten Bewegungsverfolgung und andere smarte Funktionen. Damit können Anwender sie unter anderem als Babyfon und für Automatisierungen nutzen.

Deutsche Bahn so unpünktlich wie lange nicht mehr

heise online Newsticker - 4. Dezember 2023 - 16:46

Die Fernverkehrszüge erreichten ihr Ziel so oft verspätet wie lange nicht mehr. Worauf die Deutsche Bahn das zurückführt.