Quantcast
Channel: PrestaShop Developers' blog
Viewing all 939 articles
Browse latest View live

PrestaShop Core Weekly - Week 47 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 16th to Sunday 22th of November 2020.

Core Weekly banner

General messages

Dear developers,

Thanks to the contributors who tested the Release Candidate, a few bugs have been identified in the build that was published three weeks ago.

These bugs have been fixed, so the road is now open to deliver PrestaShop 1.7.7.0 stable release. A new build has been created and delivered to QA team to run the tests campaign. Once it’s verified, if no blocking bug is found, we will be able to release it!

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

  • #21984: Improve Link::getProductLink : Avoid short variable names. Thank you @PululuK
  • #21934: Fix PHPDoc Tools::displayPrice(). Thank you @comxd
  • #21855: Add missing SQL row for actionFrontControllerSetVariables hook. Thank you @comxd
  • #21094: Fixed array parameter processing in Link::getCategoryObject method. Thank you @gfilippakis

Back office

Front office

Tests

Code changes in the ‘1.7.7.x’ branch

Core

  • #21975: Correctly substring fields before update, remove duplicates and add missing sql queries, by @PierreRambaud

Back office

Front office

Installer

Code changes in modules, themes & tools

Visitors online statistics module

Faceted search module

Docker images

PrestaShop Specifications

Auto Upgrade module

Webservices PHP Client

Docker internal images

Prestashop UI Kit

Product Comments module

PHP Developer Tools

  • #39: phpstan config : add _PS_MODE_DEV_ to dynamicConstantNames. Thank you @SebSept

Changes in developer documentation

  • #801: More informations for maintainers : red flags for code reviews, BC breaks, what it means to approve a PR, by @matks
  • #782: Add tinymce config extend documentation, by @NeOMakinG

Where to start contributing?

What about improving the Reset Url button of product page? There is a bug with accented URLs about it reported in October, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @Progi1984, @dependabot[bot], @matks, @MatShir, @jolelievre, @nesrineabdmouleh, @NeOMakinG, @PululuK, @PierreRambaud, @marionf, @davidglezz, @matthieu-rolland, @boubkerbribri, @zuk3975, @okom3pom, @LouiseBonnard, @comxd, @atomiix, @SebSept, @sowbiba, @micka-fdz, @JevgenijVisockij, @sylwit, @gfilippakis, @dgonzalez360!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!


2020 Call for Papers: that was great!

$
0
0

This year, for the first time, a Call for Papers was organised for a PrestaShop event. The objective was to give a voice to the community and learn from its active members. Let’s make a quick tour of the results.

Because it’s 2020

Launched during Spring with a Google Form, the Call for Papers was originally targeted for PrestaShop Day Paris 2020, scheduled to take place last June. Unfortunately, due to the health crisis, this event was canceled, like all other in-person events. However, many people had submitted talk proposals, so, there was many questions left. The most obvious one was to know if a French event, “IRL” or virtual, would be organised during the second semester.

Once it was decided to hold a virtual event in October, it was possible to think about using the talk proposals. And, with the PrestaShop company’s Events team, the work started to find a way to include talks from the CFP in the schedule.

The result was great: 4 speakers from the community participated and their talks have been recorded.

The talks

For this first edition, all talks were in French only, as they were targeted for PSDay Paris. Below is the list of the talks, and the recordings, available on Youtube.

Vincent Millet, Store Commander: “C’est le jour du contrôle technique de votre boutique”

Constantin Boulanger, MDWEB: “Intégration de PrestaShop au sein d’un ERP”

Maxime Varinard, Vaisonet: “Webservice PrestaShop, bonnes pratiques et retour d’expérience”

Guillaume Batier, Prestasafe: “Améliorer les performances de sa boutique PrestaShop et optimiser le page speed”

Other interesting content

Eric Senechal, PrestaShop’s CTO, provided tech news and other information about the open source project:

And Pierre-Olivier Calande, PrestaShop’s CPO, presented what’s new in the upcoming 1.7.7 version of the software:

In parallel, the tech team at PrestaShop organised “Stream your tech”, targeted to the developer community. It is a live streaming to share what they do and answer to questions. It has been recorded in two parts, listed below. And, as there has been great feedback about it, this kind of format will certainly be organised again (stay tuned).

Conclusion

The Call For Papers was quite new to organise, and difficult to keep in 2020, but overall, it was great to make it happen. And I really hope it will be possible to organise a new one next year. Please, share in the comments what you liked the most this year, what could be improved, and what you would like to see in 2021.

From legacy to future architecture: Connecting the dots

$
0
0

This is the fourth and final article in a series we introduced last year, that aims to describe where we are, where we are going, and some ideas on how we’ll get there.

Connecting the dots

(or “Some ideas on how we’ll get from Point A to Point B”)

During this series “PrestaShop in 2019 and beyond”, we described the current architecture (or “Point A”), its pain points, and what we think PrestaShop’s future architecture (or “Point B”) should look like. This fourth and final article aims to explore some concrete ideas to allow the project to move towards Point B – some of which are already being implemented in PrestaShop.

Choosing the right pace

Carrying out an architecture change for a project like PrestaShop is a massive undertaking, and it would be a grave mistake to try doing it in a single shot. Indeed, history tells us that refactoring from the ground up is the number one thing that you should never do: it would require an enormous development effort for a long time, which would leave the community without new releases for too long. Worse, once released, it would carry an extremely high adoption cost, because no existing module would work with it without significant modifications. Other CMSs made this mistake in the past and found their communities struggle to adopt their new version.

That is why we think that the sensible thing to do is to split the work in chunks, put them in a neat roadmap, work on one subset at a time, and deliver them progressively. Of course, it will probably require more effort during a longer timeframe than doing it in one shot. But on the other hand, performing progressive and limited changes in well-defined parts of the system and delivering them iteratively in predictable milestones will allow the community to keep up with the Core, as the changes will be smaller and less expensive to adopt than if the whole thing was done at once.

Now, let’s explore those “chunks” individually.

Reduce entropy to increase reliability

A stable system relies on pre-established business rules being respected at all times. If a system’s business logic requires all products to have a name and a non-negative price, then it is expected that if a product exists, it will adhere to these rules. Unfulfilled expectations produce inconsistencies, which result in errors.

PrestaShop is a very complex system. As such, it needs to enforce a very high number of business rules corresponding to a wide range of use cases. One of the biggest problems of the current architecture is that extensions can tap anywhere into the Core: since the system is very complex, extensions hooking, overriding or just using Core classes can lead to problems if some business rule is overlooked by a developer who was most likely not even aware of the existence of such rule.

For example, when an order’s carrier is updated, an email should be sent to the customer informing them that the order is on its way. This is done automatically when the action is performed using the appropriate service. However, if the order’s carrier is modified manually through ObjectModel, for example by a module developer not aware of this rule, then the required email is not sent.

This problem of thick service layers manipulating thin models devoid of domain logic was identified over 15 years ago by Martin Fowler, who described it the Anemic Domain Model anti-pattern. His answer was simple: business logic should be put in the same place as data is – entity objects.

This means that there should be one single, obvious way to perform any given system action. If there is only one possible way to update an order’s carrier, and if this is done in an intuitive way through the Order entity, then we can ensure that all business rules are being enforced regardless of where this task is initiated.

Here is how you would update an order’s shipping details:

$someCustomer// this is a Customer->getOrderById($orderId)// this returns an Order->updateShippingDetails($newCarrier,$trackingNumber);

Of course, this is easier said that done: getting to this kind of workflow in PrestaShop would require a complete rewrite of the Core, and as we said earlier, we don’t want to do that. Which brings us to the next issue…

Extensions need a reliable interface to the Core

As the Core evolves, its components will inevitably need to be split, renamed, change their methods’ signatures, and so on. However, doing this would provoke breaking changes for extensions that rely on the core components’ interfaces staying unchanged.

This situation can be assimilated to the double bind dilemma, where two conflicting needs prevent the situation from evolving satisfactorily:

  • The system is complex, has bugs or needs to accommodate new features, so components must change.
  • Extensions rely on the current implementation, so component mustn’t change.

This has been slowing down PrestaShop’s progress for quite a while. But luckily, I think there’s a way out.

Let’s revisit the D in SOLID for a minute. The Dependency Inversion Principle states the following:

  1. High level modules should not depend on low level modules. Both must depend on abstractions.
  2. Abstractions should not depend on details. Details must depend on abstractions.

The solution to this dilemma should actually be quite simple: by making extensions rely on an API (abstraction) rather than directly upon the Core, the Core will become free to evolve without introducing breaking changes for extensions.

The answer is to progressively isolate the Core, then refactor it.

Isolate the Core behind the Core API

The Core API acts as an anti-corruption layer, or bridge, between the application code (Controllers, Services, Extensions…) and Core components. Whenever an application level component needs something from the Core, it accesses it through the Core API.

Thanks to this, application components will no longer depend on Core components directly. Therefore, if for example a Core component should need to be removed and replaced with another, it would be completely transparent from the application point of view, as all changes would happen “behind the scenes”.

Decoupled dependencies

To allow this, all code behind this API must become “private”, or internal. This means that once the API is complete, the SemVer compatibility engagement will be limited to API components only.

Of course, this doesn’t mean developers will not be allowed to use Core components directly. PrestaShop being an open system, developers will always be free to shape it in any way they want. However, as this API is put in place, the official compatibility engagement will become limited to the API alone, and while an effort will be made to avoid performing breaking changes, they might happen from time to time.

An intuitive API

To implement this internal API, we have chosen the CQRS pattern. At its heart, CQRS (Command Query Responsibility Segregation) is about separating the Write model from the Read model. But once we couple it with the Command & Query Buses, things get more interesting.

The Core API performs two types of operations:

  • Commands– mutations, or changes in the system state
  • Queries– information retrieval, based on the current system state

Each operation is defined by a simple object whose only job is to describe the task we want to perform, and carry the information needed to perform it. Inspired by Domain-Driven Design’s Ubiquitous Language, these operations are named in such a way that they are self-explanatory: Commands are named like AddProductToCartCommand($cartId, $productId, $quantity) and Queries like GetCustomerOrders($customerId).

The beauty of this pattern, when coupled with Command & Query Buses, is that not only operations are very easy to discover and understand, but API consumers don’t even need to care about how to perform them. Commands and Queries are messages, and the Bus works as a dispatcher that matches a given Command or Query to the appropriate service handler in charge of processing that specific request. As a developer using the Core API, you just need to issue the message, and the system will take care of the rest.

Here’s a code example of how to issue a Command and a Query from a controller:

// add 2 items of $productId to $cartId$this->getCommandBus()->handle(newAddProductToCartCommand($cartId,$productId,2));// retrieve all orders for $customerId$customerOrders=$this->getQueryBus()->handle(newGetCustomerOrders($customerId));

And here’s a schema of how this works:

CQRS in PrestaShop

This pattern is being progressively implemented since PrestaShop 1.7.5, in parallel to the Symfony Migration.

An extensible API

PrestaShop is a development platform, and as such it requires a balance between extensibility and predictability. In an ecosystem as rich as PrestaShop’s, it is impossible to foresee the needs of each individual project in advance; the Core API must then be open for extension so that new features can be added as needed. At the same time, extension needs the system to behave in a predictable way; in consequence the API must also be closed to modification. As you might have guessed, I’m talking about the O in SOLID: the Open/Closed principle.

This principle essentially states that objects should be made in such a way that you can add new functionality without modifying the existing code. In the engineering literature, Bertrand Meyers originally suggested achieving this through subclassing, while Robert C. Martin encourages doing it through interface reimplementation. The Core API leverages CQRS and Command & Query buses in the spirit of this.

The API’s “interface” is composed of Commands that describe an action that can be performed by the system, Queries that define a data retrieval operation, and Query Result Types (also commonly described as Data Transfer Objects or DTOs), which specify the structure for the data returned by a given Query operation. Since these objects (in particular Commands and Queries) are hardwired throughout the project, they can be considered closed to modification.

The implementation, on the other hand, is performed by Handler services which subscribe to a given Command or Query. These services can be easily rewired through Symfony service decoration, so any extension can redefine the behavior of any given use case by decorating the original handler or reimplementing its interface. Additionally, in some cases, multiple extensions can decorate the same service through a decoration chain, where each service “hooks” into the input or output of the previous decorator.

The Core API is the better replacement for the obsolete legacy class override system, which will progressively be phased out as legacy classes are removed from the root namespace.

A domain-oriented API

Consider the following application use cases:

  • Create a customer through a form in BO.
  • Load customer information for update.
  • Issue a partial refund in an order.
  • Activate debug mode.

Each one of these is a unique and complete user interaction with the system. Whenever a request is issued to the backend, it can usually be matched with exactly one use case.

The Core API is built around these use cases. This means that all its operations are based on the things the software does from a user standpoint, rather than what its underlying components are able to do. This is a subtle, yet very important difference.

Some would argue that Core API operations should be optimized for reuse and composition. This is normal: as developers, we are used to constantly search for abstractions and generalizations so that we can build reusable components. We don’t like duplication because it’s inefficient and prone to inconsistencies.

A low-level API would be the obvious answer, because it’s optimized for reusability. After all, use cases are built on top of low level components, and the more low level components there are the less code you need to write whenever you add a new use case. It also helps reduce inconsistencies, because each single thing is done in a single way by a single component, and if that process has to change, you only need to change it in a single place, and then it’s changed consistently everywhere. But there’s a catch: what if you need to make it work slightly differently for one use case only?

A high-level API, on the other hand, is optimized for customizability. This kind of API answers to a single use case, and nothing else. This provides much more freedom for customization compared to the low-level API, because modifications made to a high level API will be less prone to provoke unexpected side effects in other parts of the system. Its downside, however, is the need for more code, and potentially duplicate logic when two use cases are similar (e.g: single delete and bulk delete).

The Core API minimizes this problem by delegating most of the business logic to lower level Domain components. Therefore, a domain-oriented Core API works like a controller or interface to a domain-oriented Core. It doesn’t implement logic, it works as a facade to other services which implement the logic themselves.

Here’s how you create a customer using the Core API:

$customerId=$this->commandBus->handle(newAddCustomerCommand('John','Doe','john.doe@example.com','examplepasswd',$defaultGroupId,$groupIds,$shopId));

How it fits together

With the Core API in place, PrestaShop’s backend architecture consists of four main layers:

  • Application layer– composed of Controllers, Extensions and Application Services (like the ones from PrestaShop Bundle).
  • Core API– the interface to the Core: Commands, Queries and Query Result Types.
  • Core API Services– intermediate services which govern the behavior of the Core API and that can be decorated or replaced by modules.
  • Core Domain– made out of Entity Models (eg. Product, Cart, etc.) containing all the business logic and orchestration services.

Application, Core API, Core API Services, Core Domain

Homogenize the FO & BO architecture

In 1.7, the Back Office is being migrated to Symfony and Twig. It’s only natural that the next step should be migrating the Front Office to Symfony as well. In terms of raw lines of code, the Front Office is much simpler than the Back Office, so it should take less time to migrate, even taking into account that we’d need to implement the Core API in FO as well.

Homogenizing the FO and the BO will not only enhance developer experience and ease up the learning curve for newcomers, but it will also allow us to get rid of all the ancient legacy-based components like Dispatcher, Tools, Helper, legacy controllers… as well as the Adapter namespace.

Refactor the Core Domain

The Core Domain must progressively become domain oriented, using Entities and Aggregates. While some refactoring projects may be started as soon as the next major version, they will become easier to perform once the FO and BO architecture has been homogenized and the Core Domain has been isolated behind the Core API. Here are three top priorities.

1. Enforce strict typing

Strict typing is an essential technique to help detect errors before they happen. Following last year’s decision to drop support for old PHP versions, newly added classes and methods are already enforcing strict types since 1.7.7. Starting on the next major, existing code will start to be adapted to enforce strict types as well.

2. Get rid of ObjectModel

ObjectModel is PrestaShop’s own custom ORM. It served well over the years, but it’s past time for it to retire. What should we replace it with?

To answer that, let’s start with an interesting insight by Matthias Noback about DDD and persistance:

When you (re)learn how to design domain objects using Domain-Driven Design patterns, you first need to get rid of the idea that the objects you’re designing are ever going to be persisted. […] You should not let the fact that you’re using a relational database get in the way. Design the objects in such a way that they are useful, that you can do meaningful things with them, and that they are trustworthy […].

Today, ObjectModels are half database mapping, half domain logic. We need to rebuild the Core Domain in such a way that the Entity Model reflects the Domain logic (i.e. what the application is meant to do) instead of database tables. In DDD, the Domain doesn’t care about how or where data is stored. The database is just a storage adapter, so there’s no reason why it should define how we interact with the Domain at all.

A refactored Core in the spirit of DDD would work primarily with a Domain-oriented Entity Model, leaving Entity Repositories to implement how data is stored and retrieved. The latter would most likely delegate data storage to Doctrine or DBAL adapters, depending on the need.

Getting rid of ObjectModel will also require rewriting the Web services API, because its current implementation is tightly coupled with this system. Thanks to the Core API, however, this task should be fairly straightforward: endpoints will be rewritten as Symfony controllers, but they only need to handle I/O. The heavy lifting is delegated to the Core API – which will be already implemented.

3. Get rid of global state

As said in previous articles, global state is evil and should be avoided. It causes weird, hard to find bugs that end up forcing developers to engineer around them using nonsensical concepts like ContextStateManager and ContextMocker.

All objects that are available globally using either static state or singleton instances, including Context and Db, must be replaced by concrete dependencies made available through Dependency Injection.

Moving forward

Paying up your technical debt is not only about refactoring, it’s also about modernization. PrestaShop’s Front Office as we know it is meant to offer a simple and powerful store implementation, based on traditional server-side rendering and page reload. This implementation, however, is not suitable for everyone.

During the last few years, the web has been transforming faster than ever, adopting new technologies at a much higher rate than 10 or 15 years ago, thanks to the swift and widespread deployment of new features by self-updating browsers like Chrome (which released as many as 87 major versions in only 12 years!).

Modern day websites are increasingly leaning towards rich, high-performance, mobile-first experiences based on powerful Javascript frameworks like VueJs, and advanced browser APIs like web workers, local storage, and push notifications. The current Front Office architecture, out of the box, doesn’t satisfy these needs. For example:

  • If you want to allow offline browsing with Progressive Web Apps (PWA)
  • If you want to go omnichannel (like mobile app, kiosk…)
  • Or if you just want to create your own tailor-made interface to suit your needs

PrestaShop needs to embrace the modern web and bring powerful new features to front end developers, allowing them to benefit from greater flexibility to build their projects. The first building block for that is a powerful Front Office API.

Allow hybrid headless with the Front Office API

Headless CMS is a fancy expression used to describe a Content Management System (CMS) that provides a Back Office to create and manage content, and an API (often REST-based) for content presentation. These CMSs are becoming increasingly popular because they offer developers the freedom to build their consumer experiences as they see fit, without the burden of an opinionated presentation interface. However, compared to monolithic software like PrestaShop, they offer no built-in Front Office – developers using them must create one from scratch or based on other projects.

Hybrid Headless CMSs bring the best of both worlds: an opinionated, ready-to-use Front Office, and an unopinionated, generic API. This way, developers can choose to use one, the other, or both. By creating a Front Office API, we can allow PrestaShop developers to leverage PrestaShop’s catalog, customer account, checkout and order management features to create the experience they wish – whether they choose to use the built-in Front Office or not.

We don’t know exactly how the Front Office API will be implemented yet; it could be REST, it could be GraphQL… all bets are off. But what we do know is that it’s a completely new component that sits at application layer (the topmost layer in the backend architecture described above). Because of that, its initial implementation won’t be burdened by the Core’s SemVer restrictions – it doesn’t require us to wait for a major release. It could even be released as a composer package to allow for fast, iterative experimentation before it’s fully merged into the Core. We can’t wait to start working on it.

Modernize front end development

With the Front Office API in place, we will be able to start working a modern reference implementation for the Front Office, based on this new API and built with VueJS. However, building a modern web app is a complex matter, and building an extensible one is even harder. As this essay dives farther into the future, it’s difficult for me to outline it in detail.

That said, one thing is certain for me: such an app must be based on reusable components, data stores and event-driven state management. They are the building blocks for a Software Development Kit (SDK) that core developers, module developers and integrators alike will be able to use to build PrestaShop and customize it through modules. Once more, I think it would be unwise to move the Front Office to VueJS without building this SDK first, and it’s the reason why we stopped building fully VueJS-based Back Office pages in the first place.

What about the Back Office?

Once the Front-end SDK has been designed, it will be possible to move the Back Office into the VueJS / API world as well. Thanks to the Core API, building a Back Office API that powers VueJS pages will be a piece of cake, because everything will be already in place: Back Office API controllers will output JSON instead of HTML pages, but will still consume the same Commands and Queries as their current counterparts.

Final notes

We don’t yet know the exact order in which these ideas will be implemented, or for that matter, if all of them will be done precisely as I envision them today, or done at all. However, the intent of this series of articles isn’t just to communicate “this is what we are going to do”, and be done with it. These articles are a way put our analysis and our vision into words and share them with the community. They are meant to trigger a discussion so that we can find the best possible path to a common objective, a desirable future that we can look forward to building together: making PrestaShop the best open source e-commerce platform there is.

In this article, I have shared some ideas on how we can move PrestaShop towards the Future Architecture, a very long path that will take a tremendous amount of hard work. In my view, if we want it to see it through in a realistic timeframe, the best way is through smaller, more frequent releases.

In that scenario, we would release one major version every year, focusing on refactoring and technical improvements, followed by one or two minor releases, focusing on new features, and a patch releases every six weeks. I can see you smirking: “they didn’t even manage to release a single minor version in a year, and they plan to release a major every year?”– Yes, I know. To sustain an increased release pace, we would need to set up two ground rules:

  1. A major version is done when (and only when) its scope is done. The release date is pushed back as much as needed until the job is finished.
  2. A minor or patch release is released at a given date, regardless of scope. If a given feature is not ready by the time of freeze, then that feature is either removed from the version, or it’s included as “experimental” behind a feature flag. The release date is fixed, and the released content is variable.

What do you think? Tell us in the comments, or find us on Slack.


About the series

These are the topics that have been covered during this series:

  1. The Current Architecture (or “Point A – Where we are”)
  2. Pain Points (or “What needs to be improved”)
  3. The Future Architecture (or “Point B – Where we are going”)
  4. Connecting the dots (or “Some ideas on how we’ll get there”)

PrestaShop 1.7.7.0 is available

$
0
0

We are happy to announce PrestaShop 1.7.7.0 is officially available!

1.7.7.0 is available!

This release is our biggest yet. More than 1300 merged Pull Requests in 600 days, almost 120 contributors, two betas, one release candidate. Was it worth it? We absolutely think so and hope that you will enjoy using it. By the way, we know this release was expected in early 2020, there will be a build article explaining what happened this year.

New in 1.7.7.0

Productivity

The full redesign and the new features of order pages help merchants to make a better use of their time and to stay focus on their online business.

The redesign of the user interface allows merchants to find the right information quickly while the new features allow a better efficiency on daily tasks and avoid back and forth between pages.

order pages

Growth and flexibility

PrestaShop is an international solution and we aim to provide localized features for users worldwide.

The international improvements remove barriers to go international and help merchants reach more customers.

The fuzzy search improves both the user experience and the conversion rate with a new search algorithm that takes misspellings or error inputs into account.

fuzzy search

In order to allow merchants to have all the currencies they need to meet the expectations of every customer, they can now add new official and non official currencies (e.g. local or custom) to their store and customize their display per language as desired.

currencies

Robustness

We keep improving PrestaShop’s architecture and technology with the Symfony migration. 15 new pages have been migrated (including the order pages), completing almost 55% of the back office migration.

migration

More than 160 bugs have been fixed in the 1.7.7.0 release (vs 110 in 1.7.6.0), including 11 highly expected bug fixes, 5 front office notable fixes, and 5 back office notable fixes.

This new version also brings support for PHP 7.3!

Notable fixes since RC1

Order page (Back-office)

Back-office

Front-office

Upgrade

IMPORTANT NOTE if you plan on upgrading your shop to 1.7.7 and your current version is below 1.7.6 you need to use the latest version (4.11.0) of our 1-Click Upgrade module. Of course it’s always recommended to use the latest version when upgrading but even more so in this case since a bug related to upgrading from these older versions has been fixed in the module.

Changelog

24 pull requests have been merged since the RC1 and 22 issues have been fixed. Read the Changelog for details. This brings us to more than 1300 merged pull requests for the 1.7.7.0 milestone, it is definitely our biggest yet.

If you are looking for more details about all changes and new features expected in 1.7.7, the 1.7.7 beta version release note is the perfect article for you to read!

Download

You can download PrestaShop 1.7.7.0 here:

Download PrestaShop 1.7.7.0 now!

PrestaShop 1.7.7.0 is also available through the 1-Click Upgrade module.

Known issues

The following known regressions will be fixed in upcoming patch versions.

Orders page (Back-office)

Front-office

Back-office

Acknowledgments

PrestaShop is above all a community project: from the 119 committers who contributed to this release, the vast majority are not directly affiliated with the PrestaShop company. Also, 57 people contributed for their first time to PrestaShop in this version!

All contributors:

123monsite-regis, 202 ecommerce, Abdullah, Adib Aroui, Aitbella Mohamed, Alexis Haumaitre, Amazzing, andromaque, Antoine Damiron, Antoine Thomas, Ashish Sharawat, Aude, Aurélien Pelletier, Benjamin, Benjamin Dussouillez, Boubker Bribri, Christian Kubitza, Christophe Zarebski, cirykpopeye, Clotaire Renaud, Codencode, ComonSoft, Damian Dominella, Daniel Hlavacek, Daniel Ziegenberg, Darius Aleksiunas, David Gonzalez, Dheeraj Sharma, Dinesh Badrukhiya, Dmitry, Florentin Garnier, Florian Bergeron, Florian Le Gars, Florian Lemaitre, Franck Lefèvre, François Peyret, Gavin Kalikapersaud, hacchus, Harlock, Horia Rudan, Ibrahima Sow, idnovate, JBWModules, Jean-François Viguier, Jevgenij Visockij, Jocelyn Fournier, Jonas Erixon, Jonathan François, Jonathan Lelievre, Jonathan Vollebregt, Julian Eberius, Julien Gissinger, Julius Žukauskas, Justinas Urbanavicius, Karel Faille, Khouloud Belguith, Klemart3D, Krystian Podemski, ks129, Laurynas Sedys, Louise Bonnard, Luc Vandesype, Manfredi Petruso, Marek Hanuš, Marion François, Marvin Sauraye, Mateusz Furga, Mathias Reker, Mathieu Ferment, Matthias Raigne, Matthieu Rolland, Maxim Krizhanovsky, Mehdi Badrani, Michael Voříšek, Mickaël Andrieu, mushroot, Nesrine Abdmouleh, okom3pom, Pablo Borowicz, Paulo Baptista, Peeyush Agrawal, Pierre Rambaud, pojebunny, Presta Module, Prestashark.eu, Prestaworks, PrestaworksNiklas, PululuK, Puma, Raimondas Sapola, Raúl Jiménez, Rinku Kazeno, Rodrigo Laurindo, Rokas Zygmantas, Rolige eCommerce Solutions, Roman Ondráček, seleda, Sergio Quiñonez, Simon Garny, Simone, Stephane Decisy, Sylvestre Nicky, Sébastien Bareyre, Tadas Davidsonas, Tanguy Salmon, Thomas Baccelli, Thomas L’huillier, Thomas Leviandier, Thomas Nabord, Tomas Ilginis, Tuni-Soft, Valentin Szczupak, venditdevs, Vincent Hadjedj, Vladimir, Web Premiere, webmak, Yannick Armand, Šarūnas Jonušas

A huge thanks to everyone involved in this version! Thank you again for helping improve the lives of more than 300,000 online merchants with ideas, improvements, and fixes!

PrestaShop Core Weekly - Week 48 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 23th to Sunday 29th of November 2020.

Core Weekly banner

General messages

Dear developers,

The past week has seen many major releases for the PHP ecosystem: PHP 8.0, Xdebug 3, Flysystem 2 and multiple versions of Symfony including the last Symfony 3 release: v3.4.47. Symfony 3 now enters Security Support stage where only critical security issues are fixed.

We are immensely proud to announce that PrestaShop 1.7.7.0 was released this week, one more item on this list!

Last week, thanks to the huge work of QA Team, multiples issues had been identified in the Release Candidate and had been fixed. At the start of the week, multiple issues in the upgrade process from previous 1.7 versions to 1.7.7.0 were also identified.

As the ability to upgrade is a major keystone for security and stability, we fixed these upgrade issues in PrestaShop 1.7.7.0 and released a patched version of the Autoupgrade module. If you plan on upgrading your shop to 1.7.7 and your current version is below 1.7.6 you need this version (v4.11.0) of the autoupgrade module.

As usual, it is recommended to be careful before starting to update your website to the latest version:

  • Backup your database and your files
  • Test the update on a testing or pre production server
  • If everything is fine, then update on the production environment

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

Back office

  • #22090: Remove redundant customization field commands. Thank you @zuk3975
  • #22061: Add select2 to the import localization select, by @NeOMakinG
  • #21345: Refactor UpdateProductSeoHandler to use ProductRepository. Thank you @zuk3975
  • #21336: Refactor UpdateProductPricesHandler to use ProductRepository [product page migration]. Thank you @zuk3975
  • #21103: Introduce UpdateProductStockCommand, by @jolelievre
  • #20518: Add GenerateProductCombinationsCommand. Thank you @zuk3975

Front office

Tests

Code changes in the ‘1.7.7.x’ branch

Core

Back office

  • #22013: Handle parallel updates from CartRules when updating a product in Order, by @jolelievre

Tests

Code changes in modules, themes & tools

Theme customization module

Customer reassurance block module

Faceted search module

Auto Upgrade module

Core Weekly Generator tool

Changes in developer documentation

  • #818: Wrong path on overrading templates. Thank you @OliverCG
  • #817: Remove GoogleDoc link, replace it with new page links, by @matks
  • #815: Introduce web version of autoupgrade module, by @matks
  • #814: Some formatting improvements and links for Keeping Up To Date section, by @matks
  • #813: Split Upgrade details in 2 pages ; one for module upgrade ; one for manual upgrade, by @matks
  • #812: Better title UIKit section, by @matks
  • #811: Rename file to fix typo in Doctrine multilang url, by @jolelievre
  • #810: Add documentation about Doctrine multi lang entities, by @jolelievre
  • #809: Add “Insert multiple rows” example to db.md. Thank you @mikevoid101

Custom text module

OnBoarding module

Check payment module

Product Comments module

Order Notifications on the Favicon module

Docker images

PHP Developer Tools

  • #40: Abort bootstrap if PS_ROOT_DIR is incorrect. Thank you @SebSept

Customer data privacy block module

Catalog statistics module

PrestaShop Specifications

Google Analytics module

  • #77: Fix backoffice JS code, fix doubled and tripled pageviews, fix echo in hook, fix default BO tracking - for versions up to 1.7.6. Thank you @Hlavtox

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @Julievrz, @dependabot[bot], @PierreRambaud, @matks, @OliverCG, @zuk3975, @jolelievre, @NeOMakinG, @boubkerbribri, @nesrineabdmouleh, @SebSept, @Progi1984, @mikevoid101, @LouiseBonnard, @okom3pom, @Hlavtox!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

Release Of Module ProductComments 4.2.1

$
0
0

We have identified and fixed a new security issue on module Product Comments.

This issue is fixed in latest version 4.2.1.

Security fix

One security fix has been included in this minor version:

More information about why it is important to update:

Other changes

The version v4.2.1 of the module also brings some new improvements, you can read the full Changelog here.

How to upgrade

You should be able to download the latest version from your Back Office.

PrestaShop Core Weekly - Week 49 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 30th of November to Sunday 6th of December 2020.

Core Weekly banner

General messages

Dear developers,

In case you did not see it, PrestaShop 1.7.7.0 was released last week!

Note that if you plan on upgrading your shop to 1.7.7 and your current version is below 1.7.6 you need the latest version (v4.11.0) of the autoupgrade module.

As usual, it is recommended to be careful before starting to update your website to the latest version:

  • Backup your database and your files
  • Test the update on a testing or pre production server
  • If everything is fine, then update on the production environment

Following the early adoption of PrestaShop 1.7.7, some bug reports have been submitted about upgrade issues. The maintainer and QA team are all hands on deck exploring and fixing these issues.

If you notice issues with PrestaShop 1.7.7.0, you can report it on GitHub and go even further by submitting a pull request to help fix it!

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

Back office

Front office

Installer

Tests

Code changes in the ‘1.7.7.x’ branch

Core

Back office

Front office

Tests

Code changes in modules, themes & tools

Changes in developer documentation

  • #821: Fix typo front controller page, by @matks
  • #820: Add informations about the mail() method not being used anymore, by @atomiix
  • #819: Fix refund code example for Prestashop 1.7.6. Thank you @yannicka
  • #816: Document Autoupgrade module CLI and channels, by @matks
  • #772: More informations about migrating from 1.6. Thank you @kpodemski

Faceted search module

PrestaShop contributors website

OnBoarding module

Quality Assurance module

Auto Upgrade module

Product Comments module

Theme customization module

Cross-selling module

Shopping cart module

Docker images

Customer reassurance block module

Customer data privacy block module

Catalog statistics module

  • #104: Add another template for displayLeft/Right column hook, by @NeOMakinG

Google Analytics module

  • #66: Add tracking of cancelled orders. Thank you @Hlavtox

Performance project

Where to start contributing?

What about adding tracking number informations on Order Page? This is an idea suggested in May, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @matks, @atomiix, @Progi1984, @okom3pom, @NeOMakinG, @boubkerbribri, @PierreRambaud, @eternoendless, @matthieu-rolland, @jolelievre, @ksaandev, @zuk3975, @dependabot[bot], @yannicka, @sowbiba, @jeckyl, @Oksydan, @kpodemski, @JevgenijVisockij, @PululuK, @Hlavtox, @djodjo3!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

Do you speak PrestaShop? – November 2020 edition

$
0
0

Contributing to PrestaShop is not only about the code, it is also about taking part in the PrestaShop translation project! This report will tell you how the translations of the software evolved in November!

Crowdin Monthly banner

Project news

The Hebrew project is progressing!

In just a month, the Hebrew project went from 63% to 83% translated and validated, an increase of 20%! What a great evolution! :scream: Congratulations! Special thanks to danielshapiro9 who has joined us just about a month ago and who has already translated 26,091 words. Thank you for your involvement! And of course, thank you to the other translators of the Hebrew project!

:two_hearts: Special thanks to nanosim2

Many people subscribe to the project(s) of their choice each month, but not so many start translating straight away. For that reason, we would like to thank the ones who rushed into the effort immediately! So lots of love to the dedicated nanosim2!

A few stats

  • 39 members were active on the project this month.
  • A total of 37,492 words have been translated and 37,821 validated.
  • All this in 24 different languages.

Thank you for your involvement!

Top contributors

A lot of you are working every day on Crowdin to have PrestaShop available in many languages, and PrestaShop can’t thank you enough for your dedication! Here are the 10 most active translators and proofreaders for November 2020.

Top 10 translators in November:

 TranslatorLanguage# Words
1.דניאל שפירא (danielshapiro9)Hebrew26,091
2.Zoran Tejic (zotamal)Serbian (Latin)1,690
3.Odelia Yechiel (OdeChan)Hebrew1,495
4.Benjamin Gantikow (bbbenjie)German1,276
5.Ronny (rbuelund)Danish1,051
6.Gabriel Tenita (ggedamed)Romanian962
7.SeongHyeon Cho (jaymz9634)Korean664
8.mirmalEsperanto613
9.Sretko Devič (Chico)Slovenian429
10.jbonelloMaltese384

Top 10 proofreaders in November:

 ProofreaderLanguage# Words
1.דניאל שפירא (danielshapiro9)Hebrew29,380
2.Zoran Tejic (zotamal)Serbian (Latin)1,704
3.Ronny (rbuelund)Danish1,051
4.Gabriel Tenita (ggedamed)Romanian962
5.Benjamin Gantikow (bbbenjie)German778
6.SeongHyeon Cho (jaymz9634)Korean602
7.Sretko Devič (Chico)Slovenian429
8.Adeko Webdesign & Development (Adeko)Dutch420
9.Cha (cafetango)Chinese Traditional393
10.Marcin Orzechowski (Martinovy)Polish210

Congrats, and welcome to our new top contributors! :clap:

Remember, you can see who’s been contributing to our translation project thanks to the Translators page.

Complete translations

Fully translated languages

At the end of November, PrestaShop 1.7.7 was fully available (= 100% translated and validated) in 5 languages:

Chinese traditionalDanishEnglishPortuguese, BrazilSwedish

Languages with the best evolution

Also, the following languages had the best progress thanks to the translation community:

  • Hebrew (+20% to reach 83% validated)
  • Danish (+2% to reach 100% translated)
  • Korean (+2% to reach 99% validated)

Best translation progress for November 2020

A huge thank you to all the contributors!

Of course, this is highlighting the languages that made some progress with new translations; but it doesn’t mean that the languages that aren’t mentioned here aren’t active. Indeed, some editing and rewriting could be going on, but the percentage of translation wouldn’t be modified (since it’s working on strings that are already translated). So let’s not forget about the work of other proofreaders! Thanks to you too!

Languages that need (more) proofreaders

A translated string will not be available in PrestaShop as long as it is not validated. For this reason, it’s important to keep a high level of validated strings vs. translated strings, to make sure everyone benefits from the latest translations!

At the end of November, some languages would still benefit from some proofreading:

  • Spanish, Argentina (98% translated vs 13% validated).
  • Esperanto (60% translated vs 19% validated).
  • Spanish, Venezuela (51% translated vs 11% validated).
  • Galician (98% translated vs 58% validated).
  • Spanish, Mexico (91% translated vs 56% validated).

Languages that need proofreading

If you wish to help to proofread what has been translated, please contact PrestaShop with the language you’d like to proofread: just send an email to translation@prestashop.com. Your help is needed!

If you haven’t joined us on Crowdin yet, it’s never too late! :wink:

If you want to gather your fellow translators to work towards a better harmonization, start a glossary, or anything else, do let me know: I’ll include a word about it in the next monthly report.

Do you have a question, a remark? Don’t hesitate to leave a comment. See you next month! :raising_hand:


PrestaShop Core Weekly - Week 50 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 7th to Sunday 13th of December 2020.

Core Weekly banner

General messages

Dear developers,

We’re three weeks away from the end of the year, and a patch release has been scheduled for PrestaShop 1.7.7. PrestaShop 1.7.7.1 is expected to be delivered in the middle of January 2021.

It would be a lie to say this was not expected: as PrestaShop 1.7.7.0 was such a large release, it would have been an amazing stroke of luck to land it without bugs!

Work on 1.7.7.1 will be carried out during the month of December, and the testing of the release will happen in early January 2021 so it can be released, hopefully, in the second week of January.

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

Back office

Front office

  • #22145: Fix customized product being added to cart, instead of standard one. Thank you @Hlavtox
  • #22074: Add accordion to contact information in footer on classic theme, by @NeOMakinG
  • #22032: Removed override of ps_searchbar, by @Progi1984
  • #21782: Get proper cover for product in cart and cart modal. Thank you @kpodemski
  • #21642: Add inputpattern on quantity fields of product and cart, by @NeOMakinG
  • #20775: Improve classic theme colors, font size and spaces and readability, by @NeOMakinG

Tests

Code changes in the ‘1.7.7.x’ branch

Core

Back office

Front office

Tests

Code changes in modules, themes & tools

PrestaShop contributors website

PrestaShop test scenarios

Faceted search module

Simple HTML table display module

Customer reassurance block module

Custom text module

OnBoarding module

Check payment module

Product Comments module

Theme customization module

Order Notifications on the Favicon module

Issues Bot

PrestaShop-modules

Changes in developer documentation

Quality Assurance module

  • #13: Introduce GitHub Actions to replace Travis, by @matks
  • #8: Enable recording hook calls, by @matks

PHP Developer Tools

  • #41: Correct return value for init command. Thank you @AJenbo

PrestaShop Specifications

Prestashop UI Kit

  • #123: Move dev dependencies into prod to make source importable, by @NeOMakinG
  • #122: Fix radio buttons are less than 20px width on certains pages, by @NeOMakinG
  • #118: Change helpbox positioning style to avoid line break, by @NeOMakinG
  • #117: Fixes select2 hover and adjust border width, by @NeOMakinG
  • #116: Show switch even is no inputs are checked, by @NeOMakinG

Where to start contributing?

What about adding enabling firstname and lastname variables into the Logs email template? This is a bug reported three weeks ago, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @NeOMakinG, @Progi1984, @dependabot[bot], @PierreRambaud, @boubkerbribri, @matks, @Quetzacoalt91, @davidglezz, @micka-fdz, @AJenbo, @jf-viguier, @jolelievre, @Hlavtox, @zuk3975, @PululuK, @atomiix, @neonVoice, @matthieu-rolland, @LouiseBonnard, @kpodemski, @JevgenijVisockij, @djbuch, @sowbiba, @denys202!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

Performance (& PrestaShop)

$
0
0

Introducing a new series of article to talk about performance, benchmarking and PrestaShop!

You may have heard of it, but we’ll soon release a White Paper, which is all about PrestaShop’s performance, how to benchmark it and how it behaves under loads. And what to do to keep it responding under 300ms.

Still, there are a number of matters that can’t be covered in a White Paper - hopefully the first in a series, fingers crossed. Or that can’t be given the space we think they deserve. Or that we’d just love to shine a light on.

So, we are starting a series of articles to do just that.

But let’s start we performance itself. Because, funny thing is, we often talk about performance as something we all understand and it is mostly true: we share the same expectations.

Though, we’re not always on line with its implications.

So, here we go!

Performance is subjective

It may seem counter-intuitive coming from a technical environment, either from web development or any other domain, but still performance is all about capabilities.

Just to illustrate, let’s have a look at this Gatling graph and the active users:

NotANumberSo many numbers with Gatling

Is it high? Or is it low? But compared to what? In which context?

Same thing, if I’m told that in a GCP environment, the maximum write sustained IOPS per GB for a regional SSD drive is 30: does it mean it performs? Is it good or…?

But let’s be even more precise: in our White Paper scope, we assumed a web page should load under 300ms to be deemed acceptable for our users. Hence, we based our benchmarks on this value - and results above this response time where discarded as unacceptable.

Still, 300ms is not telling us anything specific about performance. It’s neither good, nor bad. It’s all a matter of interpretation, analysis and finding what is felt acceptable by our users.

And sticking to it, of course.

At the end of the day, the suitable performance is the one that fulfills your consumers’ expectation.

There’s not “one performance problem”

When you’re dealing with a performance issue, you’re in fact dealing with “the currently visible bottleneck”. And as soon as you’ve managed it, another bottleneck will take its place. Always.

BottleneckFrom Wikipedia with love, CC BY-SA 3.0

Let’s say my application is slow, so I’m analysing it and find out that my crappy hard drive is failing. So I replace it with a newer and faster one. My application is then less slow, for sure, but still not fast enough: I’ve just removed the first visible bottleneck.

For sure, a new bottleneck just appeared, as I now find out that my CPU is not fast enough.

Now that my disk is quickly sending data to my CPU to be processed, it’s not managing it as fast as I would like.

Funny thing is, once I’ve increased my processing capacity, I may find out that my disk is not fast enough once more. Or maybe that the network, connecting to the database, is throttling my application. And once the network capacity is increased, it can be the database itself. And so on.

You get the drill: a performance issue is “the currently visible bottleneck”.

Performance is a continuous thing

UpUpAndAwayThe processor can perform when it is not slowed down by other parts

As said, performance tuning is about removing bottlenecks, one after the other. Which means at least two things:

  • You should only work on one bottleneck at a time in order to evaluate your changes’ impacts
  • There will always be a remaining bottleneck

Added to that, either your application or system will evolve over time (data will increase, files will accumulate and network consumption will grow with load), you will need to adjust your tuning, work on different levers as new requirements will appear.

Every enhancement won’t have the same effect (or any) over your system’s life cycle.

Now that we’re all on the same page about the concepts of performance, we are ready to dive into more crunchy details! Prepare yourselves for the next articles in this series, hopefully in the coming weeks!

Testing Pull Requests on PrestaShop

$
0
0

The PrestaShop company created a Quality Assurance team 4 years ago, in 2016, to improve the quality of the open source project – but also of its products and services. Over the last year, the team has grown quickly, taking quality to the next level! Its field of action has been widening (tests of new services like Prestashop Checkout, specifications reviews, etc.) but the core of the manual testers’ activity remains the same: verifying Pull Requests (“PRs”) on GitHub, and testing every release.

I. Some questions you may have in mind

Why test every Pull Request?

The first question that might come to your mind: why is there a QA verification on each Pull Request? Why not test the release build only?

  • The earlier a bug is detected in the process, the easier it is to find the source of the problem and fix it
  • Testing each Pull Request allows the QA analysts to perform more detailed tests, improving the overall software quality
  • There can be several months between the moment a PR is merged and the time the build is first tested, enough for the author of the PR to have “forgotten” what they did exactly.

The cost of fixing a bug rises over time

How do you choose which Pull Request should be tested first?

This is a legitimate question that pops up regularly. It might be frustrating for a contributor to see its Pull Request waiting for weeks on GitHub with the “Waiting for QA” label, while other PRs are validated and merged the same day they are created.

The QA team uses the following criteria to sort Pull Requests (in order of importance):

  1. The target branch on which the Pull Request is based: the oldest supported branch has the highest priority. We will test 1.7.6.x PRs before 1.7.7.x PRs, and 1.7.7.x PRs before develop PRs. Pull Requests submitted to module repositories usually have the lowest priority.
  2. The priority of the issue the Pull Request is linked to: A PR solving a “must-have” issue should be tested before a “nice-to-have”, and before an issue without any priority (remember that the priority is displayed with labels in Github).
  3. Pull Requests should be tested by submission date, from oldest to most recent.

The above rules is the theoretical policy to rank Pull Requests.

However, it happens that the QA team has to bypass this policy. For example, in addition to Pull Requests submitted to the Core, we also test Pull Requests submitted to PrestaShop’s open source modules. If the number of Module Pull Requests waiting for QA is too high, we might test some of the oldest Modules Pull Requests in priority. We monitor the Pull Request waiting queues and act accordingly.

And sometimes, the maintainers might ask us to test a PR that is required to unblock other tasks.

How long does it take to test a Pull Request?

It highly depends on the complexity of the Pull Request! A small fix, related to a straightforward issue and a detailed “How to Test” description can take as little as fifteen minutes to test, while a large migration PR can require several days.

If a PR is really complex, or if the feature being implemented is complex, there might be a second or even a third test by another QA specialist to validate it fully.

Why does my Pull Request have both the “Waiting for author” and “Waiting for QA” labels?

If the QA analyst in charge asks a question on your Pull Request (for example requiring more details on “How to test”), they will add the “Waiting for author” label, but without removing the “Waiting for QA” one. The latter is kept in order to be able to easily search for the PRs waiting for a response from its author.

So if you see the “Waiting for author” label, it means more information is needed – check the last comments on the PR! The QA team need your help to fully comprehend the PR.

II. Test of a bug fix Pull Request

Pull Requests can be classified into 3 main categories (with a few special cases):

  • Bug fix
  • Improvement
  • Migration

I will first focus on the bug fix Pull Request since it’s the most common type, then detail the differences between a bug fix, an improvement, and a migration PR.

Requirements

Several things are required in order to have a Pull Request being tested on our Github repository.

First of all, the Pull Request template must be followed, and all questions should be answered:

  • A PR should be linked to an issue, so it can be reproduced and qualified before being fixed. This helps the team to answer several questions: is this really a bug? What is its severity? What is the expected behavior? Of course, you’re welcome to fix issues submitted by another contributor (as long as the issue is linked to the PR): this is the magic of open source!
  • The “How to test” field must be filled. It must contain the steps needed to verify the bug is indeed fixed. If possible, it should also contain some information about the possible side-effects of the PR, to help check if there are regressions. Without a clear “how to test”, it’s impossible for us to know what to check on the PR. The most important thing about this part is that it must be a functional“How to test”: PRs are tested by functional QA analysts, not by developers. Although QA analysts have a technical background, we do not work in the code everyday. If your PR requires making technical changes in order to be tested (use a certain hook in the code for example), either attach a test module allowing us to test it, or your PR will need to be tested by the maintainers.

An example of a clear “How to Test” in a Pull Request:Example of a clear "How to Test" in a PR

Other important things:

  • The Pull Request needs to have been reviewed and approved by at least two maintainers (for a PR on the Core, only one approval for a PR on a module)
  • All automated checks must have passed
  • The PR targets the right branch

If there is some information missing, the author, the maintainers or the product team is pinged and the QA analyst waits for this information to start testing the PR.

Reproduce the bug

The first step of Pull Request testing is reproducing the original bug (on the branch, without the PR): this allows the QA analyst to make sure that the “How to test” is clear and also helps to see what are the possible regressions introduced by the PR.

This is why a complete GitHub issue, related to the PR, is necessary: the more information it contains, the easier it is to reproduce and test it.

Check if the Pull Request fixes the bug in the issue

This is the most logical part of Pull Request Testing: after reproducing the bug on the branch, the QA analyst checks out the PR locally and verifies if the bug is indeed fixed, following the instructions in “How to test”.

If the feature is complex enough, or if the “How to test” is not exhaustive, the QA analyst will also test some edge cases in order to make sure that the PR fixes the issue completely.

Regression testing

This is the most important part of our work: usually, the nominal test is OK, and has already been tested by the author.

But the PR might have introduced some regressions somewhere else in PrestaShop. This is unfortunately a common issue in software development: modifying a part of the code might introduce side-effects to other parts that are related, directly or not, to the modified part. This is where our functional knowledge of the solution is really important.

With the PR, the issue, and the information we can get by looking at the code (for the QA analysts who have a technical background and know how to “read” code), we must be able to identify possible side effects of the PR, and test them all – or at least, the most important of them (since we cannot spend hours and hours on each PR).

What happens if the QA analyst finds bugs?

If we find a bug during the test phase, we will try to provide as much information as possible to the author so that they can reproduce it and fix it:

  • Reproduction steps
  • Screenshots or screen records

The QA analyst will post a comment on the Pull Request with the above information, and change the PR labels. If we have a question on the PR (a behavior or a display we’re not sure of, for example) we may ping the maintainers, the product team, or the UX designers.

A comment about a bug on a PR

And if everything is OK?

If we don’t find any issue during our test, then we change the label to “QA Approved”. This allows the maintainers to finally merge the Pull Request in the branch. The change will be available on PrestaShop in the next build of the branch!

QA approved!

Note that everything the QA specialists test is tracked on an internal tool (we use Testrail): it allows us, for example, to resume a test started by another member of the QA team, or to have the detail of what was checked on a specific PR.

III. Improvement Pull Request

Testing an improvement Pull Request is quite similar to the bug fix Pull Request.

Requirements

The requirements are almost the same for a bug fix. The main difference is that the new feature should be adequately specified in writing and greenlighted by the product team or the maintainers: not all improvements are necessarily accepted, so it is important to discuss them with the team in an issue before submitting a Pull Request.

The “How to test” field should describe the new behavior, nominal test cases, possible errors, and how they should be handled, etc. Unless formal acceptance tests have been included in the specifications. Written specifications should be linked in the PR as well.

If some information is missing, the QA analyst will ping the author, the product team and/or the maintainers and wait for this information to be completed before starting to work on the PR.

Check that the improvement works accordingly to the issue and specifications

This step is simple: using the information in the issue, the “How to test” instructions, and the specification (if there is one), then the QA analyst proceeds to check out the Pull Request and try out each new behavior to make sure it works as expected and described.

Regression testing

For improvements, the regression test part is even more important than for bug fixes: the QA analyst must make sure that the original features the Pull Request improves are still working as expected.

To do so, we generally compare two shops (one on the branch with the PR and one without), then perform the same actions on each install, and verify that the result is strictly identical. We can also carry out parts of the test campaign usually performed to verify build releases.

What happens next?

Like with bug fixes, if the QA analyst finds any bug, they will comment on the Pull Request with all useful tips to help the author fix the bug. If the QA analyst notices an unspecified behavior (if the expected behavior is unclear, or for example, if it could be argued that an error should be displayed in a given scenario) they will ping the product team and/or the maintainers to discuss this particular issue.

If everything is fine, the QA analyst changes the label to “QA Approved” and the PR is merged by a maintainer, making it available on PrestaShop in the next build of the branch!

Same as for bug fixes, these tests are tracked on an internal tool. The QA analyst might also update some of the test campaigns to add or modify test cases related to this improvement.

IV. Migration Pull Requests

Migration Pull Requests are quite different to other ones: the purpose of these PRs is to move a page from the Legacy framework to the Symfony framework, while keeping the same features (and optionally adding some minor improvements).

This makes the QA’s work on these Pull Requests quite longer and harder compared to other PRs.

Requirements

The main difference here is that the issue linked to the Pull Request might be just an EPIC listing all the items that should be migrated.

For the “How to Test”, it’s sometimes only “Everything in this page should work as in previous page”. If there is a specification linked to this page, it should be added to the “How to Test”, to help the QA analyst make sure to check everything.

Test of a Migration Pull Request

The test of a Migration Pull Request is quite long: the QA analyst must compare the Legacy page and Migrated page and verify that there are no errors nor missing components (information, links, buttons, etc.), using every configuration they can think of (multi-currencies, multi-languages, multi-store, using different parameters…).

If there is a specification, the QA analyst will follow every point and check that it’s working fine (an example of a migration specification: “Product listing” BO page). If there is not, they must find every detail by themselves.

During this run the QA analyst might use the test campaign created for build releases, and also update these same tests if necessary. That’s why a test on a Migration PR takes longer than a “classic” one (sometimes several days).

Conclusion

Quality Assurance work on Pull Requests can be really time-consuming, but it is critical to ensure the quality of PrestaShop software keeps on increasing.

Make sure that the Pull Requests and issues you submit are thoroughly described, it will help to process them quickly and seamlessly!

Thanks for your contributions :smile:

PrestaShop Core Weekly - Week 51 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 14th to Sunday 20th of December 2020.

Core Weekly banner

General messages

Dear Developers,

New year is coming soon. We expect the activity on GitHub to slow down a bit as some people take time off for holidays. This is also true for for maintainers, product and QA teams.

PrestaShop 1.7.7.1 is on track and quality continues to increase on PrestaShop core as PHPStan is now analyzing PrestaShop code under level 4 thanks to @Progi1984.

By the way, did you notice the new design and features of the Contributors page?

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

Back office

Front office

  • #22447: Add hook to display information in category header. Thank you @Hlavtox
  • #22419: Consistent use of https:// in schema.org itemtypes. Thank you @tswfi
  • #21729: Move product canonical url from tpl to controller. Thank you @micka-fdz
  • #21196: Remove htaccess rule who don’t work. Thank you @okom3pom

Web services

Tests

Code changes in the ‘1.7.7.x’ branch

Core

Back office

Tests

Code changes in modules, themes & tools

Changes in developer documentation

Traces

Customer reassurance block module

Faceted search module

Architecture Decision Records repository

  • #13: Refactor README structure and improve it, by @matks

Stylelint browser compatibility plugin

Search Bar module

Core Weekly Generator tool

  • #67: Add test-scenarios to repo lists, by @matks

PrestaShop contributors website

stylelint configuration

Mail theme example

Example modules

PrestonBot

  • #109: Add BC break label according to the pull request template, by @atomiix

PrestaShop Specifications


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @okom3pom, @matks, @Progi1984, @dependabot[bot], @eternoendless, @PierreRambaud, @boubkerbribri, @nesrineabdmouleh, @NeOMakinG, @Hlavtox, @tswfi, @jolelievre, @atomiix, @zuk3975, @gennaris, @kpodemski, @Arman-Hosseini, @prestamodule, @matthieu-rolland, @JevgenijVisockij, @micka-fdz, @LouiseBonnard, @mrAKAR!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

PrestaShop Core Weekly - Week 52 of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 21th to Sunday 27th of December 2020.

Core Weekly banner

General messages

Dear developers,

Last week, maintainer @kpodemski, helped by @Progi1984 built the ZIP archive for PrestaShop 1.7.7.1 and delivered it to QA team for validation. This is the first time a PrestaShop release is built by someone who is not an employee of PrestaShop company! Congratulations @kpodemski!

As the end of this year is coming, we also wanted to say thank you to all PrestaShop developers for this year, although it has been difficult for many.

Looking forward to 2021 :)

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

  • #22346: Fix minor code issue in FrontController.php. Thank you @PululuK

Back office

Tests

Code changes in the ‘1.7.7.x’ branch

Core

  • #22532: Hook keys must be in lowercase, by @PierreRambaud
  • #22432: Don’t redirect to http from https if it is homepage (Fix Chrome security alert when customer register). Thank you @ludoc
  • #22293: Use PS cache config as driver.cache, by @atomiix

Back office

  • #22535: Method assertCmsCategoryExists doesn’t return anything, it throws an exception, by @PierreRambaud
  • #22249: Create Order - Cart details modal - Fix refresh for cart total, by @sowbiba
  • #22161: Fix group reduction when specific price is set, by @sowbiba
  • #21692: Refresh order products when a product is added or deleted, by @sowbiba

Tests

Code changes in modules, themes & tools

Simple HTML table display module

OnBoarding module

Custom text module

Faceted search module

Check payment module

Product Comments module

  • #94: Bump prestashop/php-dev-tools from 3.12 to 3.13. Thank you @dependabot[bot]
  • #93: Fixed PHPCS Github Action, by @Progi1984
  • #89: Fixing the bug that appeared when anonymize customer last name option has been added.. Thank you @Oksydan

Theme customization module

Order Notifications on the Favicon module

PHP Developer Tools

Changes in developer documentation

  • #840: Update list-of-hooks.md add displayHeaderCategory. Thank you @Hlavtox
  • #837: Explain PR template row impacts, by @matks
  • #830: Introduce tips & tricks in FAQ - 1st tip about hooks. Thank you @zuk3975
  • #829: Bump ini from 1.3.5 to 1.3.8 in /src/themes/hugo-theme-learn/_src. Thank you @dependabot[bot]
  • #106: Allow adding product categories. Thank you @tswfi

Google Analytics module

Example modules

  • #30: Adds demo module for grid extension demonstrations. Thank you @zuk3975

PrestaShop Cleaner module

  • #54: Truncate also search related table “alias”. Thank you @nenes25

PrestaShop Specifications

  • #164: Update advanced_parameters-webservice.md. Thank you @MatShir

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @dependabot[bot], @matks, @boubkerbribri, @Quetzacoalt91, @Progi1984, @kpodemski, @nesrineabdmouleh, @PierreRambaud, @jolelievre, @Hlavtox, @tswfi, @Shoprunners, @zuk3975, @ludoc, @NeOMakinG, @PululuK, @Oksydan, @atomiix, @sowbiba, @nenes25, @JevgenijVisockij, @MatShir!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

PrestaShop Core Weekly - Last week of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 28th of December 2020 to Sunday 3rd of January 2021.

Core Weekly banner

General messages

Happy new year to you, dear contributors and community members! Contributors and maintainers slowly come back from time off and activity increases back on the GitHub repositories.

During December holidays, QA team tested the 1.7.7.1 candidate release and reported some issues of this build. Only one is significant enough to prevent the release from happening: an issue preventing upgrade from PrestaShop 1.6 to PrestaShop 1.7.7. The scope of the release has been updated accordingly.

Once this bug is fixed, the road should be open for 1.7.7.1 public release!

Another notice: following increased performance issues on our current CI pipeline, we are slowly migrating our CI to GitHub Actions. We had previously explored GitHub Actions capacities on modules to validate it as a suitable solution and we are now moving into the next phase.

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Back office

  • #22614: Move SpecificPrice command and handlers into a product sub domain, by @jolelievre

Tests

  • #22567: Migrated Unit Tests & Linter from Travis CI to Github Actions, by @Progi1984

Code changes in modules, themes & tools

Customer reassurance block module

Faceted search module

PrestaShop Virtual Machine

Nightly board

  • #50: Add PWA, correct lint, add noreferrer to link, by @NeOMakinG

Where to start contributing?

What about adding fixing some minor display issues in autoupgrade module? This is a bug reported some months ago, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @jolelievre, @dependabot[bot], @PierreRambaud, @NeOMakinG, @Progi1984!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

Do you speak PrestaShop? – December 2020 edition

$
0
0

Contributing to PrestaShop is not only about the code, it is also about taking part in the PrestaShop translation project! This report will tell you how the translations of the software evolved in December!

Crowdin Monthly banner

Project news

Happy new year 2021!

Happy New Year

We wish you a happy and healthy new year! Thank you for your involvement in the PrestaShop translation projects this past year, you have been wonderful! Let’s continue the great teamwork in 2021! :muscle:

Bosnian language is now fully available

After an incredible rise, from 58% to 100% in just a month, the Bosnian language is now fully available for the 1.7.7 version! A big thank you to Rijad Osmanovic, who is also the top translator AND proofreader of the month. Congratulations! :fire:

:two_hearts: Special thanks to newcomers

Many people subscribe to the project(s) of their choice each month, but not so many start translating straight away. For that reason, we would like to thank the ones who rushed into the effort immediately! So lots of love to the dedicated Jiří VALTR, Store, Kiana Vafaei, Paolo Battistella, Alex Darcy, and Emin çaki!

A few stats

  • 29 members were active on the project this month.
  • A total of 43,689 words have been translated and 38,579 validated.
  • All this in 24 different languages.

Thank you for your involvement!

Top contributors

A lot of you are working every day on Crowdin to have PrestaShop available in many languages, and PrestaShop can’t thank you enough for your dedication! Here are the 10 most active translators and proofreaders for December 2020.

Top 10 translators in December:

 TranslatorLanguage# Words
1.Rijad Osmanovic (rijado)Bosnian21,090
2.Jiří VALTR (GVG)Czech9,832
3.Tatu Wikman (tswfi)Finnish2,085
4.Benjamin Gantikow (bbbenjie)German2,000
5.‫דניאל שפירא‬‎ (danielshapiro9)Hebrew1,473
6.Stamatis (breezer)Greek1,254
7.Odelia Yechiel (OdeChan)Hebrew1,050
8.Federico Ferreri (fferreri)Spanish, Argentina926
9.Zoran Tejic (zotamal)Serbian (Latin)778
10.Sretko Devič (Chico)Slovenian571

Top 10 proofreaders in December:

 ProofreaderLanguage# Words
1.Rijad Osmanovic (rijado)Bosnian21,273
2.Jiří VALTR (GVG)Czech8,759
3.Benjamin Gantikow (bbbenjie)German2,527
4.‫דניאל שפירא‬‎ (danielshapiro9)Hebrew2,155
5.Stamatis (breezer)Greek1,332
6.Gerardas (gerardas)Lithuanian786
7.Zoran Tejic (zotamal)Serbian (Latin)785
8.Sretko Devič (Chico)Slovenian571
9.Rauno Riikman (weaver)Finnish103
10.webdvl (megashopba)Slovak82

Congrats, and welcome to our new top contributors! :clap:

Remember, you can see who’s been contributing to our translation project thanks to the Translators page.

Complete translations

Fully translated languages

At the end of December, PrestaShop 1.7.7 was fully available (= 100% translated and validated) in 12 languages:

BosnianChinese traditionalDanishEnglishFrenchGreekItalianPortuguese, BrazilSerbianSlovakSloveneSwedish

Languages with the best evolution

Also, the following languages had the best progress thanks to the translation community:

  • Bosnian (+43% to reach 100% translated and validated, congratulations! :muscle:)
  • Hebrew (+4% to reach 87% translated and validated)
  • Finnish (+4% to reach 94% translated)

Best translation progress for December 2020

A huge thank you to all the contributors!

Of course, this is highlighting the languages that made some progress with new translations; but it doesn’t mean that the languages that aren’t mentioned here aren’t active. Indeed, some editing and rewriting could be going on, but the percentage of translation wouldn’t be modified (since it’s working on strings that are already translated). So let’s not forget about the work of other proofreaders! Thanks to you too!

Languages that need (more) proofreaders

A translated string will not be available in PrestaShop as long as it is not validated. For this reason, it’s important to keep a high level of validated strings vs. translated strings, to make sure everyone benefits from the latest translations!

At the end of December, some languages would still benefit from some proofreading:

  • Spanish, Argentina (100% translated vs 13% validated).
  • Esperanto (61% translated vs 19% validated).
  • Spanish, Venezuela (51% translated vs 11% validated).
  • Galician (98% translated vs 58% validated).
  • Spanish, Mexico (91% translated vs 56% validated).

Languages that need proofreading

If you wish to help to proofread what has been translated, please contact PrestaShop with the language you’d like to proofread: just send an email to translation@prestashop.com. Your help is needed!

If you haven’t joined us on Crowdin yet, it’s never too late! :wink:

If you want to gather your fellow translators to work towards a better harmonization, start a glossary, or anything else, do let me know: I’ll include a word about it in the next monthly report.

Do you have a question, a remark? Don’t hesitate to leave a comment. See you next month! :raising_hand:


Release of PrestaShop 1.7.7.1

$
0
0

PrestaShop 1.7.7.1 is now available. This maintenance release fixes 41 regressions reported on version 1.7.7.0.

1.7.7.1 is available!

We suggest upgrading your shop quickly in order to benefit from these fixes. Of course, don’t forget to backup before.

Main fixes

Order pages (back-office)

Back-office

Front-office

Core

Read the full changelog here.

Acknowledgements

Contributors to this patch version, from both the Core team and the community at large: Thank you!

Download PrestaShop 1.7.7.1 now!

Since version 1.7.7.1 is a “patch” update to version 1.7.7.0, upgrading from any 1.7.7 version will be easy: features will work better, and modules & themes which worked fine on 1.7.7.0 will work just as well with 1.7.7.1. Upgrades from a standard 1.7.x version should work just as well.

PrestaShop Core Weekly - Week 2 of 2021

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 4th to Sunday 10th of January 2021.

Core Weekly banner

General messages

Dear Developers,

PrestaShop 1.7.7.1 has been released! Don’t forget to update as this patch version fixes 41 regressions reported on version 1.7.7.0.

The kanban for 1.7.7 branch is not empty yet, it still contains unresolved regressions reported on version 1.7.7.0. The next batch of bugfixes for 1.7.7 will be delivered in patch version 1.7.7.2, which is scheduled to be delivered within the next 6 weeks.

In the meantime, @NeOMakinG is building a brand new Landing page for User Documentation.

Finally, maintainers also released a PHPStan extension that should customize the rules being applied by PHPStan on submitted Pull Requests in order to help validating them.

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

  • #22506: Use a QueryBuilder instead of Repository in RequestSql grid. Thank you @PululuK
  • #22462: Improve multiple choice table : Add option to keep table heads fixed. Thank you @PululuK

Back office

Front office

  • #22539: Show help message for PageNotFound for ajax calls, by @matks
  • #21065: Add ‘-‘ to checkout’s summary subtotal if it is discount type. Thank you @oscc-es

Installer

Tests

Code changes in the ‘1.7.7.x’ branch

Back office

  • #22579: Prevent HookDataCollector unserialize() to throw an exception, by @atomiix

Code changes in modules, themes & tools

Prestashop UI Kit

Traces

  • #15: Remove old author statement, by @matks
  • #14: Associated contributions to categories for each contributor, by @Progi1984

Catalog statistics module

PrestaShop open source project

User documentation landing page

Quality Assurance module

Changes in developer documentation

Core Weekly Generator tool

Buy button lite module

Nightly board

Stats Dashboard module

  • #19: Use unit_price_tax_excl instead of product_price for total. Thank you @okom3pom

PrestaShop PHP Informations Tool

Docker images

Customer reassurance block module

Faceted search module

Sales and orders statistics module

  • #17: Use the good column for total turnover. Thank you @okom3pom

Best manufacturers statistics module

Best suppliers statistics module

Cross-selling module

Shopping cart module

Where to start contributing?

What about displaying the customer’s company when B2B mode is enabled in the Back-Office Order page? This is a feature suggestion reported last week by long-term contributor @Hlavtox, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @jolelievre, @NeOMakinG, @nesrineabdmouleh, @matks, @okom3pom, @zuk3975, @boubkerbribri, @dependabot[bot], @Arman-Hosseini, @PierreRambaud, @PululuK, @kaliel86, @atomiix, @Progi1984, @JevgenijVisockij, @infiniweb, @oscc-es!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

PrestaShop Core Weekly - Last week of 2020

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 28th of December 2020 to Sunday 3rd of January 2021.

Core Weekly banner

General messages

Happy new year to you, dear contributors and community members! Contributors and maintainers slowly come back from time off and activity increases back on the GitHub repositories.

During December holidays, QA team tested the 1.7.7.1 candidate release and reported some issues of this build. Only one is significant enough to prevent the release from happening: an issue preventing upgrade from PrestaShop 1.6 to PrestaShop 1.7.7. The scope of the release has been updated accordingly.

Once this bug is fixed, the road should be open for 1.7.7.1 public release!

Another notice: following increased performance issues on our current CI pipeline, we are slowly migrating our CI to GitHub Actions. We had previously explored GitHub Actions capacities on modules to validate it as a suitable solution and we are now moving into the next phase.

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Back office

  • #22614: Move SpecificPrice command and handlers into a product sub domain, by @jolelievre

Tests

  • #22567: Migrated Unit Tests & Linter from Travis CI to Github Actions, by @Progi1984

Code changes in modules, themes & tools

Customer reassurance block module

Faceted search module

PrestaShop Virtual Machine

Nightly board

  • #50: Add PWA, correct lint, add noreferrer to link, by @NeOMakinG

Where to start contributing?

What about adding fixing some minor display issues in autoupgrade module? This is a bug reported some months ago, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @jolelievre, @dependabot[bot], @PierreRambaud, @NeOMakinG, @Progi1984!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

PrestaShop Core Weekly - Week 2 of 2021

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 11th to Sunday 17th of January 2021.

Core Weekly banner

Releases

A quick update about PrestaShop’s GitHub issues and pull requests:

Code changes in the ‘develop’ branch

Core

  • #22808: Do not log addons requests urls, we don’t want it in logs, by @PierreRambaud
  • #22780: Improve Category::getProducts : Avoid short variable names. Thank you @PululuK
  • #22686: Add more data to actionProductCancel hook. Thank you @Hlavtox
  • #22555: Move Product pack classes in Pack subdomain in adapter, by @matks
  • #22223: Be able to don’t add anchor in the URL for getProductLink method, by @PierreRambaud

Back office

Front office

  • #22749: Remove useless redirection on shop logo in multilingual context. Thank you @jf-viguier
  • #21491: Add id_product_attribute to order conf mails. Thank you @IAmWebSA

Tests

Code changes in the ‘1.7.7.x’ branch

Back office

  • #22688: Prevent HookDataCollector unserialize() to throw an exception, by @atomiix
  • #22685: Create Order - Cart details modal - Fix refresh for cart total, by @sowbiba
  • #22673: PerfectScrollBar needs available element, by @PierreRambaud
  • #22542: Handle case where product location is a boolean, by @atomiix
  • #22367: Order view - Refresh shipping tab when product is added, removed or updated, by @sowbiba

Front office

  • #22518: Define when a voucher should be displayed in ‘Your vouchers’, by @atomiix

Installer

  • #22735: Fix installation carrier delay Error for Persian Language, by @matks

Tests

Code changes in modules, themes & tools

Changes in developer documentation

  • #846: Removed duplicate in hook list. Thank you @dpatou
  • #845: Explain why config.xml should be added, by @Quetzacoalt91
  • #844: Update URL to UI kit demo. Thank you @kpodemski
  • #841: how to access to service container in module. Thank you @luigimassa
  • #828: Update infos about hooks actionAdminOrdersTrackingNumberUpdate, actionAdminMetaSave and actionAdminThemesControllerUpdate_optionsAfter, by @matks
  • #549: Update Order page doc. Thank you @MatShir

QA nightly results

Wishlist block module

  • #95: Change customization_required to customizable, by @NeOMakinG
  • #94: Update Parent tab to highlight Modules when on the configuration page, by @Quetzacoalt91

Search Bar module

PrestaShop contributors website

Customer reassurance block module

Faceted search module

User documentation landing page

Docker images

Core Weekly Generator tool

Prestashop PHPStan extension

Email subscription module

Best-selling products statistics module

PrestaShop Specifications

Best categories statistics module

Where to start contributing?

What about fixing an exception being thrown on Credit Slip Back-Office page that happens when a credit slip is downloaded in debug mode? This is a bug reported one month ago, and it is one of our good first issues.

Good first issues are a list of all beginner-friendly improvements and bugs to fix in the project. You can read more about this label on our article about it.


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @dpatou, @atomiix, @NeOMakinG, @dependabot[bot], @Progi1984, @jolelievre, @kpodemski, @Quetzacoalt91, @djodjo3, @PierreRambaud, @matks, @nesrineabdmouleh, @boubkerbribri, @PululuK, @Renrhaf, @jf-viguier, @SD1982, @Hlavtox, @sowbiba, @moncef-essid, @luigimassa, @okom3pom, @LouiseBonnard, @zuk3975, @IAmWebSA, @JevgenijVisockij, @MatShir!

Thank you to the contributors whose PRs haven’t been merged yet! And of course, a big thank you to all those who contribute with issues and comments on GitHub!

If you want to contribute to PrestaShop with code, please read these pages first:

…and if you do not know how to fix an issue but wish to report it, please read this: How to use GitHub to report an issue. Thank you!

Happy contributin’ everyone!

Apache vs. NGINX: Match of the Millennium

$
0
0

Here is the second article in the performance series we started last year, dealing with the old feud between Apache and NGINX.

As you may have heard of, we will soon publish a White Paper about PrestaShop’s performances, how to tune your shop, enhance its response time, and so on.

During these benchmarks, we did compare performances between Apache & NGINX, the usual contenders, with identical setups.

Though this article probably won’t end the long debate between those two, let’s hope it will help you find some clarity on the matter and find out which one is best suited for your configuration. If not both.

Ready to rumble?

As you’ll see, this article will be illustrated by screenshots from the 2D fighting game Garou Mark of the Wolves, belonging to SNK Corporation, as it features a fight between 2 popular webservers. Of course, there is no real fight there, as hinted by our article’s conclusion. Also, this is an hommage to the fighting games genre, at its height in the 90s, to Garou Mark of the Wolves specifically, one of the best ever released and the work of a company at the height of its savoir-faire.

Player Select

Player SelectGarou: Mark of the Wolves belongs to SNK Corporation

In the left corner, we have the Apache webserver, developed by the famous Apache Foundation under the Apache License, and coupled with php-fpm. By default, and design, Apache is fully synchronous, locking a thread (or process, depending on your configuration) for each incoming request.

In the right corner, we have the NGINX webserver, much more recent than Apache, either under a BSD-type license (or a commercial one) and coupled with php-fpm. By default, and design, NGINX has an asynchronous, non-blocking event-driven architecture, meaning it does not create new threads or processes for each connection.

In order to be fair, we have tested them with the exact same technical stack, the same scenario and the exact same constraints.

Here’s a quick reminder of our test parameters:

  • We used PrestaShop version 1.7.6.3 (latest version available at the time) with the same php 7.2 configuration, in a docker environment
  • Both hosted on a not too shabby GCP instance with 4vCPU, 15GB RAM and SSD disks
  • Shops are both configured with 1000 products, 10 suppliers, 2 languages, 5 categories, 1000 orders and a database around 140Mb
  • We ran the same gatlingcrawling scenario, each visitor opening 15 pages per session
  • The target is to get the most visitors while remaining under 300ms (95th percentile)

Hence the following architecture has been used for our tests:

TestingArchitectureThe usual suspects

FIGHT!

FIGHTGarou: Mark of the Wolves belongs to SNK Corporation

So, we have launched our scenario on each environment and now the results are coming… Let’s have a look:

VSUsersOf course, more users the merrier

Are those the results you were expecting?

Round 2!

Now, let’s see the data we gathered during those tests and check if anything odd appears.

First, the response time and the active users graph built with the Gatling scenario:

NGINXRespTimeNGINX active users are just below 100, around 94.

ApacheRespTimeApache active users are above 100, around 110.

Nothing surprising about the active users, given the result we already had.

Also, looking at the servers metrics, we see that, for both of them, we have plenty of available memory:

MemoryUsageMemory usage, not even 10% consumed, we should be fine - excerpt from GCP monitoring

Same thing for network and disk IO, far from their limits for both instances:

DiskIONothing impressive here, especially for SSD disks - excerpt from GCP monitoring

NetworkTrafficNetwork traffic, nothing specific, excerpt from GCP monitoring

More interesting is the CPU, that is almost completely used for both instances:

CPUUsage

Some may say that looking at the CPU is not that much intesting, but others, such as us, may disagree.

If you remember our previous talk about performance, you may recall that performance tuning is about finding out the current bottleneck of a system. So, if our CPU is the bottleneck, then it is probably not the memory, the disk or even the network.

Also meaning that the CPU can do its part properly.

In our case, we can conclude there is not much constraint on the system preventing it from serving the application as expected - or at least that the constraints are similar enough.

Also, remember that our task here is to use as much ressources as possible and CPU time means it is not waiting for IOs (disk or network), or managing RAM (neither swapping, as it should be seen on disk), and so on.

K.O.!

So, now that we’ve seen that our system is all up to work at the CPU level, let’s try to understand what the Visitors result could mean to all the PrestaShops around the world.

As mentioned earlier, Apache and NGINX designs are very different, Apache using threads/processes for each request and NGINX using an asynchronous system (through an event loop) to manage requests.

Though NGINX’s asynchronous design lets it handle enormous charges and loads that Apache cannot, it has a tiny little drawback: latency. This latency, at least partially, is induced by the events management - it takes time to oversee several events at the “same time”, to check the different buffers statuses, and so on. Just like any other system, context switching and status management of its different parts does use resources. And more concurrent connections means more latency.

Where apache reduces latency to a minimum with its synchronous design.

It’s also worth mentioning that the induced latency is higher for dynamic contents (such as PHP) and very low for static contents (such as JPG, PNG, JS, CSS and so on).

So, even if apache can not handle as much requests as NGINX, it can (not always true, but it does happen) process them faster.

Given all that, we now understand that in our very narrow context, where processing dynamic content, and response time, are critical, NGINX is not the best suited.

Just in case you were wondering, achieving top performance could be done by serving static content through NGINX and dynamic ones through apache.

Continue?

ContinueGarou: Mark of the Wolves belongs to SNK Corporation

Rest assured we are aware this benchmark is not an exhaustive one and plenty of parameters could have tiped the scale one way or the other.

Still, we do believe this test is relevant and could help understand which configurations are relevant to a given shop.

But don’t trust us blindly on this, we have provided you with the tools to perform your own benchmarks and even the capacity to enhance those tools to reach your own expectactions in different scenarios. Jut have a look and see what you can do with it.

Also worth mentioning is that, using the CPU up to 98% or 99% can be fine for a benchmark but it’s something you should never allow on a production server. Any additional load would slow down significantly the server and drastically increase the reponse time to a non acceptable threshold.

It is recommended to not go up to 40% a server usage (either cpu usage or load average) in order to deal with peaks and activity surges.

And that should be it for today.

Let us know in the comments if you found anything interesting in this article, if your own test concur with our own or if you have any question regarding this matter!

See you soon for the next article in the series.

About the series

These are the topics that have currently been covered during this series:

  1. Performance (& PrestaShop)
  2. Apache Vs. NGINX : Match Of The Millennium
Viewing all 939 articles
Browse latest View live