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

PrestaShop 1.7.5.0 release candidate is open for feedback!

$
0
0

A few weeks after the beta, the first release candidate for PrestaShop 1.7.5.0 is now ready for you to test!

This is the last step before releasing the final 1.7.5.0. The aim of this version is to verify that all regressions found during the beta have been fixed, and that no new ones are reported by the community users. If nothing is reported by December 10, then the final version of 1.7.5.0 will be made available.

Please note that it is not currently possible to perform an automatic upgrade from the Beta to the Release Candidate. And, it will not be possible either to upgrade from this Release Candidate to the final release.

Go download and install this RC version as a test store, either on your machine or your web hosting, then play with it – and give us your feedback! We need YOU to test this new version of PrestaShop.

Remember, this release candidate version is pre release software. Do not use it on your production shop!

New in the release candidate

Clear cache on module action

PrestaShop now clears the symfony cache when an action is performed on a module (install, uninstall, enable, …) This is necessary because modules can now use Symfony routing and services, so we need to clear the cache if we want these services/routing to be updated.

Changelog

44 pull requests from 14 developers have been merge since the beta release. Read the Changelog for details.

A total of 130 issues have been fixed for the 1.7.5.0 milestone.

News & improvements already announced in the beta release

Features

  • SEO improvements in category page:
    • The first page no longer has a duplicate URL with &page=1
    • The category block is no longer displayed after the first page
    • Improved default URLs for brands & suppliers (now are /brand/123-somebrand and /supplier/123-mysupplier instead of /123_somebrand and /123__mysupplier)
  • Product page:
    • Specific prices can now be edited
    • The SEO section now displays a preview so that you can see how your page would be shown in Google results
    • When a product is taken offline, by default visitors will be redirected to the product’s main category, instead of a “Not found” page.
    • A “stock location” field has been added
  • New module manager page with new categorization (Addons categories) and ability to manage modules by last use
  • Improved style for migrated forms

UX

  • UX improvements on Module pages
  • Helper card in SEO & URL page

New & fixed modules

  • The google sitemap module is now available for PrestaShop 1.7
  • Favicon notifications in Back Office (native module)
  • Buy Button Lite (native module)
  • Cross selling module (native)
  • Viewed products (native)

Installer

  • During install, if there is a more recent stable version of PrestaShop available, it will suggest and allow downloading and installing the latest instead
  • New languages in installer:
    • Hindi
    • Bosnian
    • Mexican Spanish
    • Latvian
    • Galician
    • Arabic

The technical side

Symfony migration

Newly migrated pages:

  • Orders -> Delivery slips
  • Orders -> Invoices
  • Design -> Theme Catalog
  • Design -> Positions
  • Shipping -> Preferences
  • Payment -> Payment Methods
  • Payment -> Preferences
  • International -> Localization -> Localization
  • International -> Localization -> Geolocation
  • International -> Translations (Page 1 out of 2)
  • Shop Parameters -> Order Settings -> Order Settings
  • Shop parameters > Traffic & SEO > SEO & URLs
  • Advanced Parameters -> Database -> DB Backup
  • Advanced Parameters > Webservice (hidden, because the page “Advanced Parameters > Webservice -> Add key” has not been migrated and it does not make UX sense to have only one of them)
  • Advanced Parameters -> Logs
  • Advanced parameters -> Email

Controllers:

Components and dependencies

New hooks

  • action{GridId}GridQueryBuilderModifier
  • action{GridId}GridDefinitionModifier
  • action{GridId}GridDataModifier
  • action{GridId}GridFilterFormModifier
  • action{GridId}GridPresenterModifier
  • actionFrontControllerSetVariables

The developer documentation includes a description of hooks.

Download

You can download PrestaShop 1.7.5 RC here:

Download PrestaShop 1.7.5.0 RC now!

How to help finish the 1.7.5

Your help will be very appreciated to finish the work on PrestaShop 1.7.5. Even if you are not a developer, your feedback has a lot of value.

You can:

If everything is working well, comment this article to tell us, and share on social networks, we also need this feedback ;-)


PrestaShop 1.7.5.0 is available!

$
0
0

After a Beta and a Release Candidate, the long awaited PrestaShop 1.7.5.0 has been released and is available for download. As usual, you can upgrade with the Auto upgrade module. However, considering that the current period is usually critical for merchants sales, for sure, some might prefer to wait for a more appropriate time :-)

1.7.5.0 Available

Changes

A lot has been done to make this “minor” PrestaShop version a reality. Here’s 1.7.5 in numbers:

  • 448 merged Pull Requests (vs 210 in 1.7.3 and 260 in 1.7.4)
  • 2903 files changed (164812 insertions, 129497 deletions)
  • 2079 commits merged
  • 114 issues fixed
  • 75 people contributed!

What’s new

SEO improvements in category page:

  • The first page no longer has a duplicate URL with &page=1
  • The category block is no longer displayed after the first page
  • Improved default URLs for brands & suppliers (now are /brand/123-somebrand and /supplier/123-mysupplier instead of /123_somebrand and /123__mysupplier)
  • Helper card in SEO & URL page

Product page

  • Specific prices can now be edited
  • The SEO section now displays a preview so that you can see how your page would be shown in Google results
  • When a product is taken offline, by default visitors will be redirected to the product’s main category, instead of a “Not found” page.
  • A “stock location” field has been added

Balise Meta - screenshot

Store location is back

Module management

  • UX improvements on Module pages
  • New module manager page with new categorization (Addons categories) and ability to manage modules by last use

New & fixed native modules

  • The google sitemap module is now available for PrestaShop 1.7
  • Favicon notifications in Back Office
  • Buy Button Lite
  • Cross selling module
  • Viewed products

Favicon notification - screenshot

Viewed products - screenshot

Installer

  • During install, if there is a more recent stable version of PrestaShop available, it will suggest and allow downloading and installing the latest instead
  • New languages in installer:
    • Hindi
    • Bosnian
    • Mexican Spanish
    • Latvian
    • Galician
    • Arabic

The technical side

Bugs fixes

You can see the comprehensive list of the 114 bugs fixed for 1.7.5.0 on GitHub.

Top watchers:

  • #10638 - Undefined $urls index in ajax rendered template
  • #9942 - Add new referer error
  • #9916 - Viewed products don’t work on fresh installed PS1.7
  • #9883 - Error in Chrome when hit back from product to category
  • #9697 - Unable to translate some strings in bank wire payment module

Symfony migration

Newly migrated pages:

  • Orders -> Delivery slips
  • Orders -> Invoices
  • Design -> Theme Catalog
  • Design -> Positions
  • Shipping -> Preferences
  • Payment -> Payment Methods
  • Payment -> Preferences
  • International -> Localization -> Localization
  • International -> Translations (Page 1 out of 2)
  • Shop Parameters -> Order Settings -> Order Settings
  • Shop parameters > Traffic & SEO > SEO & URLs
  • Advanced Parameters -> Database -> DB Backup
  • Advanced Parameters > Webservice (hidden, because the page “Advanced Parameters > Webservice -> Add key” has not been migrated and it does not make UX sense to have only one of them)
  • Advanced Parameters -> Logs
  • Advanced parameters -> Email

Controllers:

The style of the migrated forms has been improved.

Components and dependencies

New hooks

  • action{GridId}GridQueryBuilderModifier
  • action{GridId}GridDefinitionModifier
  • action{GridId}GridDataModifier
  • action{GridId}GridFilterFormModifier
  • action{GridId}GridPresenterModifier
  • actionFrontControllerSetVariables

The developer documentation includes a description of hooks.

Clear cache on module action

PrestaShop now clears the symfony cache when an action is performed on a module (install, uninstall, enable, …). This is necessary because modules can now use Symfony routing and services, so we need to clear the cache if we want these services/routing to be updated.

Performance improvements

Lazy loading of the variables returned by the Cart / Order / Product presenters: if some informations are not used in your templates, they are not computed anymore.

PrestaShop ❤ Community

PrestaShop 1.7.5 is above all a community project: from the 75 committers who contributed to this release, 4 are new contributors and over two thirds were community members.

A huge “thank you!” to these 75 fine people: Amazzing, Anas Mammeri, Andy Pieters, anegoda1995, Ansar Mallouli, Antoine THOMAS, Aurélien Pelletier, Axome, azisyus, Ben Wallis, can, Code Utopia, Cristiano Verardi, Dhavalkumar Prajapati, Dheeraj Sharma, fatmaBouchekoua, fouratachour, FranckRIBEIRO, Fransuisse, Guillaume Durand, hadrich-hatem, idnovate, iqit-commerce (Marcin Sz), Ishiki, jf-viguier, Jocelyn Fournier, Johannes Schramm, Jonathan Lelievre, JuanjoSCu, Jérôme H, khouloud.belguith, Lathanao, Leandro F. L, Louise Bonnard, lozal2244, Lucas Rolff, mahdi, Marion François, Mathias Reker, Mathieu Ferment, Matt75, Matthieu Mota, Mehdi, mehdi-ghezal, Michael Käfer, Mickaël Andrieu, okom3pom, Oskar Andersson, Pablo Borowicz, Patrick Weinstein, Pedro Câmara, Pedro Rendeiro, Peter Schaeffer, Pierre RAMBAUD, Presta Module, rdy4ever, Rokas Zygmantas, Rudra Sarkar, Rémi Gaillard, sadlyblue, sallemiines, seleda, Sergey P, Simone, Sébastien Bareyre, Sébastien LE, RUCHEC, Thomas Leviandier, Thomas Nabord, tolispy, Tomas Ilginis, Tony Botalla, unlocomqx, Web Premiere, yosra.akrout, Šarūnas Jonušas!

Thank you again for helping improve the life of more than 270,000 online merchants with ideas, improvements, and fixes!

Download

You can download PrestaShop 1.7.5.0 here:

Download PrestaShop 1.7.5.0 now!

And don’t forget to give us your feedback!

PrestaShop Core Weekly - Week 48 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the last week, from Monday 26th of November to Sunday 2nd of December 2018.

Core Weekly banner

General messages

Dear Developpers,

In case you missed, PrestaShop 1.7.5.0 has been released yesterday. For merchants, the Christmas and Holiday periods are not the best time to upgrade. If, however, you are writing themes and modules, if you are a developer in an agency, or a freelance, or anyone else concerned about this new version or with the migration, please download it, install it, test it and report feedback ;-)

A quick update about GitHub issues

Last week, 51 new issues have been created in PrestaShop’s core repository, and 12 fixed issues have been closed.

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Install

  • #9366: Don’t display the system step if mandatory requirements are OK, by @rGaillard

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.0)

Back office

Code changes in the ‘1.6.1.x’ branch (for v1.6.1.24)

Core

Code changes in modules, themes & tools

Buy Button Lite

  • #10: Update module version to 1.0.1. Thank you @Joukz

Auto Upgrade

MBO

  • #67: Ajax method renamed to be used in a display context as they should, by @jolelievre

Translation files

Viewed products block

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @123monsite-regis, @freakstatic, @dheerajwebkul, @dineshbadrukhiya, @Joukz, @Klemart3D, @mafisz, @nenes25, @sarjon, @sete391, @unlocomqx!

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 49 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the last week, from Monday 03rd to Sunday 09th of December 2018.

Core Weekly banner

General messages

Dear developers,

We are one day before the week-end and the Holidays season. Jingle bells, Jingle bells :-)

At PrestaShop, we would like to thank the most important contributors of the year, and we have already some goodies in stock. What do you think? What kind of things would you like and be proud to wear or to use? Please comment this article or get in touch with us.

A quick update about GitHub issues

Last week, 65 new issues have been created in PrestaShop’s core repository, and 16 fixed issues have been closed.

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.0)

Core

Back office

Front office

Code changes in the ‘1.7.4.x’ branch (for v1.7.4.4)

Core

  • #9316: Fix Cart::autoAddToCart using undefined customer when called from BO. Thank you @prestamodule

Back office

Code changes in the ‘1.6.1.x’ branch (for v1.6.1.24)

Core

Back office

Code changes in modules, themes & tools

Google Sitemap

Auto Upgrade

MBO

Simplify Commerce Payment

  • #13: Removing pricing and sign-up information on the landing page. Thank you @e079852

PrestaShop cleaner

Translation tools bundle

Check payment

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @AJenbo, @ansar21mallouli, @e079852, @efernandesng, @dineshbadrukhiya, @MartinFinkenflugel, @MathiasReker, @Matt75, @MrBaiame, @PeeyushAgrawalWebkul, @prestamodule, @sarjon, @Seleda, @the-ge, @tomas862!

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 50 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the last week, from Monday 10th to Sunday 16th of December 2018.

Core Weekly banner

General messages

Dear Developers,

Did you notice the new banner on the Core Weekly? It now matches the new theme of prestashop.com ;-)

Also, last week, a few 2018 records have been broken on PrestaShop project’s repositories on GitHub:

  • 78 pull request merged in one week, including
  • 40 pull requests merged only for the Core, and
  • 41 pull requests merged from a single contributor, @MathiasReker who is passionate about code lint
  • 80% of the PR were from contributors external to the PrestaShop company

It means two things:

  • You are an amazing team of contributors, contributing more and more with quality pull requests, easier to review and to merge
  • It helps to improve the maintainers productivity on code review and merge

How the end of the year could be better for an open source projet? Congratulations to all PrestaShop developers for this amazing year.

A quick update about GitHub issues

Last week, 37 new issues have been created in PrestaShop’s core repository, and 8 fixed issues have been closed.

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.0

Front office

  • #11777: Do not perform updateProductRequest() AJAX call if no valid data input, by @matks

Tests

Code changes in modules, themes & tools

Google Sitemap

Products in the same category

  • #6: Wrong cache key used in ps_categoryproducts. Thank you @Matt75
  • #8: Deploying v1.0.4 of ps_categoryproducts, by @Quetzacoalt91

MBO

Catalog evalutation

  • #10: Fix notice due to missing translation key. Thank you @Matt75

Visits and Visitors

  • #3: Fix error 500 on Export CSV. Thank you @Matt75

Visitors online

  • #2: getCustomersOnline(): fix SQL clauses to be able to use index. Thank you @Kioob

GDPR

  • #10: Add export feature + update translations + fix translation issue with csv and more, by @Joukz

PrestaFraud

Docker internal images

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @adviva, @ansar21mallouli, @arischmod, @duGuillaume, @hadrich-hatem, @jf-viguier, @Kioob, @kpodemski, @Matt75, @runningz, @sarjon, @SebBareyre! And a very special thank to @MathiasReker for this one!

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 51 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 17th to Sunday 23rd of December 2018.

Core Weekly banner

General messages

Dear Developers,

Happy new year!!!

I wish you more reviewed pull requests, and less issues to report and fix. Of course, don’t forget to take care of you, for a good health is what everybody needs to start anything :-)

As you can see, even if the activity on GitHub is usually a bit calm at each end of the year, some good work has been done.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Web services

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.0

Core

Code changes in modules, themes & tools

Docker

Google Sitemap

GDPR

Catalog evaluation

Visitors online

  • #22: Only compute once file list from the category image directory, by @jocel1

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @alanablett, @ansar21mallouli, @Dan-Orchard, @DelecroixQuentin, @Fabuloops, @hadrich-hatem, @MathiasReker, @Matt75, @olivier-monaco, @sarjon, @Shiryu75, @web-fu, @YosraAk!

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 2018 edition

$
0
0

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

Crowdin Monthly banner

Project news

Happy new year

2018 is over, guys, let’s welcome 2019 with more accurate translations, higher levels of completion and many beautiful projects to work on. Mostly, I wish you all to be happy. And in order to greet 2019 with interesting thoughts, I would like to share a nice initiative from the translation community: Victor Frankenstein’s final report on the Arabic project. Read it, it is available here and it will sure help you with your own translation work!

Brazilian Portuguese is finally completed

After many months during which Brazilian Portuguese kept being translated by our wonderful team but lacked validation, I’m really happy to announce that it has finally reached 100%! It is great news as PrestaShop is growing more and more in Latin America (and therefore in Brazil), it means more merchants will benefit from a completely translated tool to run their business. Well done!

PrestaShop turns global again

Because it needed big changes, the translation page of the PrestaShop was set offline those past few months. From then on, we decided to rework its components so that it can be simpler for people to grasp in one-click the translation rates they are looking for. And there is now a clear distinction between the back office (= the administration) and the front office (= the store). It needs to be improved though, we are still working on tiny details that should be fixed soon, but have a look at it right here, and let us know what you think. ;-)

A few stats

  • 54 members were active on the project this month.
  • A total of 53,978 words have been translated and 31,489 validated.
  • All this in 15 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 we can’t thank you enough for your dedication! Here are the most active translators and proofreaders for December 2018.

Top 10 translators in December:

 TranslatorLanguage# Words
1.prestashop_9331Arabic16,843
2.egumeSerbian (Latin)14,118
3.Rodrigo Laurindo (rblaurin)Portuguese, Brazilian8,071
4.Goran Wihlgaard (Guranius)Swedish3,257
5.Victor Frankenstein (Victor.Frankenstein)Arabic2,519
6.Rivo Zängov (Eraser)Estonian768
7.susanli3769 (emmali73)Chinese Simplified768
8.Mikolaj Klimkiewicz (mklimkiew)Polish734
9.Cha (cafetango)Chinese Traditional712
10.Henry Wong (monkeyjr)Chinese Traditional639

Top 10 proofreaders in December:

 ProofreaderLanguage# Words
1.Rodrigo Laurindo (rblaurin)Portuguese, Brazilian19,428
2.SeongHyeon Cho (jaymz9634)Korean2,428
3.Patrik Lindblom (extendus)Swedish1,581
4.Cha (cafetango)Chinese Traditional1,304
5.Dima Rifai (libanista)Arabic983
6.aafengChinese Simplified768
7.Anouar Talidi (Anouar_Talidi)Arabic766
8.Bojan Lazarevski (BoOoX)Macedonian743
9.lolypop000Slovenian620
10.Ardis Markss (ardis.markss)Latvian497

Congrats, and welcome to our new top contributors!

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 2018, PrestaShop 1.6.1 was fully available (= 100% translated and validated) in 29 languages:

BulgarianCatalanCroatianCzech
DutchEnglishEstonianFrench
French, CanadaGermanGreekItalian
LatvianLithuanianMacedonianNorwegian
PersianPolishPortuguese** Portuguese, Brazil**
RomanianRussianSlovakSlovene
SpanishSwedishTurkishUkrainian
Vietnamese   

For its part, PrestaShop 1.7.5 was fully available in 22 languages!

BosnianBulgarianCroatianCzech
EnglishFrenchFrench, CanadaGerman
GreekIndonesianItalianLatvian
LithuanianMacedonianPersianPortuguese, Brazil
RomanianRussianSlovakSlovene
SpanishUkrainian  

Languages with the best evolution

In comparison with November 2018, the following languages had the best progress thanks to the translation community:

  • Portuguese (Brazil) (+23% to reach 100% approved in 1.7)
  • Arabic (+14% to reach 99% translated in 1.7)
  • Korean (+5% to reach 91% approved in 1.7)

Best translation progress for December 2018

Thanks 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 these proofreaders! Thank 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 we should keep a good level of validated strings vs. translated strings, to make sure everyone benefits from the latest translations!

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

  • Galician (100% translated vs 62% validated in 1.7).
  • Spanish, Venezuela (53% vs 17% in 1.6).
  • Chinese Simplified (100% vs 71% in 1.7).
  • Tagalog (52% vs 24% in 1.6).
  • Arabic (98% vs 73% in 1.6).

Languages that need proofreading

If you wish to help to proofread what has been translated, please contact us with the language you’d like to proofread: just send an email to translation@prestashop.com. We need your help!

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

If you want to gather your fellow translators to work towards a better harmonization, start a glossary, or anything else, do let us know: we’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!

PrestaShop Core Weekly - Week 52 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the week 52, from Monday 24th to Sunday 30th of December 2018.

Core Weekly banner

General messages

Dear Developers,

As you will see the week 52 was calm regarding merged pull requests, most of the team being in vacation after a very active year. But now, it’s time to start to contribute again.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Tests

Web services

  • #11938: Make customer’s product customization information reachable in WebServices, by @eternoendless

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.0

Back office

Code changes in modules, themes & tools

Cash on delivery

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @MathiasReker, @PeeyushAgrawalWebkul, @spolischook!

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 01 of 2019

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the first week of the year, from Monday 31st of December 2018 to Sunday 06th of January 2019.

Core Weekly banner

General messages

Dear Developers,

First week of 2019 is a good start with 31 merged pull requests. But now that everybody is back, let’s continue to contribute like the best weeks of 2018, and aim at minimum 40 pull request merged per week. That would be great! And remember, a small pull request, solving one problem, is easier to review and to merge than a very big one with changes in a lot of files and/or about many issues.

Since the beginning of the year, I have improved the first section of the core-weekly, with new figures about the PrestaShop project repositories on GitHub. In a few week, with a bit of history to show, I will try to share a chart so we can look at the trends.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Install

Code changes in modules, themes & tools

Docker

Circuit Breaker

European VAT number

  • #7: Referencing issue #9928 of PrestaShop/PrestaShop. Thank you @borlum

Changes in Documentation

  • #180: Update _index.md “2007-2019 PrestaShop SA and Contributors”, by @ttoine

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @ansar21mallouli, @borlum, @CaptainYouz, @MathiasReker, @mwht, @sarjon, @sadlyblue, @SebBareyre, @tomas862, @YosraAk!

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 02 of 2019

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 07th to Sunday 13th of January 2019.

Core Weekly banner

General messages

Dear Developers,

Last week, two new repositories have been added to the PrestaShop projet on GitHub:

  • PhpPsInfo, a tool to check if a server has all Apache and PHP prerequisites before starting to install a PrestaShop online store on it
  • Circuit Breaker, a library that allows applications to better handle cases when third party services (payment solutions, solutions using the webservices/API, Addons, …) go offline. It will be progressively be introduced in PrestaShop and its modules.

As usual, your feedback is welcome.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

  • #12014: Unify algorithm for calculating average tax rate for products in a cart, by @eternoendless
  • #12022: Use Symfony Cache Clear in ModuleManager instead of deprecated Cache …, by @matks
  • #12031: Make pre-commit execute linter only if php files have been staged, by @eternoendless
  • #12089: Implement AbstractTypedCollection with tests, by @jolelievre
  • #12125: Fix bad GridFactory service definition, by @matks

Back office

  • #11153: Migration of “Catalog > Brand & Suppliers > Suppliers” listing. Thank you @tomas862
  • #11693: BO: FIX PrestaShop#9853 Search feature value and pagination. Thank you @studiox3
  • #11854: Add customer_message table name into SQL request. Thank you @Klemart3D
  • #11877: introduces moved search and reset type button to the right. Thank you @tomas862
  • #12052: SERP : Avoid mutating a prop directly + fix url encode, by @PierreRambaud

Front office

  • #12023: When downloading a virtual good, check if the order was made by the current user.. Thank you @garnele007

Tests

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Core

  • #11995: Fix undefined INTL_IDNA_VARIANT_UTS46 if intl ICU < 4.6. Thank you @rdy4ever

Code changes in modules, themes & tools

PhpPsInfo

Circuit Breaker

Docker internal images

Search bar autocomplete

  • #1: FO: Select product by Enter-key. Thank you @basjac

PrestaShop Emails SDK

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @ansar21mallouli, @basjac, @garnele007, @Klemart3D, @idnovate, @matthieumota, @studiox3, @tomas862, @rdy4ever, @YosraAk!

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!

Contributor interview: Kristaps Kruzmanis

$
0
0

An Open Source community is more than just PR made by faceless strangers. In order to better understand the people who contribute time and skills to the PrestaShop project, we’re launching a series of interviews with contributors of all ranges. This week, meet Kristaps Kruzmanis, one of our great translators!

Hi Kristaps! First, could you tell us a bit about yourself?

I have spent twenty years in information technology, started with Alcatel PBX and physical networking before moving to IT as a network administrator. Now, I am working on projects with Joomla! and PrestaShop, but also on web hosting and network administration. And I have built a kayak to learn Greenland rolling!

When and why did you get involved in contributing to the PrestaShop project? What motivates you?

My idea is to contribute (to all and from all) so that we can evolve together while never stop learning. I have started to translate PrestaShop because I needed it for friends’ e-commerce shops. It was my decision to use PrestaShop over other platforms, but Latvian language was not translated at this time.

Do you have any advice for first-time PrestaShop contributors?

Yes: think globally, the internet is not local. And the same goes inside e-commerce shops: think globally, make everything short and simple, especially categories. Choose right between categories, tags, etc. which will be which. Install sample data to play with it, this way you can understand how it is built and how it works. Think about delivery or payments before building the shop.

Always tell the clients that they need to have at least one person working on their shop. Never do the clients homework, push them for this person instead. It takes one day to make an e-commerce shop, one week to make the design (with the template and the CSS changes) and ages for a client to insert products. Be aware of this.

What’s the number one thing you’ve learnt by contributing to Open Source projects?

I already knew everything we all know. We just need to remember or Google it.

Thank you Kristaps, we hope to see you more from you as PrestaShop evolves! :)

Resilient PHP applications

$
0
0

No matter how well designed is your project and how many tests you have, at some point your website can become inaccessible.

And this because of your database, or calls to third-party services that are unavailable (e.g: payment methods API, PrestaShop REST API to retrieve modules information, synchronization with an ERP, automatization of warehouse & logistic, etc.).

Instead of thinking everything will be ok, we - as developers - need to manage our systems’ failures.

Indeed, we need to create both resilient systems and websites able to recover quickly from network disasters.

The risks of depending on external services

Assuming that all external services will work just fine is risky because you don’t think about what could happen in case of unavailability:

  • If the payment APIs are not reachable, instead of freezing your shop, you could suggest your customer to come back once the system is ok and offer them a little discount;
  • You ought to be able to install PrestaShop even if translations APIs are not reachable, at least in English;
  • You ought to be able to access your back office, no matter how many external APIs respond.

The collapse of a third-party service should never impact your shop.

Another issue with this kind of naive assumptions is that your system will try to contact again and again the third-party service. As a consequence, it slows down your system and makes the user experience terrible when you could instead find out an alternative response.

There is no good reason to provide such a terrible user experience! period.

Introducing the PrestaShop Circuit Breaker library

The Circuit Breaker design pattern provides strategies and functions to manage the unavailability of the third-party services.

The idea behind the circuit breaker is very simple:

  • Every call to a third-party service is wrapped into a function call from the Circuit Breaker;
  • Once we reach a defined numbers of failures (means the service is unreachable), the Circuit Breaker is “Open”: an alternative response is provided and no calls to the service are done;
  • After a defined amount of time (sometimes called “reset timeout”), the Circuit Breaker tries to access the service: if the service is available it will be used again, otherwise it provides an alternative response.

https://martinfowler.com/bliki/CircuitBreaker.html

Schema from Martin Fowler’s blog.

It implies a big change of mindset for both e-merchants and developers. Indeed, for each process, they will have to think about/anticipate what should be done in case a service is not available.

Just like web developers do when handling old web browsers to design a website, it is possible to think since the beginning about a “degraded experience” when some third-party services are not available, using a “circuit breaker”.

How works the PrestaShop Circuit Breaker?

We were not satisfied with the quality and the constraints of the existing libraries or Symfony bundles:

  • We want something really extensible;
  • We want something fully tested and with high quality standards;
  • We want something that doesn’t require uncommon PHP extensions (like pcntl);
  • And … we stil need to provide PHP 5.6+ compatibility.

This is why we have worked on our own implementation of the design pattern, that relies on the popular HTTP Client Guzzle to make third-party service calls, and on the Symfony Cache component to store and log every call.

Let’s see how it will be used in PrestaShop modules controllers starting from PrestaShop 1.7.6:

$fallbackResponse=function(){return'{
        "error": "service is unreachable right now."
    }';};$this->call('https://api.some-domain.com',$fallbackResponse);

As this library doesn’t depend on PrestaShop core libraries, you can use it in every PHP project:

usePrestaShop\CircuitBreaker\SimpleCircuitBreakerFactory;$circuitBreakerFactory=newSimpleCircuitBreakerFactory();$circuitBreaker=$circuitBreakerFactory->create(['closed'=>[2,0.1,0],'open'=>[0,0,10],'half_open'=>[1,0.2,0],'client'=>['proxy'=>'192.168.16.1:10'],]);$fallbackResponse=function(){return'{}';};$circuitBreaker->call('https://api.domain.com',$fallbackResponse);

What’s next?

We will start to use it on the “so well-known” gamification module soon, and the library will be available in the PrestaShop next minor version (1.7.6). Step by step, we will make PrestaShop’s core and native modules resilient to networks failures.

The Circuit Breaker library is developed and distributed under the MIT license, like many other librairies and dependencies already included in the PrestaShop project (example: Symfony). This way, it is possible for anyone to use it with any other project. Your feedback and your contribution are welcome: feel free to open pull requests and issues about your needs.

PrestaShop Core Weekly - Week 03 of 2019

$
0
0

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

Core Weekly banner

General messages

Dear Developers,

The first weeks of 2019 are promising, let’s continue on this rythm.

In order to help the community to better collaborate, some work is currently done on the forum engine, Invision Community. This include a better spam filter, and fixing the notification emails issues. More information will be published on the forum when it will be in production.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Tests

Install

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Core

Code changes in modules, themes & tools

PrestaShop on Docker

Docker internal images

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @ansar21mallouli, @CaptainYouz, @dennispw, @luigimassa, @MathiasReker, @rokaszygmantas, @sarjon, @sebastienhouzet, @SebBareyre, @YosraA!

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 04 of 2019

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 20th to Sunday 27th of January 2019.

Core Weekly banner

General messages

Dear Developers,

You will notice that the GDPR module has been improved thanks to a contributor from the community. As improving modules is sometimes easier than to improve the PrestaShop project’s core, this is a very good way to start to contribute. Just have a look at the Native modules integration kanban on GitHub, and pick something up in the todo list.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

  • #12074: Refacto PreferencesController to use annotations, by @matks
  • #12076: Refacto ProductPreferencesController to use annotations, by @matks
  • #12077: Refacto ThemeCatalogController to use annotations, by @matks
  • #12094: Refactor OrderPreferencesController to use annotations, by @matks
  • #12096: Fix access rights to Administration page, by @matks
  • #12097: Refacto PaymentMethodsController to use annotations, by @matks
  • #12098: Refactor Shipping/ referencesController to use annotations, by @matks
  • #12099: Refactor MaintenanceController to use annotations, by @matks
  • #12140: Default carrier name was displayed as 0. Thank you @Gitdyr
  • #12240: Adds missing argument in MetaController which caused page crash. Thank you @tomas862

Front office

Tests

Install

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Core

Back Office

Code changes in modules, themes & tools

GDPR

  • #54: [*] Prefixing variable to avoid javascript conflicts on Backoffice. Thank you @Shiryu75

Composer script handler

eslint-config-prestashop

European VAT number

ADR

  • #2: Create 1st ADR to initialize the usage, by @matks

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @ansar21mallouli, @Gitdyr, @MathiasReker, @sarjon, @SharakPL, @Shiryu75, @tomas862, @YosraAk!

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 05 of 2019

$
0
0

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

Core Weekly banner

General messages

Dear Developers,

Previous weeks, many pull requests have been merged to prepare an update for PrestaShop 1.7.5. Just have a look at the PrestaShop 1.7.5.1 milestone on GitHub: there are only 3 issues and 3 pull requests left, and it will possible to build it.

If you read this core weekly until the bottom, you will also notive that the code lint done on the Auto-upgrade module has been merged.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

Front office

Webservices

  • #12201: Fixes sql exception when creating a product_option without values. Thank you @mowcixo

Tests

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Core

Back Office

Code changes in modules, themes & tools

Auto-upgrade

Mail alerts

  • #45: Corection wrong working as widget. Thank you @mbareja

Docker Internal Images

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @ansar21mallouli, @arnaudschaeffer, @CaptainYouz, @MathiasReker, @mbareja, @mowcixo, @rokaszygmantas, @SebBareyre, @shaffe-fr, @Sahnounmannaii, @simondaigre, @vhessam, @YosraAk, @zapalm!

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 in 2019 and beyond

$
0
0

When working in a project as big and complex as PrestaShop, it’s easy to get too focused on what you are doing right now, and lose sight of the big picture. However, it’s very important not to do that, because every decision we take must be coherent with a bigger plan. In fact, I think that the only way to allow a project such as this to be sustainable, coherent and predictable, is to consistently challenge every decision in light of a long-term vision.

But what’s the vision for PrestaShop’s future architecture? When I arrived at PrestaShop about a year and half ago, the migration to Symfony had been ongoing for a while, but there was no clearly defined goal in mind — or at least, none that was written down somewhere I could find.

So a little more than a year ago, we started working on this subject. Until now, we had never managed to go beyond a couple of diagrams and word-of-mouth discussion, and actually write it down so that it could be shared with everyone.

It started with an in-depth analysis of the state of things in PrestaShop 1.7. What are the main components? How do they interact? Where are the main pain points?

Once we had all the building blocks laid out, we started thinking how we could rearrange them to make them work better, disregarding current constraints. What would we want PrestaShop to look like?

This exercise allowed us to have a much better view of what we needed to do: once we had point A and point B, now we only needed to figure out a plan to “connect the dots” and go from the starting point to the end point. And while we get there, every decision we make has to bring us closer to B.

During the last year, you may have seen me at PrestaShop events describing (although very briefly) what point B, aka The Future Architecture, looks like. Either way, I think you will enjoy reading this updated, more thorough insight of Where we are, Where we are going, and Some ideas on how we’ll get there.

Since this analysis is quite long and very information-dense, we decided to split it in four parts, that we’ll publish during the following weeks:

  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”)

Stay tuned!

PrestaShop Core Weekly - Week 06 of 2019

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase from Monday 04th to Sunday 10th of February 2019.

Core Weekly banner

General messages

Dear Developers,

Last week, Pablo Borowicz, PrestaShop’s lead developer, started a series on the blog about the architecture of the PrestaShop open source project. The next chapter is currently under review and should be published this week.

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

Code changes in the ‘develop’ branch (for v1.7.6.0)

Core

Back office

  • #11470: Improve birthdate validation. Thank you @zessx
  • #11894: Migration of international/localization/currencies page form and some exchange rate actions. Thank you @tomas862
  • #12128: Add migrated customers page helper card, by @matks
  • #12479: Avoid module sorting function warnings when module data is invalid, by @matks

Front office

  • #12406: Revert “Fix translation on account creation email error”, by @marionf

Tests

  • #12021: Add unit tests for CommandBus, DocumentationLinkProvider and UrlFileChecker, by @matks
  • #12431: TE: update product quantity test. Thank you @YosraAk
  • #12480: Add a descriptif comment for the broken test “shopping_carts_view”. Thank you @YosraAk
  • #12481: Add a descriptif comment for the broken test “create_product_with_combination”. Thank you @YosraAk
  • #12482: Add a descriptif comment for the broken test “Delete category”. Thank you @YosraAk
  • #12485: Add a descriptif comment for the broken test “create_feature”. Thank you @YosraAk
  • #12486: Add a descriptif comment for the broken test “read_more_module”. Thank you @YosraAk
  • #12487: Add a descriptif comment for the broken test “configuration”. Thank you @YosraAk
  • #12491: TE: add a descriptif comment for the broken test “category”. Thank you @YosraAk
  • #12492: Add a descriptif comment for the broken test “page”. Thank you @YosraAk
  • #12493: Add a descriptif comment for the broken test “linkWidget”. Thank you @YosraAk
  • #12494: Add a descriptif comment for the broken test “sort filter file”. Thank you @YosraAk
  • #12496: Add a descriptif comment for the broken test “autoupgrade”. Thank you @YosraAk

Code changes in the ‘1.7.5.x’ branch (for v1.7.5.1)

Core

Back Office

Front office

Code changes in modules, themes & tools

Auto-upgrade

eslint-config-prestashop

Viewed products block

  • #13: Fix critical error with previous version of Prestashop. Thank you @Matt75
  • #15: Deploy v1.2.1 of ps_viewedproduct, by @matks

Docker Internet Images

Changes in Documentation


Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @Matt75, @rokaszygmantas, @sarjon, @tomas862, @TysonAndre, @YosraAk, @zessx!

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? – January 2019 edition

$
0
0

Contributing to PrestaShop is not only about the code, it’s also about taking part in the PrestaShop translation project! This report tells you how the translations of the software evolved in January.

Crowdin Monthly banner

Project news

New projects

2019 arrived with two translation projects coming out of the ground, how nice it is to start the year with two extra languages to work on: let’s give Flemish and Valencian a warm welcome! We can now count 76 translation projects available on Crowdin, and it is quite a nice score regarding the involvement it implies. We are proud of our community. Be part of it, join Peter Visser and start building a more and more international solution all together!

Script and data difficulties

Last month has been a bit of a problem regarding some script parameters. So basically, this report will only focus on the first half of January, since our data stopped to be retrievable on the 14th… before going back these past few days. It is fixed now, but we could not succeed in restoring the missing data part. Sorry about that. As for the translations, don’t worry, you will not lack any wording, everything is up-to-date. And that is the most important.

Special thanks to newcomers

Many people subscribe to the project(s) of their choice each month, but not so many start translating straightaway. For that reason, we would like to thank the ones that kind of rush into the effort immediately, aha! So lots of love to the dedicated CMLEUNG, Svemirac, malik.krak, Rolige, Laimonas Mituzas, and amar505. See you soon on Crowdin… and PrestaShop. ;-)

A few stats

  • 24 members were active on the project this month.
  • A total of 261,175 words have been translated and 13,972 validated.
  • All this in 19 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 we can’t thank you enough for your dedication! Here are the most active translators and proofreaders for January 2019.

Top 10 translators in January:

 TranslatorLanguage# Words
1.Peter Visser (MARK-APP)Flemish, Dutch241,932
2.Rolige Ecommerce Solutions (Rolige)Spanish, Mexico5,383
3.Goran Wihlgaard (Guranius)Swedish4,903
4.amar505Hebrew2,604
5.Cha (cafetango)Chinese Traditional1,692
6.Patrik Lindblom (extendus)Swedish1,120
7.NikhomThai1,101
8.Carlos Loyola Vásquez (carlosloyola14)Spanish, Peru785
9.SeongHyeon Cho (jaymz9634)Korean591
10.CMLEUNGChinese Traditional508

Top 5 proofreaders in January:

 ProofreaderLanguage# Words
1.Patrik Lindblom (extendus)Swedish6,407
2.SeongHyeon Cho (jaymz9634)Korean4,762
3.Cha (cafetango)Chinese Traditional1,692
4.ols (olegsv)Hebrew772
5.Marcin Orzechowski (Martinovy)Polish287

Congrats, and welcome to our new top contributors!

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

Complete translations

Fully translated languages

On the 14th of January 2019, PrestaShop 1.6.1 was fully available (= 100% translated and validated) in 29 languages:

BulgarianCatalanCroatianCzech
DutchEnglishEstonianFrench
French, CanadaGermanGreekItalian
LatvianLithuanianMacedonianNorwegian
PersianPolishPortuguesePortuguese, Brazil
RomanianRussianSlovakSlovene
SpanishSwedishTurkishUkrainian
Vietnamese   

For its part, PrestaShop 1.7.5 was fully available in 23 languages!

BosnianBulgarianCroatianCzech
EnglishFrenchFrench, CanadaGerman
GreekIndonesianItalianLatvian
LithuanianMacedonianPersianPolish
Portuguese, BrazilRomanianRussianSlovak
SloveneSpanishUkrainian 

Languages with the best evolution

In comparison with December 2018, the following languages had the best progress thanks to the translation community:

  • Chinese Simplified (+4% to reach 92% translated in 1.7)
  • Korean (+2% to reach 93% approved in 1.7)
  • Polish (+1% to reach 100% approved in 1.7)

Best translation progress for January 2019

Thanks 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 these proofreaders! Thank 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 we should keep a good level of validated strings vs. translated strings, to make sure everyone benefits from the latest translations!

On the 14th of January 2019, some languages would still benefit from some proofreading:

  • Galician (100% translated vs 62% validated in 1.7).
  • Spanish, Venezuela (53% vs 17% in 1.6).
  • Chinese Simplified (100% vs 71% in 1.7).
  • Tagalog (52% vs 24% in 1.6).
  • Arabic (98% vs 73% in 1.6).

Languages that need proofreading

If you wish to help to proofread what has been translated, please contact us with the language you’d like to proofread: just send an email to translation@prestashop.com. We need your help!

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

If you want to gather your fellow translators to work towards a better harmonization, start a glossary, or anything else, do let us know: we’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!

Release of PrestaShop 1.7.5.1

$
0
0

PrestaShop 1.7.5.1 is now available.

This version fixes bugs and regressions of the 1.7.5.0 version. It also integrates the latest security fixes from Symfony, a core dependency. We strongly encourage you to upgrade your shop as soon as possible.

Of course, don’t forget to backup before.

Main fixes

  • Merchants can now choose if they want the attribute names on the product page title (“Display attributes in the product meta title” in Shop Parameters > SEO & Urls)
  • Fixed a bug preventing module developers to extend grids
  • Latests security fixes from Symfony
  • Fixed visual problems in the BO when using right-to-left languages
  • Fixed pagination issues in pages using the new grids
  • Switching combinations in the FO is now faster
  • Fixed an exception when sending an email in some systems

Full Changelog

  • Back Office:
    • Bug fix:
      • #12507: Add hookDispatcher in GridFactory constructor, HookDispatcherAwareTrait has a safer getter
      • #12234: Force refresh of tinymce editors in product page step 1
      • #12402: Fix first attribute generation when not choosing first attribute
      • #12372: Fix provider warehouse routes
      • #12370: RTL fixes: profile, select and notification dropdown, popover tooltips, stock quantity arrows
      • #12395: Change stock alert z index to be on top of header
      • #12354: Fix cancel button on Safari browser
      • #12361: Refacto SearchParameters and SearchParametersResolver for pagination
      • #12205: Fix bulk module actions
      • #12277: Prevent usage of enter key in search hook input
      • #12236: SERP: Textarea from tinymce requires jquery to return the text value
      • #12016: Update module & service link in upgrade
      • #12196: Fix RTL glitches
      • #12111: Keep showcase cards closed
      • #11923: Fix error in SERP component when using non-alphanumeric characters
  • Front Office:
    • Improvement:
      • #12327: Make it possible to enable/disable attribute name on page title
    • Bug fix:
      • #12337: Slow combination update due to delay before request
  • Core:
    • Bug fix:
      • #12543: Update vulnerable dependencies
      • #12389: Fixed grid hook calls
      • #12292: Allow arabic numbers in link rewrite
      • #12106: Robots.txt with multilang/multishop
      • #11995: Fix undefined INTL_IDNA_VARIANT_UTS46 if intl ICU < 4.6
      • #11814: Fix typos and duplicate code in upgrade SQL
  • Installer:
    • Bug fix:
      • #11937: Check if intl is installed in installer

Download PrestaShop 1.7.5.1 now!

Contributors to this patch versions, from both the Core team and the community at large: Jonathan Lelievre, Mathieu Ferment, Mickaël Andrieu, Pablo Borowicz, Pierre RAMBAUD, rdy4ever, Thomas Nabord. Thank you!

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

PrestaShop in 2019 and beyond, part 1: The current architecture

$
0
0

This is the first in a series of articles we introduced a couple days ago, that aims at describing where we are, where we are going, and some ideas on how we’ll get there.

As pointed out in the introduction article, the first step to be able to map a path into the future is to understand where you stand currently. In this article, we’ll try and describe the current architecture of PrestaShop.

The Current Architecture

(or “Point A – Where We Are”)

Here’s an overview of what PrestaShop 1.7 looks like as of early 2019.

Figure 1: Basic overview of PrestaShop 1.7's architecture, early 2019(Figure 1: Basic overview of PrestaShop 1.7’s architecture, early 2019)

PrestaShop’s architecture can be separated in two main logical sections:

  • The Front Office (or FO) – the public-facing site of a shop,
  • The Back Office (or BO) – where merchants manage their shop.

In Figure 1, this is represented by two big, blue(ish) columns.

Each of these sections can be themselves separated in two parts, which are common to all web applications:

  • The front-end– the part that essentially runs in the browser,
  • The back-end– which runs in the server.

In Figure 1, this separation is represented by a horizontal division with a dotted line, where “Browser” represents the front-end, and “Server” the back-end.

Overview

If we analyze how the back-end is structured, we can find some common elements to BO and FO:

  • Database
  • Core Business
  • Modules

Like most web applications of this kind, PrestaShop is heavily Database-driven. That’s where the Single Source of Truth is found. This means that all data is stored there, regardless of whether it’s used in the BO or FO.

In Figure 1, the database is placed a little outside the diagram to point out to the fact that it’s a system of its own that could be on a separate server, in a cluster, etc.

The purple cloud depicted above the Database is what we call Core Business. It’s the big ensemble of code that manages what makes PrestaShop PrestaShop, also referred as “business logic”. It includes controllers, helper classes, and such. We will cover this aspect in more detail further down this article.

Then, there’s Modules. Modules allow to customize PrestaShop in many ways. They interact with the Core either by hooking into extension points (which are placed throughout the code) or by replacing core components with their own (using either the legacy Overrides system or symfony service definitions).

While in this diagram we have placed Modules on the Back-end side of things, they can actually have an impact on Front-end as well. We will address that when discussing modules.

PrestaShop has mainly two ways of presenting information to the browser: HTML pages and Structured data (XML or JSON).

Controllers will mainly output HTML pages. The structure of those pages is defined by a theme, which transforms controller-provided data into HTML. This is true both for the FO and BO.

In Figure 1, themes are depicted by pink(ish) columns overlapping both the front-end and the back-end.

PrestaShop 1.7 supports third-party themes in FO, but not in BO. Confusing as it may seem, there are two BO themes, called “default theme” and “new theme”. Don’t worry, this will be explained in the themes section.

PrestaShop has two API interfaces:

  • BO API – used to serve information to VueJS-based pages (currently Translations and Stock management),
  • Web services – used to integrate 3rd party services.

While Web services can output XML or JSON data, the BO API is JSON-only.

On the front-side, things vary a lot depending on the theme. We will cover this when we address themes.

Now that we have a general idea of how things work, let’s dive a little deeper into that purple cloud…

The Core Business stack

While controllers will be different in BO and FO, pretty much all of PrestaShop’s PHP code is shared between those two environments. This code is split in four logical subsystems:

  • Legacy code – located in /classes and /controllers
  • Adapter code – located in /src/Adapter
  • Core code – located in /src/Core
  • Symfony code (or “PrestaShop Bundle”) – located in /src/PrestaShopBundle

To explain this structure, let’s look back a little.

Up until 1.6.0, all shared code lived in the classes directory. One of the main problems with the legacy architecture is that classes are both static and too big. Since refactoring all legacy classes would take a very long time, during the development of 1.6.1 it was decided to separate legacy code from new, loosely coupled code.

This decision aimed at gradually producing a cleaner codebase without introducing breaking changes, thus giving module developers time to adapt their modules.


Recap: Why it’s important to have uncoupled code

Code coupling is the degree of interdependency of two modules. As coupling increases, the system starts exhibiting some common problems:

  • Changing something in A forces you to change something in B, then C, then D…
  • Change something in D may produce unwanted, unforeseen effects in A, resulting in bugs.
  • It’s harder to adapt or reuse code, because paths have been pre-established (referred to as “hard coding”).
  • It’s harder to test modules independently from each other.

Uncoupling code via careful design using SOLID principles allows to tackle those issues.


Following this, the structure was split in three pieces:

  • Legacy code – which remained as it was
  • Core classes – new, clean code
  • Adapter classes – a bridge to legacy classes, allowing to avoid hidden legacy dependencies in Core code

During early development of 1.7, with the introduction of Symfony framework, a fourth, Symfony-based subsystem was added: PrestaShopBundle. While the rest of the code is pretty much framework agnostic, the PrestaShopBundle is a Symfony bundle and therefore contains Symfony-specific functionality.

Here’s how it stacks out now:

Figure 2: The core business stack(Figure 2: The core business stack)

In Figure 2, we can appreciate the four subsystems described above.

If you’re thinking that this separation is excessively complex, you are right! But this transition phase is necessary to allow us to move forward progressively. Here’s how.

Notice the dotted yellow zone labeled temporary code? Code within that yellow zone is, you guessed it, temporary. This means that that code will sooner or later be moved to the Core or PrestaShop Bundle stack, and once that zone it’s empty, it will be deleted. Of course, such a change won’t be done in a minor version, so you can expect these four stacks to be present for the whole lifetime of 1.7.

If you look closely at the relationships between each stack, you’ll see that code outside the temporary code zone does not interact directly with legacy classes. As explained before, the Adapter layer sits between the Legacy and the “new” code to ease up the transition of code from the Legacy stack to the Core stack.

How does that work?

Whenever a Core (or PrestaShopBundle) class needs something provided by a Legacy class, instead of using the Legacy class directly, it delegates that task to an Adapter, which itself uses the Legacy class (see Adapter pattern).

Here’s where it gets interesting. Generally, these Adapters implement an interface declared in Core (even though it hasn’t always been the case, new classes do). Making consumers of that Adapter depend on the interface instead of the Adapter class itself (see Dependency Inversion principle) will allow to reimplement Adapter classes in Core progressively, without having to change the existing code that depends on them.

Why not use the Legacy class directly?

For starters, most legacy classes are static, and since by definition they cannot be injected, it would result in coupled, untestable code. In addition, the ones that are not static generally still have too many responsibilities (see Single responsibility principle) and/or too many public methods or properties (see Open/closed principle), so they cannot be made to implement a proper interface.

As a side note, you may have noticed that all stacks contain Hooks as extension points, but only the Legacy stack has overrides. We’ll address that in the next part in this series (no spoiling!).

Controllers

PrestaShop is based on the MVC pattern, where Controllers are in charge of handling requests and returning responses, ideally delegating the hard work on dedicated services.

Controllers are divided in two big families: those that handle FO requests, and those that handle BO requests.

Figure 3: Core controllers(Figure 3: Core controllers)

As Figure 3 describes, there are currently several kinds of controllers:

  • FO controllers – which handle FO requests
    • Legacy controllers
      • Native controllers (FrontControllers)
      • Module controllers (ModuleFrontControllers, based on FrontControllers)
  • BO controllers – which handle BO requests
    • Legacy controllers
      • Native controllers (AdminControllers)
      • Module controllers (ModuleAdminControllers, based on AdminControllers)
    • Symfony controllers
      • Framework controllers (FrameworkBundleAdminControllers)
      • API controllers (ApiControllers)

There are no controllers for Web services, since this system is mainly configuration-based and very tightly coupled to ObjectModel.

All legacy controllers are located in the — you guessed it — legacy stack, and use Smarty for templating. Symfony controllers, on the other hand, are located in the PrestaShopBundle and use Twig.

As the migration to Symfony progresses, legacy BO controllers are being migrated from the legacy stack to the PrestaShop Bundle stack. Once the BO migration is complete, there will no longer be any legacy controller in the BO.

Themes

There are two kinds of themes in PrestaShop:

Since FO themes work on top of legacy controllers, they are based on Smarty. They all integrate a shared core javascript library which is called “core.js”, which has jQuery 2.x bundled in.

In 1.7, PrestaShop introduced the parent-child theme feature, which allows themes to extend other themes. This feature makes it much easier to build custom themes.

PrestaShop comes bundled with a default FO theme, called “Classic”. Since the Classic evolves with PrestaShop, a great deal of community 1.7 themes are “children” of Classic, which allows them to inherit all the improvements that are added to Classic in every version, with minimal or no work required for their authors. Keep this detail in mind, we’ll discuss a major side effect of this in the next article.

Regarding BO themes, there are a couple subtleties to be aware of.

First, as explained before, BO themes are not interchangeable, but there are two of them nonetheless: default and new theme.

So why are there two? Well, legacy controllers are Smarty-based, while Symfony controllers are Twig-based. As a result, there’s a theme for each one: legacy controllers use the default theme, while Symfony ones use the new theme. As controllers are progressively being migrated to Symfony, templates are transformed from Smarty to Twig and moved from the default to the new theme.

In order to make things more interesting, the default theme is based on Bootstrap 3 and integrates jQuery 1.x, while the new theme is based on PrestaShop’s UI kit (available on GitHub), which itself is based on Bootstrap 4 and jQuery 3.x.

But there’s more.

Here’s what was said when announcing the architecture of 1.7:

Twig is Symfony’s templating language. In version 1.7, it will be used for all pages that are rewritten to use Symfony (Product page and Modules page), but NOT for the global interface (menu, header, etc.) nor the non-rewritten pages, which will still use Smarty. The two templating engines will be available, side by side, during the transition phase.

This means that the global interface is still being handled by the default theme, even in Symfony pages, which in part explains why Symfony pages may sometimes be slower than legacy ones (because they use both Twig and Smarty). The good news is that this is a temporary issue, which will get better when everything has been migrated to Twig and Symfony.

Finally, there’s Vue pages. Vue pages are hybrid: half-Symfony, half-API based BO pages. In those pages, the page’s skeleton is first rendered by a Symfony controller (therefore, based on the new theme), and then a VueJS application takes over in the browser and draws its content based on data sent by the BO API.

As stated before, currently only the Stock management and Translation pages are built on this technology. Even though we think that this is the way of the future (we’ll cover that in more detail later in this series), we find that going down this path in minor version releases would produce too many major extensibility and backwards incompatibility issues. Therefore, there will probably be no new Vue/BO API pages in 1.7.

Modules

The Modules system provides a plug-in approach to added functionality. As explained before, it relies mainly on specified extension points called “Hooks,” but their influence and deeply rooted relationships can go much further than that.

If you look at the Modules block at the center of Figure 1, you’ll notice that there are lots of arrows coming and going from it. Let’s explore these relationships.

Like we said, the main path for Module integration is Hooks, which are placed throughout the system. Modules can attach to them in order to provide or alter features.

There are two types of hooks:

  • Display hooks– Integrated mainly (but not exclusively) in templates, they allow modules to inject content that will be displayed somewhere in a page.
  • Action hooks– Allow modules to be informed of something happening in the system, and optionally alter the system’s behavior by modifying provided data.

The module system provides several other features:

  • Module controllers – Modules can add new routes and custom pages in the FO or BO.
  • Payment options – Payment modules can add payment options in the checkout process.
  • Declaring and sharing services – Since 1.7.4, modules can use and declare Symfony services.

Modules can also be used to customize PrestaShop:

  • Class override system – This system allows a module to replace any class in the Legacy stack.
  • BO template overrides – Allows to replace templates from the new theme in the BO.
  • Service overrides – Since 1.7.4, modules can replace Core services with their own.
  • CSS and JS injection – Modules can also inject style and javascript code into a page.

In addition, modules can be customized by Themes. Themes supporting a given module can override the module’s own FO templates in order to improve their integration.

As you can see, the module system has many features, making modules very powerful. Modules have full access to the Core system, and even if modules submitted to the Addons Marketplace go through a quality and security review process, integration can go very deep into the Core. This power comes with a cost: the deeper the integration and customization, the more risk of upgrade and interoperability issues there is.

And more…

If you got here, now you know PrestaShop is much more complex than it can seem to be. Remember the overview at the top of the article? Take a look at this more detailed version of it now:

Comprehensive overview

There are actually many more other subsystems than the ones we described, too many to cover them all in detail here. Just to name a few more:

  • Translation and localization – PrestaShop can be translated and localized to any language and country: currencies, taxes, shipping locations, and more.
  • Update – PrestaShop supports downloading and updating modules, and it can also update itself using the Autoupgrade module.
  • Export/Import – Merchants can migrate their data from/to PrestaShop.
  • Emails – All emails sent by PrestaShop are customizable and themeable.

That’s all for today! In the next part, we’ll analyze what are the main pain points of this architecture.


About the series

In case you forgot, here are the topics that will be 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”)
Viewing all 918 articles
Browse latest View live