Web News

Amazon Prime is gobbling up Whole Foods' rewards program - CNET

Webware - Thu, 04/19/2018 - 11:14am
Whole Foods Market rewards customers have been told that their digital coupons and account on the site won't work after May 1.
Categories: Web

Final Deadpool 2 trailer assembles the 'super-duper f----- group' - CNET

Webware - Thu, 04/19/2018 - 11:09am
We get a better look at some of the supporting mutants backing Deadpool up.
Categories: Web

Chevrolet and Shell let you pay for gas from inside the car - Roadshow

Webware - Thu, 04/19/2018 - 11:08am
The program will start in Detroit, Seattle and Houston before expanding.
Categories: Web

Qualcomm's bid to expand beyond mobile chips hits a roadblock - CNET

Webware - Thu, 04/19/2018 - 10:54am
Is the company getting caught up in the escalating tensions between China and the US?
Categories: Web

UE Blast and Megablast speakers will add voice control for Spotify - CNET

Webware - Thu, 04/19/2018 - 10:45am
The Alexa-enabled speakers will soon get some sorely needed updates.
Categories: Web

Commerce Guys: Introducing the Cart API for Drupal Commerce

Web - Thu, 04/19/2018 - 10:36am

At the end of February, I began working on an series of API endpoints that would allow for a progressively decoupled cart experience. There are a few reasons why we decided that Drupal Commerce needed an API solely for the cart.

  1. Performance: when a cart block is rendered on the server it has complicated cache metadata. Cart block contents vary per user and change too often to be cached effectively. As such these blocks incur heavy logic and rendering costs.
  2. Flexibility: modern consumers expect interfaces to be more reactive and match common UX patterns. These patterns almost always require client-side implementation using JavaScript that communicates to backend APIs.

In my last blog I brought up why the API-First and JavaScript Modernization initiatives matter to Drupal Commerce. I wanted to target something limited in scope that would provide big wins for Drupal Commerce users as we ventured into the fully and progressively decoupled Drupal realm.

As a result, we now have the Commerce Cart API module. Our first implementation will be the Commerce Cart Flyout module, which uses the RESTful endpoints provided by the Cart API module to create the dynamic cart interface shown in the sample animation below.

This moves us decidedly down the path of providing Drupal Commerce users with progressively decoupled components that improve the customer experience. In a following blog post, I’ll going to write about what it was like to build this module. (Hint: we didn’t “just do it” and release it into the Drupal.org namespace.)

I am planning on experimenting with more areas that we can perform progressive decoupling and look forward to connecting with folks about the topic at Decoupled Drupal Days in August. You should meet me there to join in the conversation!

Categories: Web

The Force is crushing it: Get 2 Star Wars drones for $99.99 - CNET

Webware - Thu, 04/19/2018 - 10:18am
Propel's excellent replica quadcopters originally sold for $180 apiece. Now $100 buys you two of them.
Categories: Web

Specbee: Drupal CMS : Redefining the Future of Digital Healthcare

Web - Thu, 04/19/2018 - 9:25am

I recently stumbled upon an article which stated some facts on technology and its impact on one of the biggest sectors in the world - Healthcare. I was taken by surprise to know that a survey which engaged patients of all varieties, stated that two thirds of them had not been in a discussion with the doctors about their own treatment, more than 35% did not have a clear picture about the goals of their treatment, and 20% received a conflicting information from different professionals.

Categories: Web

Pixel 2 vs. iPhone: Why Google's phone is the best upgrade - CNET

Webware - Thu, 04/19/2018 - 9:24am
If you're a "lifelong" iPhone user, you might be tempted to skip the iPhone X and get a Pixel 2. And that's OK.
Categories: Web

Polestar 1 does the electric slide in snowy Sweden - Roadshow

Webware - Thu, 04/19/2018 - 9:14am
The 600-horsepower Polestar 1 coupe is coming next year. Here's a dynamic look at the plug-in hybrid undergoing cold weather testing in Sweden.
Categories: Web

Avengers: Infinity War has too many Avengers. Just admit it - CNET

Webware - Thu, 04/19/2018 - 9:00am
Commentary: There are over 20 heroes on the film's poster. And that's not even all of them!
Categories: Web

Scientists built a bot that builds IKEA chairs - CNET

Webware - Thu, 04/19/2018 - 8:16am
It takes away the pain -- and satisfaction -- of assembling an IKEA furniture on your own.
Categories: Web

Avengers: Infinity War stars look back on 10 years of Marvel - CNET

Webware - Thu, 04/19/2018 - 5:59am
The architects of the Marvel Cinematic Universe celebrate 10 years since Iron Man started them on the road to Infinity War.
Categories: Web

Agiledrop.com Blog: AGILEDROP: Drupal events in 2nd quarter of the year

Web - Thu, 04/19/2018 - 5:46am
We've made a list of Drupal camps and summits that you can attend in the second quarter of the year. Drupal events are bringing together Drupal developers, site builder, themers, end users and those interested in learning more about Drupal. We are attending Drupal events because of sessions and collaborative discussions.   Drupaldelphia 2018 United States, Philadelphia, PA Hussian College of Art 27-28. April 2017 This year, Drupaldelphia is a part of Philly Tech Week 2018 presented by Comcast, and it will be hosted at Hussian College of Art. There are 39 accepted sessions.https://… READ MORE
Categories: Web

China's internet is reaching new levels of crackdown - CNET

Webware - Thu, 04/19/2018 - 5:06am
In one of the world’s most restrictive media environments, tech companies are practicing self-censorship to curry favour with China’s ruling party.
Categories: Web

orkjerns blogg: How to find the route name in Drupal 8?

Web - Thu, 04/19/2018 - 4:21am
How to find the route name in Drupal 8? admin Thu, 04/19/2018 - 08:21

In many cases, a route name is something you might need to get something done in Drupal 8. For example to generate a link, or maybe create a local task in your module.

Some examples:

The path can be found in a routing.yml file

Some times you can just search for the path in your codebase, and then find the corresponding route name. Let's say that I wanted to link to the page mysite.com/admin/config/regional/translate. If I just search the codebase for this path, it would be revealed in the file locale.routing.yml:

locale.translate_page: path: '/admin/config/regional/translate' defaults: _controller: '\Drupal\locale\Controller\LocaleController::translatePage' _title: 'User interface translation' requirements: _permission: 'translate interface'

To link to this page using the API for generating links, I would then do something like this:

$link = Link::fromTextAndUrl(t('Translate interface'), Url::fromRoute('locale.translate_page'));

So to conclude, the route name for that particular page is the key in the routing file, in this case locale.translate_page.

The path can not be found in a routing.yml file

Now, this is what I really wanted to write about in this blog post. Getting the route name directly from a routing file is simple enough, but where do you look if the path can not be found in a routing file?

Find route name with PHPStorm

My first trick is to utilize the IDE I use, PHPStorm.

Start by setting a breakpoint in index.php on the line that looks like this:

$response->send();

Next step, refresh your browser on the page you want to know the route name for, and hopefully trigger your breakpoint. Then you click on the icon for "evaluate expression". On my work computer this has the shortcut key alt-f8, but you can also find it in the debugger toolbar, or via the menu (Run -> Evaluate expression).

Then evaluate the following code:

\Drupal::routeMatch()->getRouteName()

That should give you the name of the route. As illustrated below in a gif:

Find route name with any development enviroment.

Now, I realize that not everyone uses PHPStorm, so here is one solution that should work without having xdebug and an IDE set up:

Following the same tactic as above, let's open up index.php again. Now, just change the following code:

$response = $kernel->handle($request); +print_r(\Drupal::routeMatch()->getRouteName()); $response->send();

The difference here is adding the line with print_r.

Now visit the page you want to know the route name for. This will print the name of the route as the very first output of your Drupal site. Since you probably do not want this for your live Drupal site, this is best done on a development copy.

Other options

You can also use the module webprofiler which is a part of the devel module. This may or may not invlove more steps than necessary, depending on your project. But to be fair, that is also an option.

To finish off, here is an animated gif in the category "route". Let me know your tips and tricks in the comments!

Categories: Web

Flocon de toile | Freelance Drupal: Set up a simple inventory control with Drupal Commerce 2

Web - Thu, 04/19/2018 - 2:00am
If we do not have (yet) a contributed module (commerce_stock should be available soon), Drupal Commerce 2 already has an API to set up an simple inventory control, with the Availability Manager service. Let's look at how to set up a very simple stock control, based on a field (for example field_stock) that has been added on a product.
Categories: Web

Intel reportedly shutting down smart glasses group - CNET

Webware - Thu, 04/19/2018 - 1:03am
Chip giant is closing down its new devices group, maker of fitness trackers and smart glasses, according to The Information.
Categories: Web

Moto G6 Play and G6 Plus listed prematurely online - CNET

Webware - Thu, 04/19/2018 - 1:00am
Carphone Warehouse, a UK-based phone retailer, puts the phones up on its page hours before they are expected to launch in Brazil, although the pages were quickly taken down.
Categories: Web

2018 Ford F-150 Power Stroke diesel gets 30 mpg and tows like a beast - Roadshow

Webware - Thu, 04/19/2018 - 12:49am
The 3.0-liter turbo diesel from Ford is the most fuel-efficient full-size pickup truck on the market...for now.
Categories: Web

Pages