Drupal Commerce 2: How to set up Product Attributes

Posted by Acro Media - 19 Jan 2018 at 16:27 UTC

In this five part Acro Media Tech Talk video series, we use our Urban Hipster Commerce 2 demo site to show you how to set up a new product in Drupal Commerce 2, from start to finish. This is the first video in the series, How to set up Product Attributes.

If you're creating a whole new product type from scratch, the first thing you want to do is setup any product attributes that your product needs. For example, a shirt product type may have a number of sizes (small, medium, large) and colours available to choose from. Size and colour are both product attributes. As a site administrator, you'll use the attributes to configure your product variations. As a customer, your'll use the attributes to pick the exact product that you want to purchase.

Next week we'll post part 2: Product Attributes using Rendered Fields

Its important to note that this video was recorded before the official 2.0 release of Drupal Commerce and so you may see a few small differences between this video and the official release now available.

Urban Hipster Commerce 2 Demo site

This video was created using the Urban Hipster Commerce 2 demo site. We've built this site to show the adaptability of the Drupal 8, Commerce 2 platform. Most of what you see is out-of-the-box functionality combined with expert configuration and theming.

Visit Our Drupal Commerce 2 Demo Site

More from Acro Media
Drupal modules used in this video

Contact us and learn more about our custom ecommerce solutions

DrupalEasy Podcast 203 - David Hernandez (New Jersey, Governance, Docksal, tiny zoos)

Posted by DrupalEasy - 19 Jan 2018 at 13:36 UTC

Direct .mp3 file download.

David Hernandez, (davidhernandez), one of the DrupalCamp New Jersey organizers as well as one of the "evolution of Drupal governance" volunteers and Manager of Learning and Contributions at FFW and an Acquia certified Grand Master joins Mike Anello to talk about all of this roles (and a few more), trends in Drupal meetups, regional camps, and DrupalCons, event organizer burnout, and Docksal. In addition, we really had to work to figure out the answer to one of the "five questions".

Interview DrupalEasy News Sponsors Upcoming Events Follow us on Twitter Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.
If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Out of the Box has just been Committed to Drupal Core 8.6.x

Posted by mark.ie - 19 Jan 2018 at 13:30 UTC
Out of the Box has just been Committed to Drupal Core 8.6.x

After two years of planning, discussing, and (eventually) coding, the "Out of the Box" initiative has just been committed to Drupal Core.

markconroy Fri, 01/19/2018 - 13:30

One of the things most often requested of Drupal has been a better experience "Out of the Box", so that when a new users installs it they see something more positive than a message saying "You have not created any frontpage content yet".

To that end, a strategic initiative called the "Out of the Box Initiative" was set up. I was a member of that team. What we sought to do over the past two years was create a website for a (fictional) publishing company. We decided upon the name "Umami" for a food publishing company, publishing articles and recipes. We went through the full web design process - user stories, validation, requirements gathering, wireframes, design, development ... up to creating what we called the "MEGA Patch". And then submitted about 50 versions of it.

This week we hoped our work would be committed to Drupal 8.5.0-alpha1, but we just missed that deadline. Instead, we had a meeting with the product owners last night to have the final "Needs Product Owners Review" tag removed from the "Create experimental installation profile" issue. Here's the video of that demonstration and meeting:

Following that meeting, the tag was removed and our code was committed to Drupal 8.6.x. This means you'll see it shipping in Drupal in September at the latest, but we hope to get the final beta blockers fixed to have it backported to 8.5.0-beta. If you'd like to help squash some of the bugs, follow these "Out of the Box" issues. Here's the tweet from @webchick (THANKS!) announcing it:

So, what is in this commit?

This commit brings a new installation profile to Drupal. The profile is called "Umami" and has a corresponding "Umami" theme. It creates three content types - basic page, article, and recipe. It has listing pages for articles and recipes, some promotional blocks, a homepage, contact form, and search page. It is a fully-featured (small) website built using only (stable) Drupal core modules.

We are not using experimental modules such as content moderation, layout builder, media, etc. Once they are stable, we hope to bring them into the "Out of the Box" experience as well.

If you'd like to install it, try this link on SimplyTest.me.

17-years of development behind

Posted by TIP Solutions - 19 Jan 2018 at 11:08 UTC

Happy anniversary!

Another year of work behind which means thousands of patches, new iniatives and modules. Simple put: ever more modern and robust platform to create web applications and sites.

An article [1] published by Drupal association they gave some recent figures about the development of the framework from last year from which some interesting were:

Planet Drupal Community Drupal

AGILEDROP: Interview with Igor, our Development manager

Posted by Agiledrop.com Blog - 19 Jan 2018 at 08:10 UTC
We have sat down with our Development manager, Igor and ask him a couple of questions. Enjoy the interview.   When did you start working at AGILEDROP and what were your initial responsibilities? I started working at Agiledrop in September 2015 as a junior developer. At first, I was working mainly as a frontend developer with some small site building tasks so that I got more familiar with Drupal (I didn’t work with Drupal before). After few weeks I got more and more backend tasks and soon I became Drupal backend developer. Initially, I was there to learn Drupal and try to improve my… READ MORE

A new Intranet Platform for Allianz Suisse

Posted by Amazee Labs - 19 Jan 2018 at 07:48 UTC
A new Intranet Platform for Allianz Suisse

We are proud to present the new intranet platform for Allianz Suisse. The intranet platform is designed to show the Allianz team news, events and updates and offers all the advantages of a cloud-based platform while conforming to the company’s stringent security standards.

Sian Wheeler Fri, 01/19/2018 - 08:48 Allianz Device Image

The brand new intranet platform is an internal business tool for Allianz Suisse and thus, not accessible to the public. Thanks to the single sign-on function, users can now log in via Drupal using their existing Allianz account, while the ability to comment on and “like” different topics makes the whole system that bit more engaging.

About Allianz

Allianz Suisse offers a range of innovative products and services in all aspects of insurance, pensions and wealth management. With premiums of around CHF 3.6 billion, Allianz Suisse is one of the largest providers of property, casualty and life insurance in Switzerland.

About the Project

The project was developed based on Drupal 8, in partnership with drunomics. The platform features a Kerberos-based single sign-on functionality. All users are signed in automatically, while employees are also able to post their own replies to comments and “like” their favourites. Elasticsearch makes it easy to locate documents and content anywhere on the platform, providing the ideal solution in an age where instant access to information is a prerequisite.

news, events, desktop Allianz

December Accessibility (A11Y) Talks

Posted by Hook 42 - 19 Jan 2018 at 03:58 UTC
Hook 42 Drupal 8 and Accessibility Logo

As an early holiday present, for December's meet-up we had a very special accessibility guest, Heydon Pickering who chatted about "Prioritizing Accessibility.” For those of you who are veterans of the world of website accessibility, you probably already know a lot about what Heydon has contributed to our field. But for those of you new to this field, let me take a quick minute to give you some more background on our speaker.

Analysing churn in Drupal core

Posted by PreviousNext - 18 Jan 2018 at 22:59 UTC

After reading a blog post by Matthias Noback on keeping an eye on code churn, I was motivated to run the churn php library over some modules in core to gauge the level of churn.

Is this something you might like to do on your modules? Read on for more information.

by Lee Rowlands / 19 January 2018 What is churn

As Matthias details in his blog post - churn is a measure of the number of times a piece of code has been changed over time. The red flags start to crop up when you have high complexity and high churn.

Enter churn-php

Churn php is a library that analyses PHP code that has its history in git to identify high churn/complexity scores.

You can either install it with composer require bmitch/churn-php --dev or run it using docker docker run --rm -ti -v $PWD:/app dockerizedphp/churn run /path/to/code

Some results from core

So I ran it for some modules I look after in core, as well as the Drupal\Core\Entity namespace.

Block Content

File Times Changed Complexity Score core/modules/block_content/src/Entity/BlockContent.php 41 6 1 core/modules/block_content/src/BlockContentForm.php 32 6 0.78 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php 20 6 0.488 core/modules/block_content/src/Tests/BlockContentTestBase.php 16 6 0.39 core/modules/block_content/src/BlockContentTypeForm.php 18 4 0.347 core/modules/block_content/src/Controller/BlockContentController.php 8 6 0.195

Comment

File Times Changed Complexity Score core/modules/comment/src/CommentForm.php 60 45 1 core/modules/comment/src/Entity/Comment.php 55 25 0.548 core/modules/comment/src/Tests/CommentTestBase.php 33 29 0.426 core/modules/comment/src/Controller/CommentController.php 32 20 0.274 core/modules/comment/src/CommentViewBuilder.php 37 16 0.25 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php 32 18 0.24 core/modules/comment/src/Form/CommentAdminOverview.php 29 17 0.191 core/modules/comment/src/CommentAccessControlHandler.php 17 28 0.19 core/modules/comment/src/CommentLinkBuilder.php 15 29 0.17 core/modules/comment/src/CommentManager.php 29 15 0.157

Drupal\Core\Entity

File Times Changed Complexity Score core/lib/Drupal/Core/Entity/ContentEntityBase.php 115 173 0.808 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php 61 196 0.465 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php 56 203 0.427 core/lib/Drupal/Core/Entity/Entity.php 131 43 0.212 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php 41 105 0.16 Conclusion

So, what to do with these results?

Well I think if you're looking to simplify your code-base and identify places that would warrant refactoring, those with a high 'churn' score would be a good place to start.

What do you think? Let us know in the comments.

Tagged

Drupal Core, Code Complexity, Drupal 8

How to Avoid Traffic Drops After a Site Redesign

Posted by Zivtech - 18 Jan 2018 at 21:22 UTC

During the redesign process of a website, there are many small changes that can ultimately affect the traffic of the new site. The key is to identify any changes that might break SEO, or changes that might affect the way the site looks to search engine spiders ahead of time to avoid traffic drops. In the end, we want the site to look fresh and new while still getting the same traffic, or more, as the old design. 

At Zivtech, we look at many factors in the planning phase of a website redesign project and try to identify those that could cause drops in traffic after the new design is launched. Once these have been identified, we ensure all of these tasks have been completed before launch. Let’s take a look at some of these factors and how to avoid traffic drops on your next website redesign project.

Meta Tags

We typically build sites with Drupal, so the Metatag module handles much of the meta tag configuration and display on the site. If you aren’t using Drupal though, there could be some changes to your front-end design that could affect your meta tags and confuse search engine spiders. You’ll need to make sure that all of your pages have meta tags and that there aren’t any duplicates. 

Broken Links

Broken links are a huge problem during website redesigns. This could be a result of changes in the menu structure or in path structures for content types. Broken links mean that users and search engines can’t find the pages they’re looking for, which can really wreak havoc on your site traffic statistics. 

Read more

Estimating Drupal 8 Migration Scope

Posted by Phase2 - 18 Jan 2018 at 18:21 UTC

In my last post,  we discussed why marketers might want to migrate their content to Drupal 8, and the strategy and planning required to get started. The spreadsheet we shared with you in that post is the foundation of a good migration, and it usually takes a couple sprints of research, discussion, and documentation to compile.  It’s also a process that’s applicable to all migration of content, no matter the source or destination framework.

Lightning Strict

Posted by Acquia Lightning Blog - 18 Jan 2018 at 15:00 UTC
Lightning Strict Adam Balsam Thu, 01/18/2018 - 10:00

Under certain circumstances, it might be necessary to build a specific version of Lightning with dependencies exactly as they were when it was released. But sometimes building older versions of Lightning can be problematic. For example, maybe a new dependency conflicts with an old one, or a patch no longer applies with an updated dependency.

In that case, you can use the new "Lightning Strict" package to pin all of Lightning's dependencies (and their dependencies recursively) to the specific versions that were included in Lightning's composer.lock file when it was released. (If this sounds familiar, a "Drupal Core Strict" package also exists that does the same thing for core. But note that package is incompatible with Lightning Strict since Lightning uses PHP 7.0 when building its lock file.)

In this example, we want to build Lightning 2.2.4 - which contains the migration to Content Moderation, Workflows, and Lightning Scheduler:

$ composer require acquia/lightning:2.2.4 balsama/lightning_strict:2.2.4 --no-update
$ composer update

Assuming you were updating from Lightning 2.2.3, you could then follow the update instructions for 2.2.4 found in our release notes. In this case, they are:

$ drush updatedb && drush cache-rebuild
$ drupal update:lightning --since=2.2.3

Once you've updated to the most recent version, you can remove the dependency on balsama/lightning_strict.

The package will automatically be updated when new versions of Lightning are released. Hopefully this will solve some of the problems people have experienced when trying to build older version of Lightning.

Eliminating render-blocking JavaScript and CSS in above-the-fold content in Drupal sites

Posted by Advomatic - 18 Jan 2018 at 14:55 UTC

One of the things we do on an annual basis for our clients at Advomatic is an annual site audit – a high level kick-the-tires kind of site inspection. For Drupal sites, we check the logs for any glaring errors, check for overrides in Features, run some SEO and accessibility testing, and, of course, take it... Read more »

The post Eliminating render-blocking JavaScript and CSS in above-the-fold content in Drupal sites appeared first on Advomatic.

Encrpt and Decrypt text in the URL's

Posted by heykarthikwithu - 18 Jan 2018 at 12:49 UTC
Encrpt and Decrypt text in the URL's

Encrpt and Decrypt text in the URL's, In general, while Anonymous user's are given access to make some DB operations via UI, then important thing to make sure is its not hackable.. For this to make sure, minimum thing to do is encrypt the piece of text for the end user and decrypt back piece of text while doing the backend operation..

heykarthikwithu Thursday, 18 January 2018 - 18:19:35 IST

Bibliography and Citation - Altmetric

Posted by ADCI Solutions - 18 Jan 2018 at 10:51 UTC

Do you remember the awesome module Bibliography and Citation for Drupal 8? It allows keeping, outputting, exporting and importing bibliographic data.

Our web development team ADCI Solutions has come up with the addition - the Bibliography and Citation - Altmetric module.

 

Learn about the possibilities of visualization with Altmetric

 

Bibliography and Citation - Altmetric

 

Are your private Drupal files secure? Check now!

Posted by myDropWizard.com - 17 Jan 2018 at 16:21 UTC

One of the great things about Drupal, is that it's possible to build a pretty advanced site just by pointing and clicking and configuring things - what we call "site building" in the Drupal universe.

But with all that power, you can also make your Drupal site less secure - and possible to hack! - just by changing configuration settings! We covered other examples of this in a previous article.

Today we're going to talk about one of the most common... and most DANGEROUS: exposing your Drupal private files on the internet.

In this article we're going to discuss how to determine if your private files have been exposed, and also how to fix it.

Read more to find out!

CiviCRM secrets for Drupalers: Screencast of Drupal 8 + CiviCRM Installation

Posted by myDropWizard.com - 17 Jan 2018 at 16:13 UTC

We're Drupalers who only recently started digging deep into CiviCRM and we're finding some really cool things! This series of videos is meant to share those secrets with other Drupalers, in case they come across a project that could use them. :-)

You may recall the blog post that David put out way back in August 2017. He gave some very detailed instructions on how you can install CiviCRM on Drupal 8!

We have some new Drupal versions released since August, and we've had some requests to demonstrate how to go through some of the steps. So, I'm going to do just that!

Every step will be followed quite literally. Note that David assumed this was being installed on a development system running Linux. Since I'm running a Mac, this should be a great cross-platform test.

Watch the screencast to see if I run into any issues with the instructions:

Video of CiviCRM secrets for Drupalers: Screencast of Drupal 8 + CiviCRM Installation

Some highlights from the video:

  • Very quick install of Drupal 8 on a Mac running MAMP
  • Download and installation of CiviCRM
  • Brief comments along the way as I follow the steps
  • Finish with a working Drupal 8 + CiviCRM site!

Please leave a comment below!

Attributing RSS traffic on your Drupal site using UTM

Posted by Matt Glaman - 17 Jan 2018 at 15:30 UTC
Attributing RSS traffic on your Drupal site using UTM mglaman Wed, 01/17/2018 - 09:30 It seems like RSS is not quite as a buzz as it once was, years ago. There are reasons for that, but I partly believe it is because more services mask direct RSS feed subscriptions in larger aggregate tools. This change also makes it more interesting to get analytics about where that traffic is coming from, and what feed. When I migrated my site to Drupal 8, I decided to take an adventure on adding UTM parameters to my RSS feeds.

Data-binding methods in AngularJS

Posted by Valuebound - 17 Jan 2018 at 15:05 UTC

The blog is follow up on our previous post “My First Impression of Learning AngularJS” where I shared my experience of working in AngularJS. This blog is intended to take you one step ahead and have a better understanding of basic operation workflow. In Angular, we have a concept of ‘Data-binding’ that means synchronization of data between a view to model or model to view (technically). 
 

Data Binding Flow

From the business perspective: Change in the logic (backend) impacts front-end (view) and vice versa.

Continuous Integration for Drupal 8 with CircleCI

Posted by Lullabot - 17 Jan 2018 at 14:57 UTC

This article is the first in a series about different Continuous Integration implementations for Drupal 8 projects. Each installment will pick a CI technology and go over its pros and cons for implementing the following set of jobs when someone creates a pull request:

  • Run unit and kernel tests.
  • Generate a PHPUnit coverage report.
  • Check Drupal's coding standards.
  • Update the database and run Behat tests.

In this article, we will start with CircleCI, a SaaS platform. Thanks to work initiated by Andrew Berry at drupal_tests—if you maintain a Drupal 8 module, check it out—I can present you a single-command installer to get your Drupal 8 project started with Continuous Integration using CircleCI.

There is a repository that contains the installer script where we are working on the different CI implementations, plus a demo Drupal project to see them in action.

Setup

Here is a clip where I take a vanilla Drupal 8 project created with composer-project, I run the installer and commit the files, and when I allow CircleCI to watch the repository I see the jobs running:

Videos require iframe browser support.

For details on how to run the installation script and connect your repository with CircleCI, have a look at the repository's README.

Killer features

Once you have the setup in place, your project will benefit right away from the following features:

Less infrastructure to maintain

When code is pushed to a GitHub repository, CircleCI takes care of spinning up and tearing down containers for each of the jobs that you have defined in the CircleCI configuration file. CircleCI provides a set of pre-built images for you to use on your project but you can use a custom Docker image if you need it. For example, here is the Dockerfile that the installer script uses:

# This is the parent image, located at https://hub.docker.com/_/drupal
FROM drupal:8.4-apache

# Install libraries and extensions.
RUN apt-get update && apt-get install -y \
  imagemagick \
  libmagickwand-dev \
  mariadb-client \
  sudo \
  vim \
  wget \
  && docker-php-ext-install mysqli \
  && docker-php-ext-install pdo \
  && docker-php-ext-install pdo_mysql

# Remove the vanilla Drupal project that comes with the parent image.
RUN rm -rf /var/www/html/*

# Change docroot since we use Composer's drupal-project.
RUN sed -ri -e 's!/var/www/html!/var/www/html/web!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www!/var/www/html/web!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

# Install composer.
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/f3333f3bc20ab8334f7f3dada808b8dfbfc46088/web/installer -O - -q | php -- --quiet
RUN mv composer.phar /usr/local/bin/composer

# Put a turbo on composer.
RUN composer global require hirak/prestissimo

# Install XDebug.
RUN pecl install xdebug-2.5.5 \
    && docker-php-ext-enable xdebug

# Install Robo CI.
# @TODO replace the following URL by http://robo.li/robo.phar when the Robo team fixes it.
RUN wget https://github.com/consolidation/Robo/releases/download/1.1.5/robo.phar
RUN chmod +x robo.phar && mv robo.phar /usr/local/bin/robo

# Install Dockerize.
ENV DOCKERIZE_VERSION v0.6.0
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
    && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
    && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

# Install ImageMagic to take screenshots.
RUN pecl install imagick \
    && docker-php-ext-enable imagick
Status badges

By adding a CircleCI status badge to your project’s README file, you can check whether the main branch is stable or not:

undefined

This is useful when creating a new release. If the badge is red, then you need to investigate what’s going on. Beware, there is an open bug in CircleCI that may display the green PASSED badge even when one of the jobs in a workflow has failed. Until this gets fixed, click on the badge to double check that everything passes.

Version control

CircleCI’s jobs live within the project repository under the .circleci directory, which makes it easy to track changes in the jobs and make them evolve along with the project.

Intelligent reporting

CircleCI is intelligent at presenting job artifacts. Here are some screenshots:

Failed tests

By storing test results as artifacts, CircleCI can parse them and present them in the browser:

undefined

Links to screenshots taken by Behat

By using the Behat Screenshot extension and storing the screenshots as job artifacts, we can see them as a list of links in the browser:

undefined

Here is what we see when we click on the highlighted link above:

undefined

Coding standard violations

CircleCI can parse the Code Sniffer report and present a summary of Drupal coding standard violations:

undefined

Test coverage reports

By generating an HTML PHPUnit report and exposing it as an artifact, we can see a link to the report at the CircleCI web interface:

undefined

The highlighted link above shows the following report which describes how much of the code is covered by tests:

undefined Running CircleCI jobs locally

CircleCI offers a command line interface for running jobs locally. This is a big time saver as it gives you a chance to test and debug a job locally before pushing your changes.

undefined Ready to take off!

Do you have a Drupal 8 project and want to try Continuous Integration with CircleCI? If so, follow the instructions at the Drupal8CI repository and start writing tests and getting the jobs to pass. If you find issues or add improvements, please either post a comment here or contribute them to the repository. Happy CI-ing!

Acknowledgements
  • Andrew Berry, for teaching me so much about Docker and CircleCI.
  • James Sansbury, for his editorial and technical feedback, plus his Bash-fu.
  • The Draco team at Turner, for allowing me to add continuous integration to their development workflow.

Acquia Dev Desktop, Drush and Drupal 8.4

Posted by Leander Lindahl - 17 Jan 2018 at 14:13 UTC
Acquia Dev Desktop, Drush and Drupal 8.4 Leander Lindahl Wed, 01/17/2018 - 15:13

Pages

Subscribe with RSS Subscribe to Drupal.org aggregator - Planet Drupal