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

PrestaShop Loves You! <3

$
0
0

Obviously. We met in 2007, united by two passions: e-commerce and open source. We got to know each other, shared some laughs, often dreamt together—with some groans thrown in—while continuing to love each other. Together, we created with the goal of meeting the e-commerce needs of each country.

Thanks to our union and our shared energy, hundreds of thousands of successful e-commerce stories have come to be and continue to be told today. We are e-merchants, developers, friends, agencies, freelancers, idealists, entrepreneurs, partners, employees, perfectionists… We are the PrestaShop community.
Each day, it is a joy and an honor to work hand-in-hand with each and every one of you. Together, we make up 1.3 million today!

Thank you from the bottom of our hearts for everything we have been through over the past 10 years. Due your contributions and commitment, we’ve been able to experience and watch wonderful stories unfold and look forward to many more fantastic adventures to come!

Let us continue together to make PrestaShop successful and prosperous by contributing in the development of future versions, which will be used throughout the world every day.

  • Offer some advice to the community on the Forum.
  • Get a sneak peek to check out what’s new with the software and let us know what you think by signing up for our User Club.
  • Let us know what improvements and new features you’re dying to see on the Forge and vote for your favorite projects on User Voice.
  • Help shape PrestaShop by posting optimizations you’ve developed to GitHub. A new suite of functional tests now lets you approve developments before making a pull request.
  • Take part in adapting the software by translating it into your language on Crowdin.
  • Sell the modules and themes you’ve developed around the world by becoming a contributor on our PrestaShop Addons marketplace.
  • Share your passion for e-commerce in your country by becoming a PrestaShop Ambassador.
  • … and check out our interactive graphics by listening to the Valentine’s Day special playlist we’ve concocted for you with the Ambassadors to tell you how much we love you!

The entire PrestaShop Team

PrestaShop Loves You


The PrestaShop Test Framework

$
0
0

Last time we announced a new suite of functional tests to ensure our software quality, today we are proud to present you our new feature, the PrestaShop Test Framework!

It is a cool toolkit like a Swiss knife which will help to save a lot of time by running at least 50 automated functional tests on your browser… and this is only the beginning! It makes easier to create basic acceptance testing when adding Addons, submitting pull requests or making some customizations on your Prestashop.

“So many ways… the only limit is your imagination”

This project is based on the famous feature-rich JavaScript test framework Mocha running on Node.js and making asynchronous testing. This new feature has been initially used by (and recently included in) Prestashop in order to improve the quality of regular implementations. And after some interesting modifications, we are proud to present the details below!

Introduction to PrestaShop Testing Framework

You’ve just written a feature and (hopefully) want to test it. Or you’ve decided that an existing feature doesn’t have enough tests and want to contribute some. But where and how do you start? Let’s make PrestaShop testing easier and resilient together!

Architecture

Let’s see how do the technologies work together for local setup, with the local Selenium setup - note that all softwares run on your local computer :

  • Node runs Mocha framework and all test scripts
  • Should is the assertion library & Chaï is the BDD assertion library
  • WebdriverIO communicates with Selenium Server using JSON Wire Protocol
  • Selenium Server invokes local browser using a driver to test our shop

PS Test Framework

Configuration

To run these tests you have to install Node.js, Npm, Java and Google Chrome.

To use the following test suites, you need to install PrestaShop in English with setting country to France (or you may change some assertions like the separator “,” or “.”, “€” or “$” or “£” or …). You need to create a user in Back Office with SuperAdmin rights and the following information:

Login: demo@prestashop.com
Password: prestashop_demo

Look at /tests/E2E/ directory, this is where the test automation project is located!

Installation

To install this awesome framework, you just have to this simple command on the root directory of the functional tests:

cd tests/E2E
npm install

Launch Selenium-standalone with this command:

npm run start-selenium

PS Test Framework Selenium

npm run high-test -- --URL=FrontOfficeURL --DIR=DownloadDirectory

URL: Front office URL of your Prestashop website (without the “http://”)
DIR: Your download directory (exp: /home/toto/Downloads/) so we can check the downloaded invoice

If you want to run test only on specific parts (for example products), you have to run this command:

path=high/02_product npm run specific-test -- --URL=FrontOfficeURL

PS Test Framework Examples

Create a test

This basic suite of tests cover the CRUD functionality for the simple entities (CRUD is an abbreviation for “create”, “read”, “update” and “delete” actions).

All the power of tests in the JS

Create a script_scenario.js located in \tests\E2E\test\campaigns\high\custom_directory\ - in a new directory, or choose a category if you want to complete some tests in BDD style (Behavior Driven Development). But before continuing, let’s see an example of how it appears in the code:

scenario(‘Create Standard Product in the Back Office’, client => {
test(‘should open browser’, () => client.open());
test(‘should log in successfully in BO’, () => client.signInBO(AccessPageBO));
test(‘should go to “Catalog”’, () => client.waitForExistAndClick(AddProductPage.products_subtab));
test(‘should click on “NEW PRODUCT”’, () => client.waitForExistAndClick(AddProductPage.new_product_button));
});

As you can see, every line calls to action scripted in client file located in \tests\E2E\test\clients.

Conclusion

These technologies worked much better than we expected, however there was learning curve involved. Once understood how all the components worked together, everybody is able to write complicated test scripts in a very short time.

For our part, using these technologies has definitely motivated us to sharpen our JavaScript skills so we hope you’ll find this article useful and motivating to contribute all together and to build a more reliable solution.

Please let us know if you have any questions or comments on this test automation framework.

From QA with love!

PrestaShop 1.7.3.0 RC1 is open for feedback!

$
0
0

PrestaShop 1.7.3.0 Release Candidate is now ready for you to test!

We are happy to announce that we are very close to releasing 1.7.3.0. This minor version (in the SemVer meaning of the term) brings several improvements, some new features and innovative tools to the 1.7 codebase. We can’t wait to receive your feedback about it!

Test PrestaShop 1.7.3.0 RC1 now!

This release candidate is a great opportunity for you to start playing with it before we release the final version!

Go download and install it as a test store, either on your machine or your web hosting, then have a go at it – and give us your feedback!

Merchants, module developers, theme designers… we need YOU to test this new version of PrestaShop.

The feedback period is open from today to February 26th, 10 PM GMT. PLEASE TEST NOW!

What you need to know about PrestaShop 1.7.3.0 RC1

Of course, it includes all the fixes that were part of the 4 patch versions since the release of 1.7.2.0 in July 2017. It brings the following main features:

… and much more! Check the full changelog here.

How to give feedback about this RC

Have you found a bug? A curious behavior? An unexpected reaction? Please let us know: create a ticket on the 1.7 Forge project and give us as much details as possible!

Final note

So have at it, download it, test it out with your theme and modules. Let us know what you like about it!

Test PrestaShop 1.7.3.0 RC1 now!

We’ll closely monitor your feedback, so we are eager to hear from you. ;-)

Happy testing everybody!

Release of PrestaShop 1.7.2.5

$
0
0

PrestaShop 1.7.2.5 is now available. This is a security release for all previous versions of PrestaShop 1.7.

Security researchers recently reported the Core team of two vulnerabilities affecting the Back Office, one of them critical.

Issue 1 - Critical

Parameter unserializing could be exploited by an authentified attacker in order to execute arbitrary code on the server, with the same user level as the PHP binary.

This issue was introduced by a PR merged in September 2016. Therefore, all 1.7 versions of PrestaShop are affected.

The fix can be found in PR #8772.

Issue 2 - Minor

Wrongly sanitized parameters could be exploited by an authentified attacker to list and navigate through the shop’s /img directory.

This issue was introduced by a commit in March 2014, so all PrestaShop versions starting on 1.6.0.4 are affected.

The fix for 1.7.x can be found in PR #8755.

The fix for 1.6.x can be found in PR #8785 (will be available in the upcoming 1.6.1.19).

** Please note that both attacks can only be exploited by users having valid credentials to the back office. **

If you are currently using PrestaShop 1.7, we strongly advise you to upgrade to v1.7.2.5 immediately!

Download PrestaShop 1.7.2.5 now!

Thanks again to Robin Peraglie from RIPS Technologies, and to Core members @alegout and @tomlev for fixing the issues.

A reminder on responsible disclosure

Responsible (and private) disclosure is a standard practice when someone encounters a security problem: before making it public, the discoverer informs the Core team about it, so that a fix can be prepared, and thus minimize the potential damage.

The PrestaShop team tries to be very proactive when preventing security problems. Even so, issues might surface without notice.

This is why we have set up the security@prestashop.com email address: anyone can privately contact us with all the details about issues that affect the security of PrestaShop merchants or customers. Our security team will answer you, and discuss of a timeframe for your publication of the details.

Understanding a security issue means knowing how the attacker got in and hacked the site. If you have those details, then please do contact us privately about it (and please do not publish those details in public, including the Forge!). If you do not know how the attacker got it, please ask for help on the support forums.

What is PrestaShop’s process for dealing with security issues?

Thanks to our strict use of a SemVer-like versioning scheme, we feel confident that the patch versions of PrestaShop 1.7 are very easy upgrades for all users. Patch versions are for backwards-compatible bug fixes and security issues, and security fixes are to be released as soon as they are fixed.

At PrestaShop, we remain attached to keeping your stores and customers safe, and we take security very seriously. Thank you for your understanding of the issue that affects us today – and thank you for the swift update of all the stores you are responsible for!

PrestaShop Core Weekly - Weeks 07 & 08 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the last two weeks, from Monday 12th to Sunday 25th of February 2018.

Core Weekly banner

General messages

Hi there! Can you feel it in the air? It seems to be a perfect time for an expected release… indeed, PrestaShop 1.7.3.0 RC1 has been released last week - with almost 200 pull requests in it! Since the beta, we’ve fixed many of bugs and added a last-minute feature: new demo products.

And since one good thing leads to many others, we also released a security patch on the 1.7.2 branch. It fixes two security vulnerabilities - one of them critical - so we wanted to make sure that all merchants would be able to quickly and safely secure their shops without having to wait for final 1.7.3.0 which is due… this week, so get ready!

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

Core

  • #8732: CLDR reference data (files) reader, by @littlebigdev.
  • #8756: Update license headers for 2018, by @quetzacoalt91.
  • #8764: [CO] Change all links to PrestaShop Help/Addons/Developers from http to https. Thank you @yannicka!

Front office

  • #8741: Improve SEO - Hn tags in Classic Theme. Thank you @slorenzini!
  • #8792: Update url in Readme :). Thank you @okom3pom!

Test

  • #8775: Add new functional test suite, by @eternoendless.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8761: Use json_encode instead of serialize, by @tomlev.
  • #8777: Fix directory listing, by @eternoendless.
  • #8796: Update theme preview image, by @eternoendless.

Core

  • #8794: Fix customizable demo product without customizable field, by @eternoendless.

Test

  • #8802: Add functional tests on 1.7.3.x, by @fatmabouchekoua.

Code changes in the ‘1.7.2.x’ branch (for v1.7.2.0)

Back office

  • #8755: Fix directory listing. Thank you @alegout!
  • #8772: Replace serialize with json_encode, by @tomlev.

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

Back office

  • #8785: Fix directory listing, by @eternoendless.

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @alegout, @okom3pom, @slorenzini and @yannicka!

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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

PrestaShop 1.7.3.0 is available!

$
0
0

Dear community, it is a great day for us all. Many “when will it be released?” later, we are thrilled to announce the birth of PrestaShop 1.7.3!

After six months of blood, sweat, and tears (okay, we’re just kidding), here it is, the new minor version has come. We are aware that these six months of work have raised some very high expectations. You won’t be disappointed, because we have spent a lot of time improving and testing it for you!

173 Available

Download PrestaShop 1.7.3.0 now!

Innovation is a central feature of this release, with an exciting new project that places a new generation of security and technology at the center of PrestaShop: PrestaTrust, which will help in providing a more secure environment for module developers as well as merchants.

Another important feature is RTL support. PrestaShop is now friendly with languages written from right-to-left – which it is the case for a lot of shops! We are also moving forward with the Symfony migration with some exciting new features for module developers!

And we are only scratching the surface…

What’s new?

Here are the meain features of this (long-awaited) new minor version of PrestaShop:

  • PrestaTrust, of which we talked about in this post. This new feature authenticates the code of PrestaTrust-enabled modules and safely keeps track of license information in the blockchain.

  • Right-To-Left (RTL) language support. Not only the back office and the Classic theme are now fully RTL compatible, but we are also introducing RTL stylesheet generation for front office themes. This means that any front office theme can now be automagically converted to be RTL-compatbile. This is extremely important for selling in countries who speak in RTL languages like Arabic, Hebrew or Persian.

  • A new set of Demo products. A whole new set of demo products that give PrestaShop a modern face while being friendlier to people from more conservative cultures, and highlight lesser known features like product customization.

  • UI Kit (available in Symfony pages), which was presented a while back in this post. A new graphic identity for the core… and modules, too! The UI kit brings a coherent set of reusable components that work the same across the back office, as well as Bootstrap 4 and jQuery 3.

  • Symfony migration, which we recently discussed in this post. Exciting new things are coming to the core in 1.7.3! Three new pages have been migrated to Symfony (Modules catalog, Performance and System Information), modules can now access the Symfony service container (which allows them to declare, use and override services, templates, and more!) and the debug toolbar has been improved with a hooks section (which displays in-depth information about the page’s hooks and the modules attached to them).

Addons Connect + tips

In this new version, the Addons Connect module now installed by default. It is a very important tool because keeping you Addons account connected helps keeping all your shop’s modules up-to-date. In addition, this module displays a weekly tip at the top left side of your back office dashboard. Your business is constantly evolving, and PrestaShop evolves alongside you!

173 Tips & Updates

Shipping delivery times

In order to be compliant with European laws, merchants now need to display the estimated delivery date of an item in the Product page. You can either configure a default value for all products your shop, or a separate value for each product. In addition, you can specify a different estimated delivery time when a product is in stock and when it’s out-of-stock with allowed backorders, as well as a custom availability label.

Low stock alerts

You can now make PrestaShop send you alerts when a product is low on stock. You can configure the low stock threshold as well as toggling the notification either globally in the Product Settings section or per product.

… which brings us to the next step! In the Stock Overview page, products with a quantity under the low stock level are now highlighted. A new quick filter has been added too, which allows you to quickly see products that low on stock by placing them at the top of the list.

173 Low Stock Levels

Import / Export in the Stock Overview page and low stock alerts

Your shop, your data! Merchants are now able to import or export the information displayed in the Stock Overview page in a CSV file. Why? So that you can work on it with your computer, connect to your own stock managment system… you name it! You just need to click on the blue cloud icons on the right hand side of the screen and you’ll be on your way to the import / export system.

173 Stock Overview

Bulk edition in stocks

Another new feature in PrestaShop 1.7.3 is that product stock information can now be updated in bulk instead of one by one. And it is very easy, all you have to do is check (in the left column) all the products you want to edit, enter the quantity to add or substract to the already available stock and confirm!

Multiple features of the same type

Before, it was impossible for a product description to have more than one attribute of the same type (for example, multiple kinds of fabric like cotton, synthetic, etc.). This much-requested feature has now been added!

Testing

A new suite of functional end-to-end tests is now included in the core, covering the most critical parts of the system.

…And also

  • Store schedules are now localized
  • Icelandic localization
  • Installer in Japanese
  • New hooks on the BO:
    • displayDashboardToolbarTopMenu
    • displayDashboardToolbarIcons
    • displayAdminCustomersAddressesItemAction
  • Tools for building a release package of PrestaShop are now included in the source code
  • Sample configuration file for Nginx server

…and many many bugfixes and performance improvements! Check the full changelog here.

PrestaShop ❤️ community

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

  • 1436 files changed
  • 861 commits
  • 203 pull requests
  • 56 committers

PrestaShop 1.7.3 is above all community project. From the 56 committers that contributed to this release, 37 were community members – that’s 2 out of 3 commiters!

A huge “thank you!” to these 37 fine people: Adonis Karavokyros, Alexandr Simonchik, Alexandre Alouit, AliShareei, Antonio Intagliata, Aymeric Auberton, Christian Kubitza, Code Utopia, comxd, Cristiano Verardi, Daniel, Danoosh, dariusakafest, David, Dickriven Chellemboyee, FrancMunoz, Gabriel Arama, hadrich-hatem, iqit-commerce, Krystian Podemski, Mahdi Shad, Manfredi Petruso, Marcin Sągol, Marek Hanuš, MattLoyeD, maxime aknin, MDWeb, mehrshadz, Molka DJEMAL, nache, Presta Module, Šarūnas Jonušas, Shagshag, Tony BOTALLA, venditdevs, Yolandavdvegt and Yuri Blanc!

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

Now go ahead and tell us what you think!

Download PrestaShop 1.7.3.0 now!

PrestaShop 2018 release schedule

$
0
0

Our release calendar for the next versions of PrestaShop 1.7 and 1.6.

Summary

In short: we intend to release minor versions of PrestaShop 1.7 every 3 to 4 months, and every two months patch versions for both 1.7 and 1.6.

When? When? When? Here’s a handy table to guide you:

Prestashop 2018 release schedule

This table was updated on February 26th, 2018.
Please note that all dates are estimated and hence subject to change.

For more information, stay connected, the more detailed announcement will be posted on the devblog next week.

Version 1.7 roadmap

Here is a bird’s eye view of what we want the next minor versions to be:

  • 1.7.3.0:
  • 1.7.4.0:
    • Should be released in May 2018.
    • Main changes:
      • GDPR.
      • CLDR.
      • Menu and SEO optimization.
      • Easier design customization.
  • 1.7.5.0:
    • Should be released in August 2018.
    • Main changes:
      • Channel manager.
      • More to come!

PrestaShop 1.7 will also receive monthly “patch” (bugfix) releases in-between minor releases.

Version 1.6 roadmap

PrestaShop has entered maintenance mode since the release of PrestaShop 1.7, in November 2016. This means that no new feature will be added, nor any behavior change. Only bugfixes will happen.

We plan on keeping supporting version 1.6 until October 2018 - two years after the release of version 1.7.0.0.

We want to release monthly “patch” releases until then, to fix the bugs reported by the community.

[FR] Article 88 de la loi 2015-1785 : date de livraison du module

$
0
0

Chers utilisateurs, après quelques semaines de silence, nous avons le plaisir de vous annoncer que l’organisme choisi par PrestaShop procédera à l’audit du module, préalable à sa certification, dans le courant du mois de juin.

Déclaration d’Infocert relative à la certification du module REM88 de PrestaShop

Le module sera disponible après validation d’Infocert.

Module compatible avec les versions 1.6 et 1.7

Le module sera compatible et maintenu pour les versions 1.6 et 1.7 de la solution.

Comment obtenir le certificat du module ?

Vous êtes nombreux à vous interroger sur les modalités d’obtention du certificat.

En cas de contrôle de l’administration fiscale, il vous suffira de vous rendre sur le site de l’organisme certificateur choisi par PrestaShop pour télécharger votre certificat.

Nous reviendrons vers vous prochainement pour vous expliquer en image la marche à suivre.


Do you speak PrestaShop? – February 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 February.

Crowdin Monthly banner

Project news

Utopian and the proofreading rights

Utopian is a rewarding platform that allows open source contributors to monetize their involvement. In short, to benefit from the rated quality of their dedication. And rules require now for the Crowdin translators to be proofreaders in order to have their contribution rewarded.

Regarding PrestaShop, we are quite strict on that status. A lot of messages were sent to us to get this right but I’m afraid we cannot turn one candidate into a proofreader if he has not proved himself before as a great translator. Why? Because we are a professional company that hosts 270,000 stores around the world and, for that, we need an extremely serious and accurate translation.

It is not about the amount of work, but its quality. A candidate is expected to write and translate correctly, pay attention to special characters, respect the project history, the ecommerce and marketing context, the harmonization, etc. If the translation work is huge, please be aware that proofreading is another big part, and different.

So the final word is: you’re more than welcome to help us having an ecommerce solution translated as long as you’re willing to make PrestaShop go to the right direction. ;-)

A few stats

  • 85 members were active on the project this month.
  • A total of 176,097 words have been translated and 130,962 validated.
  • All this in 21 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 February 2018.

Top 10 translators in February:

 TranslatorLanguage# Words
1.Ardis Markss (ardis.markss)Latvian27,222
2.Leynes Morán (leynesmoran)Spanish, Venezuela15,631
3.ardee867Filipino14,439
4.Rijad Osmanovic (rijado)Bosnian13,592
5.Julie Ann (julie26)Filipino12,700
6.kristapskrLatvian10,787
7.xanvieiroGalician9,089
8.Alberto Navarrete (ogsdu)Spanish, Peru6,631
9.Alejandro Estévez (acrywhif)Spanish, Venezuela6,459
10.SeongHyeon Cho (jaymz9634)Korean5,934

Top 10 proofreaders in February:

 ProofreaderLanguage# Words
1.Ardis Markss (ardis.markss)Latvian57,912
2.ardee867Filipino14,439
3.Rijad Osmanovic (rijado)Bosnian13,592
4.Julie Ann (julie26)Filipino12,224
5.Alejandro Estévez (acrywhif)Spanish, Venezuela11,886
6.Rodylina (rodylina)Filipino5,626
7.Leynes Morán (leynesmoran)Spanish, Venezuela3,600
8.bhargavlaloHindi1,613
9.SeongHyeon Cho (jaymz9634)Korean1,386
10.Alberto Navarrete (ogsdu)Spanish, Peru1,262

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

BulgarianCroatianDanishDutch
EnglishFinnishFrenchFrench, Canada
GermanGreekIndonesianItalian
LithuanianNorwegianPersianPolish
PortugueseRomanianRussianSlovak
SloveneSpanishSwedishTurkish
UkrainianVietnamese  

For its part, PrestaShop 1.7.3 was fully available in 20 languages!

BosnianBulgarianCroatianDutch
EnglishFinnishFrenchFrench, Canada
GermanGreekItalianPersian
PortugueseRomanianRussianSlovak
SloveneSpanishSwedishUkrainian

Languages with the best evolution

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

  • Latvian (+58% to reach 81% approved in 1.7)
  • Spanish, Venezuela (+27% to reach 31% approved in 1.7)
  • Finnish (+23% to reach 23% approved in 1.7)

Best translation progress for February 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 February 2018, some languages would still benefit from some proofreading:

  • Finnish (87% translated vs 23% validated in 1.7).
  • Chinese Simplified (98% vs 47% in 1.7).
  • Macedonian (99% vs 61% in 1.7).
  • Korean (47% vs 22% in 1.7).
  • Galician (85% vs 61% in 1.7).

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. 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 - Weeks 09 & 10 of 2018

$
0
0

This edition of the Core Weekly report highlights changes in PrestaShop’s core codebase during the last two weeks, from Monday 26th of February to Sunday 11th of March 2018.

Core Weekly banner

General messages

Wow, almost seventeen pull requests merged last week. Impressive! It seems that we’re back, with a lot of features and futures projects to share, and it feels very good. A test framework has been set, to launch a suite of functional tests and gain precious time, version 1.7.3.0 is out, the release schedule also, and the detailed roadmap is on its way… we are pretty eager to be on the road again with you all! Stay connected!

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

Core

  • #8689: Fix translator in prod mode, by @quetzacoalt91.
  • #8811: Merge 1.7.3.x, by @eternoendless.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8234: Fixed bug on save specific price priority for specific product. Thank you @christianverardi!
  • #8476: Fix customer search in new order form. Thank you @uebix!
  • #8525: “No tax” price option is now well saved in admin product page, by @littlebigdev.
  • #8618: Fix type warning in order detail, by @eternoendless.
  • #8648: Fix modal backdrop not removed when uninstalling a module. Thank you @alegout!
  • #8696: Fix translation issue during language install, by @tomlev.
  • #8714: Update loaded details from database on module action, by @quetzacoalt91.
  • #8725: Replace Google+ link on BO footer by Youtube link. Thank you @slorenzini!

Front office

  • #8522: Fixed specific price percentage rounding on front product page, by @littlebigdev.

Core

  • #8277: CustomerAddressFormatter states were queried without the status (active) check causing disabling states in BO useless. Thank you @yuxblank!
  • #8462: Fix empty module return on actionEmailSendBefore breaks all email send. Thank you @mdweb-lille!
  • #8669: Make sure all adresses are reset on cart. Thank you @prestaworks!
  • #8795: Minor improvements during install, by @eternoendless.

Test

  • #8746: Make file copy on ModuleSelfConfiguration mockable, by @eternoendless.
  • #8815: Re-enable functional tests, by @fatmabouchekoua.

Installer

  • #8806: Sample products in FA. Thank you @mehrshadz!

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @alegout, @christianverardi, @mdweb-lille, @mehrshadz, @prestaworks, @slorenzini, @uebix and @yuxblank!

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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

Contributor interview: Šarūnas Jonušas

$
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 Šarūnas Jonušas!

Hi Šarūnas! First, could you tell us a bit about yourself?

Hi! I’m a 23 year old IT student at Kaunas University of Technology and a web developer at Invertus - Premium PrestaShop Partner agency. I’ve been developing PrestaShop for two years now and recently had a chance to collaborate with PrestaShop team to migrate a small part of PrestaShop to Symfony framework. It was a very exciting and unique experience for me!

On my free time, I’m building side projects using Symfony framework, learning new technologies and tools. I also enjoy solving real world problems, that’s why I do some freelancing on projects that look challenging to me.

Besides development, I read books, watch Netflix and do some sport activities. Some of my favorite ones are ice skating, biking and running. My longest trip riding a bike was more than 110 km in a day and I hope in the near future I’ll beat this record of mine.

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

Since I started working at Invertus I dived into PrestaShop development. I spent some of my free time investigating core concepts of PrestaShop, reviewing code and improving my knowledge of codebase. As a result, I found some bugs, so I decided to make a PR to fix them, that’s were my first contributions to PrestaShop began, and they were merged!

Furthermore, I made some open source modules like Paysera payments for PrestaShop 1.7, which now is being used as an official Paysera module. Another one is the Customers Loyalty module, which got some really good feedback from community and merchants. Anyone can check those modules at my GitHub.

The biggest motivation to me is knowing that those contributions help to improve PrestaShop and solve some real world problems.

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

My advice would be: don’t be afraid to contribute. Don’t worry if you make mistakes, PrestaShop has a very friendly and open-minded community, core members and other contributors will be more than happy to help and advise you. So if you have found an issue or have an idea for improvement - don’t hesitate to make a PR.

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

I learnt that there are a lot of great people in PrestaShop community who are always willing to help you. At the end, it’s a community driven project and we can all learn new things from one another.

Thank you Šarūnas, we hope to see you more from you as PrestaShop evolves! :)

Fighting against spamming

$
0
0

Remember some Rocky fight scenes where Sylvester Stallone is beating the living daylights out of his opponents? Well, this is pretty close to the situation we are experiencing now, fighting against spammers.

We do hope you have not noticed because it would mean that this spamming wave spares you, how lucky! For the others, know that it happens because a stream of spammers is currently exploiting PrestaShop, among other platforms, to flood people under a mass of undesired emails.

In our case, the attacks take different ways to reach merchants. Here is the situation for both 1.6 and 1.7 versions.

About the 1.6 version

How?

For merchants based on the 1.6 version, spammers are exploiting the native module “Send to a Friend” which allows customers to send a product link to a friend. They are also abusing the contact form, which sends a copy of the contact message to a user-entered email address.

Our answer

First, we have decided to retire the “Send to a friend” module. This module has not been made available for 1.7, nor has it received updates in a long time. We believe the effort needed to protect this module from spammers far surpasses the value it provides for merchants.

This means that this module won’t be available to download from the PrestaShop Addons marketplace starting today, nor will it be installed automatically after the upcoming release of PrestaShop 1.6.1.19 – which should be out next month.

We strongly encourage all merchants to uninstall this module, as it exposes your shop to abuse from spammers.

As for the contact form, PrestaShop 1.6.1.17 included a solution that mitigates the problem, but it may not be enough, depending on how stubborn the attacker is. In order to make this form less interesting for spammers, PrestaShop will no longer send a confirmation email to the address entered on the form, starting on the upcoming version 1.6.1.19.

Either way, be aware that only a CAPTCHA will be able to fully protect your form from spammers.

About the 1.7 version

How?

There’s no “Send to a Friend” module for PrestaShop 1.7, so there is that. For merchants based on this major version, spammers are mainly abusing the contact form.

Our answer

We are porting the mitigating features we added on PrestaShop 1.6.1.17 to the contact form on PrestaShop 1.7. In addition, we will be adding an option to let merchants decide whether they still want the contact form to send a confirmation message or not. By default, PrestaShop 1.7 won’t send confirmation messages anymore.

Keep in mind that in order to discourage spammers, if the merchant chooses to enable sending the confirmation message, the user will receive a generic confirmation message instead of the text he or she wrote in the form.

The goods news is that since this feature is handled by a native module, you won’t need to wait for 1.7.3.1 to get this new features. You simply need to update the Contact form module when it’s released in the next few days, and that’s it.

In addition, we are fixing a problem where this module couldn’t be disabled, and removing it produced an error.

Again, be aware that only a CAPTCHA can fully protect your form from spammers.

About CAPTCHAs

CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart, we are pretty sure you all already know about it. It is a great solution to prevent from robot attacks and, obviously, it was the first thing we thought about.

But it turns out it is also a tool that could complicate the installing and setting process. Indeed, it either requires the merchant to configure third-party services, or install PHP native libraries that are not always available or easy to activate in the server.

For this reason, we choose to to leave you the choice to get a CAPTCHA for your store or not. Because it implies some configurations that not everybody will feel like doing it. You can find modules for that on our Addons marketplace.

We are aware that this kind of unfortunate situation can affect your business and for that we make a point of guaranteeing the security of all the PrestaShop stores. We are deeply involved in solving this issue as it is our number one priority today. Be sure that it will soon be fixed!

PrestaShop Core Weekly - Week 11 of 2018

$
0
0

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

Core Weekly banner

General messages

Hi beloved community, hope you’re all fine there! We were pretty focused on your contribution lately, with both Crowdin monthly report and interview of Šarūnas Jonušas who has been helping us a lot with the Symfony migration. Good job everybody, thanks a million! Regarding this week, as we did for the Integration Fund last month, we will let you know about how to involve deeper and, if you want, become one of our great ambassadors… and, highlight of the show, our detailed roadmap for this year. Don’t miss it, keep reading the devblog. ;-)

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

Back office

  • #8515: Upgrade Symfony to 3.4 LTS, by @mickaelandrieu.

Front office

  • #8823: Fixed broken search after #8741, by @eternoendless.

Test

  • #8841: Fixed travis build (updated Chrome version), by @mickaelandrieu.
  • #8852: Delete attribute with bulk actions, by @fatmabouchekoua.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8631: Request module zip for upgrade ONLY when the version available is higher, by @quetzacoalt91.
  • #8780: Improve BO speed by removing menu images. Thank you @alegout!

Front office

  • #7775: Resolve incompatibility between canonical redirections, attributes and product route not only containing rewrite. Thank you @123monsite-regis!
  • #8846: Fix menu width and submenu hover on header. Thank you @slorenzini!

Core

  • #8498: Fixed bug on reorder with free gift in the cart. Thank you @blueshadow2911!
  • #8543: Layout broken by cache clear, by @littlebigdev.

Test

  • #8842: Fixed Travis build (update Chrome browser version), by @mickaelandrieu.

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @123monsite-regis, @alegout, @blueshadow2911 and @slorenzini!

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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

Have you ever heard of the Ambassador Program?

$
0
0

As you might already know, PrestaShop’s biggest strength is that it has one of the largest open source communities regarding ecommerce in the world. Hand in hand with all its contributors, PrestaShop provides a software that enables everyone, everywhere in the world, to build a successful online store.

Among other things, you can ask questions or help people on the forum, contribute on GitHub, or join a meetup near you. PrestaShop is one company with its global community. And talking about meetups, have you ever heard of the Ambassador Program?

Achievements of the Program

In order to get closer and to maintain a strong relationship with its community, PrestaShop launched the Ambassador Program in 2013. This has been done through a wide variety of community-building activities, such as organizing meetups or webinars. In average each year, more than 150 PrestaShop Meetups are organized on every continent!

And today more than 50 countries are involved with more than 95 voices dedicated locally to our community all around the world.

Thanks to the Program, the community often gathers and has numerous possibilities to share experiences and knowledge about PrestaShop and ecommerce. It is also a good moment to get constructive feedbacks from the community which is part of empowering the PrestaShop software.

Our volunteer Ambassadors drive activities that raise local awareness and educate our community about ecommerce. They are consultants, web designers, developers, merchants, etc.

Exclusive perks and rewarding activities for our Ambassadors

In return, Ambassadors receive exclusive perks including:

  • Online recognition: Not only do you get to wear the title of official PrestaShop Ambassador, you’ll have moderation rights on your local forum and a nifty badge to display. Show off your ecommerce skills - add PrestaShop Ambassador to your resume!

  • Training & tools: Depending on your area of expertise and interests, you’ll have access to our User, Developer or Integrator training session for free. You’ll also be invited to regular Q&A sessions and receive the latest product information.

  • Visibility: You’re a part of our Community and we’re proud of that! We’ll feature your achievements on our website, blog, social networks and at our events.

  • Gifts & materials: We’ll send you an Ambassador kit complete with marketing materials, templates and goodies that will make reaching out to your local Community easy and fun.

  • Privileged relationship with the PrestaShop Team: As a PrestaShop Ambassador, your submissions on the Forge & GitHub will receive priority review. You’ll also have access to the private Ambassador subforum.

We are always looking for motivated people who want to be part of the adventure with us, and, as an Ambassador, gather and strengthen our community.

Ambassadors Program Badge

You can take part in a number of exciting and rewarding activities to develop your ecommerce skills and make an impact on your Community. Here are a few ideas:

Inspire conversation and moderate your local Forum on PrestaShop’s website
Actively participate in discussions about PrestaShop and advocate for us on Social Networks or local websites such as StackOverflow, Quora, etc.
Provide local input on the software and its features
Run local tests on upcoming releases
Participate in PrestaShop’s translations on Crowdin
Contribute to the software’s official documentation
Organize community MeetUps, Webinars or Hangouts
Give talks at schools about PrestaShop
Create videos or written tutorials about using or coding with PrestaShop
Write guest blog posts on local topics for our official blog
Attend events organized by PrestaShop or other local e-commerce events
Get in touch with local influencers

Have other ideas? Let us know!

Further information

Want to be PrestaShop’s voice? Apply now!

You can learn more about the members involved in promoting & growing their local PrestaShop Community right here!

And don’t forget to check out our Ambassadors’ activities across the globe in pictures, the gallery is this way!

Announcing our 2018 release schedule

$
0
0

Today we are shining a light on a crucial information, long requested: our release calendar for the next versions of PrestaShop 1.7 and 1.6!

TL;DR

In short: we intend to release at least 3 minor versions of PrestaShop 1.7 in 2018, and patch versions for both 1.7 and 1.6, as regularly as possible in-between minor releases.

When? Keen readers should already know about since it has been published on March 2nd. In case you are not, here’s a handy table to guide you:

Prestashop 2018 release schedule

Now, for the longer part of the article…

Our plan for 2018

2017 has been a year of focus on regularity but, at some points, it was no longer possible to guarantee the quality of each release without delaying it from the initial schedule. And for 2018, the idea is not to fix any delivery dates but rather focus on the content of the versions. We will work on a release until we feel confident about releasing it.

4 notions are to be remembered about 2018 and PrestaShop’s future changes:

  • A software that is easier and faster to use
  • A software internationally usable
  • A software that makes businesses grow
  • A software that we all are proud of

As for when to expect minor releases, like 1.7.4.0, 1.7.5.0 and so on, here is how we are planning to work things out:

  • We want to have regular and strong minor releases to improve 1.7.
  • Each feature we want to include in the software will be studied from different angles, each one corresponding to a specific category of merchants. What benefits for what kind of users? It could be new and classic merchants, Ready, advanced users, or agencies.
  • But also from other points of view, such as the company’s, the community’s, the contributors’ and partners’.

In short, we want each release to meet a true need for every person involved. Whether you are a new merchant, a Ready one, an advanced user, an agency, a developer, an open-source lover, a contributor or a partner, our goal is to satisfy each one of you!

What vision?

In 2018, we want to push automated testing even further, for the core as well as for a selection of modules. This will allow us to concentrate on making PrestaShop better without having to worry about breaking compatibility.

Another big subject is the migration to Symfony. We are working hard on migrating the back office to Symfony 3.4, with the objective of having it finished by the end of 2018. This includes switching all the controllers to Symfony, all templates to Twig (again, back office only), and all pages to our UI kit (Bootstrap 4). For now, we are still going to keep jQuery and Vuejs together, but we have big plans for the future regarding Vuejs. And that’s all we can say for now… ;-)

In addition to that, note that even though patch versions are marked in the roadmap, they are for indicative purposes, and can both vary in quantity and release date. Remember, quality over quantity.

Organization and methodology

You might have noticed a slight change in the way we work now, right? Indeed, instead of the usual fast-paced schedule that only allows small fixes and prevents us from diving into the bigger, structural issues, we are now working on a much flexible schedule.

Since June 2017, we are focusing on addressing long-standing, complicated issues. This of course requires us to spend more time working on them, because it implies taking the time to find the root cause of the problem, which is often hidden deep in the source code, working out a stable solution, implementing it in a backwards-compatible fashion, writing the documentation, and testing it thoroughly to ensure it doesn’t produce regressions. This process often reveals other problems, which need to be addressed in turn one after the other… like a never-ending cycle!

In addition, we are now much more cautious about what we release. If we aren’t happy about the quality of a feature or fix, we just won’t release it until we are. Let’s say we are acting on the following logic: long-term vision, developing, testing and slowly moving from quantity to quality.

With the product and the core teams reunited, we are about 20 people working on both 1.7 and 1.6 versions. Well, we’re aware that 20 people is obviously not enough but be sure we are fully dedicated to getting a clear and stable codebase while adding real improvements for all PrestaShop users. Also, we are hiring!

What’s it gonna be?

So, with 1.7.3 released, minor versions are being released this year. Let’s have a look at what we want them to be:

  • 1.7.3.0:
    • Was released in February 2018.
    • Main features:
      • Right-to-left support.
      • PrestaTrust.
      • UI Kit.
      • New demo products.
  • 1.7.4.0:
    • Should be released in May 2018.
    • Main features:
      • GDPR module.
      • Menu and SEO optimization.
      • Easier design customization.
      • Symfony 3.4, requires at least PHP 5.6.
  • 1.7.5.0:
    • Should be released in September 2018.

Do you want to help on a specific topic? Let us know! Also, be aware that this table will be updated as we go, raise your voice to have your say, we are glad to have you in the game. ;-)


PrestaShop Core Weekly - Week 12 of 2018

$
0
0

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

Core Weekly banner

General messages

Hey guys, nice weekend? Have you noticed we’ve posted the detailed schedule last Friday? We are really happy to share our vision for future releases as we are now planning the bare bones of PrestaShop. And for that we would love to hear your opinion. For instance, item location has disappeared from major version 1.7 but you are often asking about it. Vote for this feature on the User Voice to let us know about it.

Regarding GDPR and the changes it will bring, we are currently working on a module that will be available for 1.5 to 1.7 stores. And of course it will be available before May 25th! A post will soon be posted to tell you everything about it.

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

Back office

  • #8872: Validator:validateValue is not available in Symfony3, by @mickaelandrieu.

Core

  • #8781: Getting Currency data from Currency data layers middleware stack, by @littlebigdev.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8500: Make sure shop list in header is scrollable with lot of items, by @quetzacoalt91.
  • #8664: Change employee icon, by @eternoendless.

Front office

  • #8845: Fix search bar on header when it moves from hook and improve header structure #2. Thank you @slorenzini!
  • #8847: Override advertising module on classic template to fix image width. Thank you @slorenzini!
  • #8856: Fixed undefined variables when an url is called in ajax, by @mickaelandrieu.

Core

  • #8584: Update toCamelCase. Thank you @neoteknic!
  • #8708: Debug of Tools::strReplaceFirst that do not correctly compare the return of strpos + PhpDoc. Thank you @infiniweb!
  • #8711: Default AJAX Relevance search sort order is wrong, by @eternoendless.
  • #8803: Stop full object exposure on the front end, by @eternoendless.
  • #8867: Rely on the right legacy container if available on modules, by @mickaelandrieu.

Test

  • #8810: Check the total price in the shopping cart. Thank you @hadrich-hatem!

Installer

  • #8858: Include docs when creating zip build, by @eternoendless.
  • #8860: Make the dezipper great again, by @eternoendless.

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @hadrich-hatem, @infiniweb, @neoteknic and @slorenzini!

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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

PrestaShop Core Weekly - Week 13 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 March to Sunday 01st of April 2018.

Core Weekly banner

General messages

Hey guys, guess what, we have a new member of the Prestacrew, here is @ttoine! He is our new Developer Advocate and, obviously, is quite keen on open source. Build’s editorial will be one of his great mission, and broadly all relations with the dev community. For my part, I will stay around and keep the grip on the translation part of the devblog. ;-)

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

Back office

  • #8529: Fix bug alignment sidebar menuCollapse Admin theme. Thank you @vincent8balls!
  • #8705: Introduce switch type in forms, by @quetzacoalt91.
  • #8790: Optimize reserved product quantity update, by @jocel1.
  • #8859: Passing language ID for Store object instance. Thank you @tmmeilleur!
  • #8863: Fixed misuse of magic routing, by @mickaelandrieu.
  • #8864: Removed almost all deprecations on Product page, by @mickaelandrieu.
  • #8865: Fixed CCC settings. Thank you @stickyrst!
  • #8890: Fix display of image form in product page, by @quetzacoalt91.
  • #8899: Optimize stock queries, by @jocel1.

Front office

  • #8469: add a few optimisations to speed up the display of the order history …, by @jocel1.
  • #8866: FO: Fixed breadcrumb links in ProductController. Thank you @vitalykondratiev!
  • #8884: QUERY_STRING is not set on all environments. Thank you @stickyrst!
  • #8902: FO: Displaying the No Image for Products on theme, by @mickaelandrieu.

Core

  • #8514: Added GroupBy option for actionAdminProductsListingFieldsModifier hook. Thank you @astterx!
  • #8685: Fixed link_rewrite argument for getImageLink().. Thank you @gitdyr!
  • #8743: CO: Fix the links sent in the mails (multilingualism). Thank you @guillaumegbzh!
  • #8754: Fix non-filtered meta by filterHtmlContent hook. Thank you @prestamodule!
  • #8853: Make override of object models easy, by @mickaelandrieu.
  • #8876: Disable Symfony tokenization in routing, by @mickaelandrieu.
  • #8885: Improve PrestaShopBundle config structure. Thank you @sarjon!

Test

  • #8826: create, edit, delete and delete with bulk actions customer. Thank you @fouratachour!
  • #8874: Check notifications. Thank you @hadrich-hatem!
  • #8875: Check the addons catalog page. Thank you @hadrich-hatem!
  • #8879: Test Buttons (Preview, Duplicate, Online, Go to catalog, Add a new product, Delete) in add product page. Thank you @fouratachour!
  • #8886: properly set the test database by taking into account the environment with console commands, by @jocel1.
  • #8900: CMS Page and category. Thank you @fouratachour!

Installer

  • #8788: speed up test_dir with a lot of files present in a directory, by @jocel1.
  • #8789: Do not call search::indexation at each entity creation, by @jocel1.
  • #8889: add tests for getDirectories, by @jocel1.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8779: Little css override for modal title. Thank you @slorenzini!
  • #8849: Add User club and UserVoice on BO link footer. Thank you @slorenzini!
  • #8871: Improved rendering of combinations in Product page, by @mickaelandrieu.

Front office

  • #8873: Fix contactform module issues. Thank you @alegout!

Core

  • #8607: Fix pack stock issues. Thank you @alegout!
  • #8766: Show unit price within a tax in order confirmation e-mail. Thank you @kpodemski!

Test

  • #8805: Reset module Welcome if the RESUME button does not exist, by @fatmabouchekoua.
  • #8812: Delete product. Thank you @fouratachour!
  • #8813: Check the product discount in the Front Office. Thank you @hadrich-hatem!
  • #8819: Fix sort product script, by @fatmabouchekoua.
  • #8829: Add script for screenshot display on Travis, by @quetzacoalt91.
  • #8854: Check the change of the default combination from the edition page. Thank you @fouratachour!
  • #8878: Check the appearance of tinymce field on the product page. Thank you @hadrich-hatem!

Installer

  • #8891: Fix dezipper redirect, by @eternoendless.

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @alegout, @astterx, @fouratachour, @gitdyr, @guillaumegbzh, @hadrich-hatem, @kpodemski, @prestamodule, @sarjon, @slorenzini, @stickyrst, @tmmeilleur, @vincent8balls and @vitalykondratiev!

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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

Exposing data with confidence in PrestaShop 1.7

$
0
0

During the last few months, we have received a lot of feedback from the community pointing out issues with how PrestaShop 1.7 makes shop data available in the front office.

In this article, we’ll see how the upcoming PrestaShop 1.7.3.1 will address this problem.

TL;DR: We have changed the way PrestaShop filters data going to the browser. If you didn’t change your Models, this shouldn’t impact you :)

Some context

PrestaShop 1.7 has several ways of making data available to the front office, including:

  • General purpose variables (such as configuration, cart, shop…) which are automatically added to Smarty templates.
  • A prestashop javascript object containing the same general purpose variables, which makes them available everywhere in the Front Office.
  • Ajax response objects, such as the one used for search autocomplete.

Most of the exposed objects are enriched versions of PrestaShops’ models (ObjectModel) such as Product, Cart and so on.

The problem

In the current implementation, the server-side layer (smarty templates) and the client-side layer (prestashop object, ajax response) share the same objects. Why is that a problem?

1. Mixed concerns

Server-side layers and client-side ones actually have different needs. While the templates need as much information as possible for maximum flexibility, the client-side layer needs to receive as little as possible, both for network-related performance as well as for security reasons.

2. Data exposure

Since templates live in the server, it’s not a problem allowing them access to sensitive data. However, data being sent to the client is a whole different story, and should be handled carefully. For example, you don’t want everyone to know the wholesale price for a product, so it shouldn’t be included in data being sent to the client.

3. Extensibiliy

PrestaShop is an extensible platform, but with extensibility comes uncertainty: it’s impossible to know in advance what data will be added to the models by modules or customizations. This means that PrestaShop needs to be open to customization while keeping data safe by default.

The solution

Starting on 1.7.3.1, PrestaShop will filter all the data it sends to the client-side using a whitelist-based filtering service.

Remember: only data sent to the client is filtered. Smarty objects will be kept as they were.

Why not a blacklist?

A blacklist is unsafe by default. Not only because it needs PrestaShop to know everything it needs to remove in advance, which is impossible due to the extensible nature of PrestaShop, where data can be modified by anyone anytime. But it also relies on developers knowing that they need to actively filter new information out, or risk data leaks – and that’s too easy to miss. In fact, it’s what has actually happened.

In comparison, a whitelist allows shops to be safe by default. Models can evolve in any way, and data won’t accidentally be leaked – by design. Developers need to add new information into the whitelist if they want to expose it. If it’s not used, everything will work fine. But if it is used, they’ll notice it right away.

So how does this impact me?

If you have customized your PrestaShop or if you are a module developer, here’s what you need to know.

I customized my models but I only use my custom data in Smarty templates

Good news! You don’t need to do anything. As stated before, objects being sent to the templates are not filtered, so everything will work the same as before.

I customized my models and I need my custom data on the client side

You need to add your data keys to the front end filter service. Here’s how.

Since PrestaShop 1.7.3, modules are able to access the dependency container in back office controllers. Starting on 1.7.3.1, they will also have access to the front office dependency container, so accessing the filter service from your module is as simple as:

$this->get('prestashop.core.filter.front_end_object.main');

Some examples

Whitelisting a property

Let’s say you have added puffin_product_url to your Product model and you want it to be made available on the browser when the customer adds a product to his cart.

Here’s how you can add puffin_product_url to the whitelist by using a module attached to the actionFrontControllerAfterInit hook:

publicfunctionhookActionFrontControllerAfterInit(){$filterManager=$this->get('prestashop.core.filter.front_end_object.main');// get list of all filters applied to client-side data
$filters=$filterManager->getFilters();// get list of all filters applied to the cart object
$cartFilters=$filters['cart']->getFilters();// get list of filters applied to each product inside the cart object
$productFilterQueue=$cartFilters['products']->getQueue();foreach($productFilterQueueas$filter){// add puffin_product_url to the product whitelist
// note: whitelist() needs an array regardless of the number of elements to whitelist
if($filterinstanceofPrestaShop\PrestaShop\Core\Filter\FrontEndObject\ProductFilter){$filter->whitelist(array('puffin_product_url'));}}}
Removing a property

Let’s say you want to remove price from your exposed cart Products.

Again, you can hook into actionFrontControllerAfterInit and remove price from the product whitelist:

publicfunctionhookActionFrontControllerAfterInit(){$filterManager=$this->get('prestashop.core.filter.front_end_object.main');// get list of all filters applied to client-side data
$filters=$filterManager->getFilters();// get list of all filters applied to the cart object
$cartFilters=$filters['cart']->getFilters();// get list of filters applied to each product inside the cart object
$productFilterQueue=$cartFilters['products']->getQueue();foreach($productFilterQueueas$filter){// remove "price" from the product whitelist
if($filterinstanceofPrestaShop\PrestaShop\Core\Filter\FrontEndObject\ProductFilter){$filter->removeFromWhitelist('price');}}}
Bonus: make new information available in the Front Office

Let’s say you want to add an element named my_custom_data to the prestashop object. It’s super easy!

Just hook into actionBuildFrontEndObject and add my_custom_data to $params

publicfunctionhookActionBuildFrontEndObject(&$params){// contains all the data in the prestashop object
$prestashopObject=&$params['obj'];// add custom data like this
$prestashopObject['my_custom_data']='foobar';}

Alternatively, this lets you alter the prestashop object after it’s filtered. Use with caution!

Do you speak PrestaShop? – March 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 March.

Crowdin Monthly banner

Project news

Next targets

Last month, Utopian announced that Steem rewards for translation contributions were suspended until further notice. But thanks to our amazing and dedicated translation community, we still have great levels for all the PrestaShop projects on Crowdin!

Now, to look further, here are our almost completed projects - if you feel like helping on it, I would be glad to welcome you: Catalan, the two Chinese projects, Czech, Danish, Estonian, Galician, Hungarian, Indonesian, Norwegian, Vietnamese. Hope to see you on those projects to push PrestaShop higher and make it available for a largest audience!

A few stats

  • 66 members were active on the project this month.
  • A total of 92,028 words have been translated and 104,148 validated.
  • All this in 18 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 March 2018.

Top 10 translators in March:

 TranslatorLanguage# Words
1.Yosef Esses Cohen (ppesses)Spanish, Mexico21,207
2.Bojan Lazarevski (BoOoX)Macedonian6,065
3.ardee867Filipino5,846
4.SeongHyeon Cho (jaymz9634)Korean5,384
5.Gitanjaly Sharma (tiktok3)Hindi5,067
6.Leynes Morán (leynesmoran)Spanish, Venezuela5,059
7.Julie Ann (julie26)Filipino4,894
8.Alberto Navarrete (ogsdu)Spanish, Peru4,792
9.M. Mirena (mmirena)Albanian4,128
10.Santiago Medina (Sontiogo)Spanish, Venezuela4,055

Top 10 proofreaders in March:

 ProofreaderLanguage# Words
1.Bojan Lazarevski (BoOoX)Macedonian29,918
2.Yosef Esses Cohen (ppesses)Spanish, Mexico28,970
3.Ardis Markss (ardis.markss)Latvian8,516
4.ardee867Filipino5,846
5.Julie Ann (julie26)Filipino5,365
6.Bhargav Anadkat (bhargavlalo)Hindi4,459
7.Alberto Navarrete (ogsdu)Spanish, Peru4,230
8.M. Mirena (mmirena)Albanian4,078
9.SeongHyeon Cho (jaymz9634)Korean2,597
10.Erdal Atabalkan (erdalatabalkan)Turkish2,259

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

BulgarianCroatianDanishDutch
EnglishFinnishFrenchFrench, Canada
GermanGreekIndonesianItalian
LithuanianMacedonianNorwegianPersian
PolishPortugueseRomanianRussian
SlovakSloveneSpanishSwedish
TurkishUkrainianVietnamese 

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

BosnianBulgarianCroatianDutch
EnglishFinnishFrenchFrench, Canada
GermanGreekItalianLatvian
MacedonianPersianPolishRomanian
RussianSlovakSloveneSpanish
SwedishTurkishUkrainian 

Languages with the best evolution

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

  • Spanish, Mexico (+55% to reach 95% approved in 1.7)
  • Macedonian (+39% to reach 100% approved in 1.7)
  • Latvian (+19% to reach 100% approved in 1.7)

Best translation progress for March 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 March 2018, some languages would still benefit from some proofreading:

  • Finnish (80% translated vs 27% validated in 1.7).
  • Chinese Simplified (98% vs 47% in 1.7).
  • Spanish, Venezuela (62% vs 32% in 1.7).
  • Korean (54% vs 24% in 1.7).
  • Galician (86% vs 61% in 1.7).

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. 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 14 of 2018

$
0
0

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

Core Weekly banner

General messages

Dear developers, for my first article as PrestaShop’s new Developer Advocate, I have the feeling that many of you are waiting for the next release to come. Then, you should really read Pablo’s article Exposing Data With Confidence In PrestaShop 1.7: you will learn how 1.7.3.1 will filter data it sends to the client-side. Stay tuned.

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

Back office

  • #8680: Migration of page Shop Parameters > Product Settings. Thank you @sarjon!
  • #8910: Collect all hooks for the debugger, by @mickaelandrieu.
  • #8912: BO: Fixed template path. Thank you @spolischook!
  • #8923: Fixed url redirection on Administration page, by @mickaelandrieu.
  • #8924: Refactored Back Office controllers, by @mickaelandrieu.

Front office

  • #8469: add a few optimisations to speed up the display of the order history …, by @jocel1.
  • #8884: QUERY_STRING is not set on all environments. Thank you @stickyrst!
  • #8866: FO: Fixed breadcrumb links in ProductController. Thank you @vitalykondratiev!
  • #8902: FO: Displaying the No Image for Products on theme, by @mickaelandrieu.

Core

  • #8926: [CO] fix deprecation message. Thank you @SebBareyre!

Test

  • #8869: Click on discover button. Thank you @hadrich-hatem!
  • #8870: Options in catalog page. Thank you @hadrich-hatem!
  • #8894: Delete feature with bulk actions, by @fatmaBouchekoua.
  • #8901: Check addons theme. Thank you @hadrich-hatem!
  • #8911: Create order by a guest, by @fatmaBouchekoua.

Code changes in the ‘1.7.3.x’ branch (for v1.7.3.0)

Back office

  • #8921: Fixed CDN management in Performance page, by @mickaelandrieu.
  • #8925: Stop generating RTL css file for the default theme using SASS, by @eternoendless.

Core

  • #8922: Fixed access to Front Office container from modules, by @mickaelandrieu.

Test

  • #8881: Check the pagination of product in the Front Office. Thank you @hadrich-hatem!
  • #8898: Check generated combinations table. Thank you @fouratachour!
  • #8903: Add some fixes to the script. Thank you @hadrich-hatem!

Installer

  • #8913: Fix issue with pack in fixtures (installer), by @alegout.

Thank you to the contributors whose pull requests were merged since the last Core Weekly Report: @fouratachour, @hadrich-hatem, @sarjon, @SebBareyre, @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 tickets and comments on the Forge!

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 the Forge to contribute to PrestaShop. Thank you!

Happy contributin’ everyone!

Viewing all 941 articles
Browse latest View live