<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marwane</title>
    <description>The latest articles on DEV Community by Marwane (@moghwan).</description>
    <link>https://dev.to/moghwan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F212386%2F62349a39-728f-4dd7-8619-b99bac53d32b.jpg</url>
      <title>DEV Community: Marwane</title>
      <link>https://dev.to/moghwan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moghwan"/>
    <language>en</language>
    <item>
      <title>Things you should know before starting Prestashop development</title>
      <dc:creator>Marwane</dc:creator>
      <pubDate>Sun, 27 Jun 2021 23:15:28 +0000</pubDate>
      <link>https://dev.to/moghwan/things-you-should-know-before-starting-prestashop-development-inf</link>
      <guid>https://dev.to/moghwan/things-you-should-know-before-starting-prestashop-development-inf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Note: I'm only talking about PS1.7 version, not 1.6 or ealier.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So basically i'm writing this post for prestashop beginners developers to explain some &lt;strong&gt;ways of doing things&lt;/strong&gt;' basics so they would't be in the 'Aha!' situations multiple times, like I did.&lt;/p&gt;

&lt;p&gt;Developping in prestashop is just like programmig in any php framework, it relies heavely on the OOP programming, and MVC architecture with their their folders &lt;code&gt;classes&lt;/code&gt;, &lt;code&gt;controllers&lt;/code&gt; and &lt;code&gt;themes/&amp;lt;your-theme-name&amp;gt;&lt;/code&gt;. you can learn more about folders architecture from &lt;a href="https://devdocs.prestashop.com/1.7/development/architecture/file-structure/"&gt;here&lt;/a&gt; the documentation is very clear once you understand &lt;em&gt;Hooks&lt;/em&gt; (because they are the most confusing, and, easy part).&lt;/p&gt;

&lt;p&gt;These are the main lines you should know about:&lt;/p&gt;

&lt;h1&gt;
  
  
  overrides
&lt;/h1&gt;

&lt;p&gt;Why overrides? why not changing directly in classes? simply because prestashop/modules updates will completely overwrite your changes.&lt;/p&gt;

&lt;p&gt;The classes that you are able to override are all classes insides &lt;code&gt;classes&lt;/code&gt;, &lt;code&gt;constrollers&lt;/code&gt; and &lt;code&gt;modules&lt;/code&gt; folders, and place them under &lt;code&gt;overrides&lt;/code&gt; while respecting their original arborescence.&lt;/p&gt;

&lt;p&gt;To take effect of your changes you should either clear your cache folder, or just deleting the &lt;code&gt;var/cache/&amp;lt;dev || prod&amp;gt;/class_index.php&lt;/code&gt; file which is a simple mapping class of the different classes with their overrides.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;// code/ProductController.php

&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="c1"&gt;# controllers/front/ProductController.php&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;PrestaShop\PrestaShop\Adapter\Image\ImageRetriever&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mf"&gt;...&lt;/span&gt;


&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductControllerCore&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;ProductPresentingFrontControllerCore&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;anyFunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// function shouldn't be private or it won't work&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'parent value'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's override the class and redifine any public/protected method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;// code/ProductController-override.php

&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="c1"&gt;# overrides/controllers/front/ProductController.php&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductController&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;ProductControllerCore&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;anyFunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// use parent::anyFunction() to get parent function value&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'new value'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  The &lt;code&gt;Tools&lt;/code&gt; class
&lt;/h1&gt;

&lt;p&gt;This class is as, its name saying, a class of tools and utilities functions. you'll find a set of useful static methods you'll use often. Before creating any utility function in your module make sure it's not present in the Tools class.  &lt;/p&gt;

&lt;h1&gt;
  
  
  Hooks
&lt;/h1&gt;

&lt;p&gt;Hooks, to be simple, help executing some code/change a template, on a specific event/position. &lt;/p&gt;

&lt;p&gt;There a two main types of hooks: display &amp;amp; action.&lt;/p&gt;

&lt;p&gt;When using a hook in your module just do a quick check if it's compatible with all 1.7.x.x versions or it's a new one, just in case. Or if a hook is renamed you must register the hook for that specific version so you won't tell yourself later why it's not used.&lt;/p&gt;

&lt;p&gt;The complete list of hooks is available &lt;a href="https://devdocs.prestashop.com/1.7/modules/concepts/hooks/#hooks"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Deprecated functions
&lt;/h1&gt;

&lt;p&gt;You'll notice a lot of them ducummented with &lt;code&gt;@deprecated&lt;/code&gt; tag, some are even from prestashop 1.5 but technically they call the new defined ones.&lt;/p&gt;

&lt;p&gt;Why? Backward compatibility. The other reason is, that people are always late to or never update their online store fearing to break it because, if you're non technical owner ad something goes wrong during an upgrade (or even and update sometimes) it'll cost some - if not only your time - money to fix it.&lt;/p&gt;

&lt;h1&gt;
  
  
  PrestaShop &amp;amp; Github
&lt;/h1&gt;

&lt;p&gt;To quickly download a specific PS version directly head to &lt;a href="https://github.com/PrestaShop/PrestaShop/tags"&gt;releases list&lt;/a&gt;, no need to go to their site or google the desired version.&lt;/p&gt;

&lt;p&gt;Faster? head to &lt;a href="https://github.com/PrestaShop/PrestaShop/releases/tag/1.7.x.x"&gt;https://github.com/PrestaShop/PrestaShop/releases/tag/1.7.x.x&lt;/a&gt; and replace the &lt;code&gt;x&lt;/code&gt; with your version.&lt;/p&gt;

&lt;p&gt;Even faster with the direct link: &lt;a href="https://github.com/PrestaShop/PrestaShop/releases/download/1.7.x.x/prestashop_1.7.x.x.zip"&gt;https://github.com/PrestaShop/PrestaShop/releases/download/1.7.x.x/prestashop_1.7.x.x.zip&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Fixing update/upgrade issues
&lt;/h1&gt;

&lt;p&gt;At first it seemed very complicated to me but in fact, it's simply tricky.&lt;/p&gt;

&lt;p&gt;Besides replacing core folder such as classes, controller, src and the classic theme, updating the database is our main focus. Take a look at the folders &lt;code&gt;php&lt;/code&gt; and &lt;code&gt;sql&lt;/code&gt; inside the folder &lt;code&gt;[/install-dev/upgrade/](https://github.com/PrestaShop/PrestaShop/tree/develop/install-dev/upgrade)&lt;/code&gt;, notice something? let me explain: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A prestashop &lt;strong&gt;database&lt;/strong&gt; installation is just a serie of updates executing one after another. so, if a real upgrade is stuck at some point, open the corresponding php/sql file for the update you started earlier and just execute them this will surely fix the update issue.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Some things you should know
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Any global parameter, rather it's proper to prestashop or to a module, can be stored and fetched or deleted with these methods:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/configuration.php&lt;/span&gt;

&lt;span class="nc"&gt;Configuration&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;updateValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'YOUR_UNIQUE_PARAM_NAME'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'new value'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;Configuration&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'YOUR_UNIQUE_PARAM_NAME'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;Configuration&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;deleteByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'YOUR_UNIQUE_PARAM_NAME'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Get any input value by name, sent in GET, POST or Ajax:
Tools::getValue('input_name') 
Context has many useful properties filled with data depending on, the current state, the context! here's some examples:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/context.php&lt;/span&gt;

&lt;span class="c1"&gt;// returns the id of the current used language.&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// assign variables from current controller to the view&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;smarty&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="s1"&gt;'categories'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$categories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// the view&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'views/templates/admin/someadminhook.tpl'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// fetching the rendered content of a view,&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;smarty&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'module:your_module_dir_name/views/templates/front/display.tpl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// get current cart&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Global variable are prefixed with &lt;code&gt;_PS_&lt;/code&gt; and defined in &lt;code&gt;config/defines.inc.php&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;making a simple ajax call:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/ajax/display.php&lt;/span&gt;

&lt;span class="c1"&gt;// returns the id of the current used language.&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// assign variables from current controller to the view&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;smarty&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="s1"&gt;'categories'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$categories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// the view&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'views/templates/admin/someadminhook.tpl'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// fetching the rendered content of a view,&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;smarty&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'module:your_module_dir_name/views/templates/front/display.tpl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// get current cart&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/ajax/front.js&lt;/span&gt;

&lt;span class="c1"&gt;// preparing the ajax call inside a function&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getProductsByCategoryJs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;categoryId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ajax&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;url&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AJAX_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;async&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;dataType&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getProductsByCategoryPhp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;categoryId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;categoryId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;ajax&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;success&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#your-element&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ajaxTpl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;error&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/ajax/ajax.php&lt;/span&gt;

&lt;span class="c1"&gt;# my_module/controllers/front/display.php&lt;/span&gt;

&lt;span class="c1"&gt;// making the request url for our contoller in initContent() function&lt;/span&gt;
&lt;span class="nv"&gt;$url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Context&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getModuleLink&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s1"&gt;'my_module'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// module name&lt;/span&gt;
    &lt;span class="s1"&gt;'ajax'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// contoller name, could be 'display'&lt;/span&gt;
    &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="c1"&gt;// we can define more parameters here&lt;/span&gt;
        &lt;span class="c1"&gt;// 'action' =&amp;gt; 'DoSomeAction',&lt;/span&gt;
        &lt;span class="c1"&gt;// 'ajax' =&amp;gt; 1,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// making variable accessible in javascript&lt;/span&gt;
&lt;span class="nc"&gt;Media&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;addJsDef&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="s1"&gt;'AJAX_URL'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Free modules in prestashop addons cost
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;You can't upload your free module in prestashop addons store if you're not "Native module partnerships", it has to be paid.&lt;/li&gt;
&lt;li&gt;or, the funny thing, post it free on their forum: &lt;a href="https://www.prestashop.com/forums/forum/144-free-modules-themes/"&gt;https://www.prestashop.com/forums/forum/144-free-modules-themes/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  That's it!
&lt;/h1&gt;

&lt;p&gt;There are lots of things to talk about but I tried to put content from here and there for a better view for prestashop beginners (including me) and not getting confused because, it is, kinda.&lt;/p&gt;

&lt;p&gt;If you have any recommendation, improvement, found a typo just let me know the comments or fork &lt;a href="//github.com/moghwan/dev.to"&gt;this project&lt;/a&gt; and make your edits, any contribution is welcome.&lt;/p&gt;

</description>
      <category>prestashop</category>
      <category>php</category>
      <category>modules</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Dockerize your Laravel project with Laradock</title>
      <dc:creator>Marwane</dc:creator>
      <pubDate>Sat, 21 Nov 2020 18:53:34 +0000</pubDate>
      <link>https://dev.to/moghwan/dockerize-your-laravel-project-with-laradock-2io1</link>
      <guid>https://dev.to/moghwan/dockerize-your-laravel-project-with-laradock-2io1</guid>
      <description>&lt;p&gt;Hello dear artisans! Todays post I'll try to share my laravel/laradock workflow while using Nginx, and exploring/setting-up two database engines: postgres/mysql, alongside pgadmin, phpmyadmin or adminer, depending your choice.&lt;/p&gt;

&lt;p&gt;I'll try to do some extra steps and explain why, and I'll be boring too. I warned you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Laradock and not docker-compose?
&lt;/h2&gt;

&lt;p&gt;Here's my 2 cent: If you know the basics of docker-compose and want to switch between/quickly add modules with minimum configurations, you should consider using laradock. The only disadvantage using laradock is the long initial build time if you don't have a good download speed.&lt;/p&gt;

&lt;p&gt;Before starting you should have Docker installed in your machine. I tested these steps in Windows 10 and Manjaro Linux.&lt;/p&gt;

&lt;p&gt;The project will be named laraveldock&lt;/p&gt;

&lt;h2&gt;
  
  
  Prepare your virtual host
&lt;/h2&gt;

&lt;p&gt;Open your &lt;code&gt;hosts&lt;/code&gt; file as super user and add this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# /etc/hosts (linux)&lt;/span&gt;
&lt;span class="c"&gt;# C:\Windows\System32\drivers\etc\hosts (Windows)&lt;/span&gt;

127.0.0.1 laraveldock.test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Prepare your Laravel Project
&lt;/h2&gt;

&lt;p&gt;If you want to start with a new project open your terminal and install a new laravel project first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# You can use version 7 or 8&lt;/span&gt;
composer create-project &lt;span class="nt"&gt;--prefer-dist&lt;/span&gt; laravel/laravel laraveldock &lt;span class="s2"&gt;"7.*.*"&lt;/span&gt;

&lt;span class="nb"&gt;cd &lt;/span&gt;laraveldock
git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"init commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you already have a project just navigate to it in terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing and Configuring Laradock
&lt;/h2&gt;

&lt;p&gt;Laradock is basically just a git submodule, which means you can use you project without it in any LAMP stack or hosting. Run this git command as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# module directory should be unique for running multiple Laradock instances&lt;/span&gt;
git submodule add https://github.com/Laradock/laradock.git laradock-laraveldock

&lt;span class="c"&gt;# go to module dir&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;laradock-laraveldock

&lt;span class="c"&gt;# create a .env file from the example&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;env-example .env

&lt;span class="c"&gt;# open docker compose config file to add our virtual host&lt;/span&gt;
code docker-compose.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the same virtual host url added earlier in &lt;code&gt;host&lt;/code&gt; file like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# approximately line 375&lt;/span&gt;
&lt;span class="na"&gt;nginx&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# - frontend&lt;/span&gt;
    &lt;span class="c1"&gt;# - backend&lt;/span&gt;
    &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;frontend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;aliases&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;laraveldock.test&lt;/span&gt;
        &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;aliases&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;laraveldock.test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why? This is a minor fix when I worked with API calls in a SPA project, Laravel ad Vue combined to be precise. There is an alternative to do with nginx &lt;code&gt;.conf&lt;/code&gt; files but I prefer this method.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building docker images
&lt;/h2&gt;

&lt;p&gt;Just a note before continuing, I'll explain using both database engines (mysql and postgresql), with administration tools such as phpmyadmin, pgadmin and adminer.&lt;/p&gt;

&lt;p&gt;Before building the images be sure you're in the laradock directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;laradock-laraveldock

&lt;span class="c"&gt;# for mysql&lt;/span&gt;
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt; nginx mysql

&lt;span class="c"&gt;# for posqtgresql&lt;/span&gt;
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt; nginx postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go prepare another cup of coffee. I'm serious here.&lt;/p&gt;

&lt;p&gt;After build is finished you'll see your containers created. Navigate with your browser to &lt;a href="//laraveldock.test"&gt;laraveldock.test&lt;/a&gt;, you should see your homepage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus
&lt;/h3&gt;

&lt;p&gt;Navigate to your working directory in your container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nb"&gt;exec &lt;/span&gt;workspace bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laradock already installed many cli tools for us such as &lt;code&gt;artisan&lt;/code&gt;, &lt;code&gt;composer&lt;/code&gt;, &lt;code&gt;node&lt;/code&gt;, &lt;code&gt;npm&lt;/code&gt;, &lt;code&gt;yarn&lt;/code&gt;, &lt;code&gt;phpunit&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;vue&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up database
&lt;/h2&gt;

&lt;p&gt;In this step I'll use both cli and gui methods for both mysql and postgres.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mysql / PhpMyAdmin
&lt;/h3&gt;

&lt;p&gt;First let's build our phpmyadmin container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose down

docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt; nginx phpmyadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I Stopped all containers and run them again just to show you that phpmyadmin will automatically start mysql container, if you check &lt;code&gt;docker-compose.yml&lt;/code&gt; you'll notice that phpmyadmin depends on mysql. Same thing applies to &lt;code&gt;postgres&lt;/code&gt; and &lt;code&gt;pgadmin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Navigate to phpmyadmin with &lt;a href="//laraveldock.test:8081"&gt;laraveldock.test:8081&lt;/a&gt; and create your database (&lt;strong&gt;&lt;em&gt;lara_db&lt;/em&gt;&lt;/strong&gt; in my case) with these credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hostname&lt;/strong&gt;: mysql&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Username&lt;/strong&gt;: root&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt;: root&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or with cli as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nb"&gt;exec &lt;/span&gt;mysql bash

  mysql &lt;span class="nt"&gt;-uroot&lt;/span&gt; &lt;span class="nt"&gt;-proot&lt;/span&gt;
  create database lara_db&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;exit

exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Postgresql / PgAdmin
&lt;/h3&gt;

&lt;p&gt;Build your pgadmin container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose down

docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt; nginx pgadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigate to pgadmin with &lt;a href="//laraveldock.test:5050"&gt;laraveldock.test:5050&lt;/a&gt; and login with these credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Username&lt;/strong&gt; : &lt;a href="mailto:pgadmin4@pgadmin.org"&gt;pgadmin4@pgadmin.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt; : admin&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If your browser just keeps loading without any response it could be a permission issue, you can fix it by granting write permissions, &lt;a href="https://github.com/laradock/laradock/issues/2552"&gt;more details here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add a new server with these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hostname&lt;/strong&gt;: postgres&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: laradock&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Username&lt;/strong&gt;: default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt;: secret&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then create your database &lt;strong&gt;lara_db&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Or with cli as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nb"&gt;exec &lt;/span&gt;postgres bash

  psql &lt;span class="nt"&gt;-U&lt;/span&gt; default
  create database lara_db&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;exit

exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Connecting Laravel with Database
&lt;/h2&gt;

&lt;p&gt;Open your project &lt;code&gt;.env&lt;/code&gt; file - not the one inside laradock submodule disrectory - with your editor and edit these values as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;APP_URL&lt;/span&gt;=&lt;span class="n"&gt;http&lt;/span&gt;://&lt;span class="n"&gt;laraveldock&lt;/span&gt;.&lt;span class="n"&gt;test&lt;/span&gt;

&lt;span class="c"&gt;# for mysql
&lt;/span&gt;&lt;span class="n"&gt;DB_HOST&lt;/span&gt;=&lt;span class="n"&gt;mysql&lt;/span&gt;
&lt;span class="n"&gt;DB_DATABASE&lt;/span&gt;=&lt;span class="n"&gt;lara_db&lt;/span&gt;
&lt;span class="n"&gt;DB_USERNAME&lt;/span&gt;=&lt;span class="n"&gt;root&lt;/span&gt;
&lt;span class="n"&gt;DB_PASSWORD&lt;/span&gt;=&lt;span class="n"&gt;root&lt;/span&gt;

&lt;span class="c"&gt;# for postgresql
&lt;/span&gt;&lt;span class="n"&gt;DB_CONNECTION&lt;/span&gt;=&lt;span class="n"&gt;pgsql&lt;/span&gt;
&lt;span class="n"&gt;DB_HOST&lt;/span&gt;=&lt;span class="n"&gt;postgres&lt;/span&gt;
&lt;span class="n"&gt;DB_PORT&lt;/span&gt;=&lt;span class="m"&gt;5432&lt;/span&gt;
&lt;span class="n"&gt;DB_DATABASE&lt;/span&gt;=&lt;span class="n"&gt;lara_db&lt;/span&gt;
&lt;span class="n"&gt;DB_USERNAME&lt;/span&gt;=&lt;span class="n"&gt;default&lt;/span&gt;
&lt;span class="n"&gt;DB_PASSWORD&lt;/span&gt;=&lt;span class="n"&gt;secret&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You're done! to test it out try to migrate your schemas with artisan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nb"&gt;exec &lt;/span&gt;workspace bash
artisan migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A quick note: If you're on linux and you don't have permission to edit your project files with your editor you can simply run &lt;code&gt;chmod -R 777 *&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now whenever you want to stop and run you containers you'll use just these two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# stop containers&lt;/span&gt;
docker-compose stop

&lt;span class="c"&gt;# stop containers and remove all networks&lt;/span&gt;
docker-compose down

&lt;span class="c"&gt;# start myqsl, phpmyadmin and nginx&lt;/span&gt;
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; nginx phpmyadmin

&lt;span class="c"&gt;# or postgres, pgadmin and nginx&lt;/span&gt;
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; nginx pgadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And voilà!&lt;/p&gt;

&lt;p&gt;If you have any recommendation, improvment, found a typo just let me in the comments or fork &lt;a href="//github.com/moghwan/dev.to"&gt;this project&lt;/a&gt; and make your edits, any contibution is welcome.&lt;/p&gt;

&lt;p&gt;Hope you found this article helpful!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>laradock</category>
      <category>dockercompose</category>
    </item>
    <item>
      <title>Is linux good enough for everyday programming?</title>
      <dc:creator>Marwane</dc:creator>
      <pubDate>Sun, 19 Jul 2020 20:56:34 +0000</pubDate>
      <link>https://dev.to/moghwan/is-linux-good-enough-for-everyday-programming-3kol</link>
      <guid>https://dev.to/moghwan/is-linux-good-enough-for-everyday-programming-3kol</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Disclaimer: I’m writing about my experience with major OS (Windows 10, macOs High/Sierra, Ubuntu/Manjaro) using a Solid State Drive. It has a huge impact in term of speed and it could be different from your own experience.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hello there. To begin with, this post isn’t about what’s the best OS for everyday programming, it could depend on the stack used, Misc programs and specially YOU, so i’ll try to describe all the good/bad things that happened during my everyday workflows.&lt;/p&gt;

&lt;p&gt;But before that I should let you know my programming stack so you won't get confused later. I mainly use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PHP frameworks and CMS&lt;/li&gt;
&lt;li&gt;nodejs frameworks for frontend&lt;/li&gt;
&lt;li&gt;react native/ionic for mobile dev&lt;/li&gt;
&lt;li&gt;Photoshop (with CssHat) for HTML Integration, banner for mobile apps.&lt;/li&gt;
&lt;li&gt;ms office due to my current job.[1]&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Ubuntu (Unity/Gnome):
&lt;/h2&gt;

&lt;p&gt;By the end of 2015 and after a good run with Windows 7 and using Ubuntu just occasionally in virtual machines I thought I would give it a shot with a daily usage so I installed the 15.10 version. back then i was programming in PHP, Java and C# (because of my Software engineering Studies), php and apache had great performances locally, same for java but used a windows 7 VM for Visual Studio, Ms Office and Adobe Photoshop, because all the alternatives (Darkable/Gimp, Open office) weren't at the same levels. I tried but the more you use them the more you notice their weak points such as ease of use, backward compatibility.&lt;/p&gt;

&lt;p&gt;I had a good (exactly 2 years) run switching between Unity and Gnome DE (I was the n°1 hater for KDE btw), but over time and even with SSD it felt a kinda slow (I was always stuck with 16.04 LTS) and honestly, I wasn’t fan of the Ubuntu’s PPAs either and then I discovered the Hackintosh community.&lt;/p&gt;

&lt;h2&gt;
  
  
  macOs (10.12/10.14)
&lt;/h2&gt;

&lt;p&gt;So after a hell of an installation process I managed to run macOs Sierra smoothly on a laptop that has hardware near to macbook pro late 2012 (HP elitebook 840 G1). Apps installed with one simple drag n’ drop (applies to android studio too). It run the Android Virtual Device smoother than windows 7 and ubuntu with the same laptop, i was very surprised, the memory management, the apps integration and the overall stability was so great. At that time I finished my studies so no more Java or .Net programming, and the adobe/ms office suite was a strong point compared to Linux in general so every program ran natively without the need of any VM, with our beloved Unix cli.&lt;/p&gt;

&lt;p&gt;The only drawback I had with mac, or with hackintosh, is the system updates/upgrades it was so painful to do it breaks your system every time, I was backing up the whole bootable system image whenever I attempted to update. Because the Kexts (Kernel extensions or “drivers”) weren’t always backward compatible.&lt;/p&gt;

&lt;p&gt;So in the end i was thinking to go back to linux again but not sure which distribution i will stick with again, I wanted a stable distro that i forgot completely about something called upgrades of “big updates”. In the meantime I give Windows 10 another shot after hearing it got better and better in the last years.&lt;/p&gt;

&lt;p&gt;And again, after 2 years with no workflow complaints I backed up my hackintosh installation and installed the last build of windows 10.&lt;/p&gt;

&lt;h2&gt;
  
  
  Windows 10.
&lt;/h2&gt;

&lt;p&gt;I’ll resume my experience with one line: &lt;a href="https://youtu.be/Mg5HOnq7zD0?t=5"&gt;“not great, not terrible”&lt;/a&gt;&lt;br&gt;
Compared, again, to mac os the system was very smooth in every way, snapping windows, switching virtual desktops, programs and files search in the start menu, no problem but! I already missed the unix cli. Yeah I know there’s cmder and other tools. The overall performance was okay but there was some latency when compiling node js apps. My workflow didn’t change. I used Laragon for all my php projects with phpstorm and it was perfect honestly. On the other hand Android Emulator was terrible even with 8gb or ram and ssd, mac os was handling it way better.&lt;/p&gt;

&lt;p&gt;In the meantime I played with some linux distros in VMs and made the choice: Manjaro, KDE flavor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manjaro:
&lt;/h2&gt;

&lt;p&gt;“You said you hated KDE right?” well yes but for a cause, one I didn’t want to bring back the Gnome memories i had with Ubuntu and second, I disliked is because its similarity in UI compared to Windows in general, 10 specially then I found how very customizable was and again i’ll resume it with one line: “everything is a widget”. So in term of UI I made my &lt;a href="https://www.reddit.com/r/unixporn/comments/hs64as/"&gt;simple comfortable setup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now in term of programs and workflow I still use PhpStorm for my php and nodejs projects, npm and yarn installed globally and surprisingly npm run very fast compared to windows and mac; git already installed, but for my php projects I migrate all of them to docker with docker compose, majority of projects were based on Laravel, Prestashop, Wordpress and old native php apps. I managed to dockerize some of them from scratch, some with Laradock.&lt;/p&gt;

&lt;p&gt;Java/.Net: RIP.&lt;/p&gt;

&lt;p&gt;For mobile development there were some struggles during configuring ionic and react native’s first run but done with them quickly, no problem with android studio but the emulator “again” wasn’t that good as mac os, but not that bad like windows. And I discovered a helpful package that cast my connected android device to my screen and it’s shown as a virtual device but a physical one, called &lt;a href="https://github.com/Genymobile/scrcpy"&gt;scrcpy&lt;/a&gt; from the genymotion team!&lt;/p&gt;

&lt;p&gt;And finally these are just some of the benefits why I picked manjaro:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No big breaking updates.&lt;/li&gt;
&lt;li&gt;A rolling release distro.&lt;/li&gt;
&lt;li&gt;Fast security patches.&lt;/li&gt;
&lt;li&gt;The Great Arch User Repository (AUR)&lt;/li&gt;
&lt;li&gt;Snap and Flatpak support (but why?)&lt;/li&gt;
&lt;li&gt;Very stable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But still there are some drawback, linux’s ones in general:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Still needing photoshop and lightroom.&lt;/li&gt;
&lt;li&gt;Ms Office for work purpose (Managed to use Web version since we have ms365 but still miss Excel for heavy use)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;Finally and personally I’ll stick with linux for these main two reasons: native support for docker (future projects could be deployed with it) and the unix environment similarity to production servers (cli, ssh and packages’ configuration).&lt;br&gt;
I understand many of you will disagree for many things said in the post but &lt;a href="https://youtu.be/JZ017D_JOPY?t=223"&gt;that’s okay!&lt;/a&gt; because, finally, we choose what will help us to give the most of us in terms of productivity.&lt;/p&gt;

&lt;p&gt;Thank you all for reading the most boring post ever made on Dev.to platform! I would gladly hear from you some of your thoughts and experiences as well. Thanks again! [1]&lt;/p&gt;

&lt;p&gt;[1]: edit. added used stack and a conclusion.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Setup Prestashop CMS with Docker Compose</title>
      <dc:creator>Marwane</dc:creator>
      <pubDate>Sun, 28 Jun 2020 23:19:25 +0000</pubDate>
      <link>https://dev.to/moghwan/setup-prestashop-with-docker-compose-39mn</link>
      <guid>https://dev.to/moghwan/setup-prestashop-with-docker-compose-39mn</guid>
      <description>&lt;p&gt;So basically I want to dockerize all my php based projects (Wordpress, Laravel, Symfony...) after switching from OS to another, and Prestashop was among them.&lt;/p&gt;

&lt;p&gt;So I'm writing this (my first) post so it will be a kind of reference for me in the future and I'll do the same for the others frameworks/CMSs.&lt;/p&gt;

&lt;p&gt;Let’s dive into it!&lt;/p&gt;

&lt;p&gt;Before we start, clone this repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/moghwan/docker-prestashop-boilerplate.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repo structure should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-prestashop-boilerplate/
├── config/
│ └── presta.conf
├── .env
├── docker-compose-ps.yml
├── Dockerfile
├── prestashop_1.7.6.5.zip
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let me explain and show you files' content:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;config/presta.conf&lt;/strong&gt;: a config file for apache enabling virtual host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  &amp;lt;Directory /var/www/html&amp;gt;
    AllowOverride All
  &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;.env&lt;/strong&gt;: contains COMPOSE_PROJECT_NAME environment variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;COMPOSE_PROJECT_NAME=prestadock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s preferable to change it to your project name so we can avoid the collision with other running container with the same name, basically it just a prefix for containers’ names.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;docker-compose-ps.yml&lt;/strong&gt;: our compose file, we will remove the “-ps” suffixe later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '2'
services:

mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: prestashop
volumes:
- ./.docker/data/mysql/:/var/lib/mysql
- ./.docker/logs/mysql/:/var/log/mysql
ports:
- "3306:3306"

phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 8080:80
env_file:
- .env
environment:
PMA_HOST: mysql
VIRTUAL_HOST: phpmyadmin.test

app_dev:
build: .
environment:
- VIRTUAL_HOST=prestashop.test
volumes :
- ./:/var/www/html:rw
restart: always
ports:
- 80:80
links:
- "mysql"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt;: our docker image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM ubuntu:18.04
# Install.
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list &amp;amp;&amp;amp; \
apt-get update &amp;amp;&amp;amp; \
apt-get -y upgrade &amp;amp;&amp;amp; \
apt-get install -y build-essential &amp;amp;&amp;amp; \
apt-get install -y software-properties-common &amp;amp;&amp;amp; \
apt-get install -y byobu curl git htop man unzip vim wget &amp;amp;&amp;amp; \
rm -rf /var/lib/apt/lists/*
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y apache2 libapache2-mod-php
RUN apt install -y php unzip
RUN apt-get install -y php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc
COPY . /var/www/html:rw
COPY ./config/presta.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
# Define working directory.
WORKDIR /var/www/html
# Define default command.
EXPOSE 80
CMD apachectl -D FOREGROUND
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prestashop_1.7.6.5.zip&lt;/strong&gt;: the last stable archive downloaded from &lt;a href="https://www.prestashop.com/en/download"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;README.md&lt;/strong&gt;: a copy of the instructions explained in this post, just in case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s get started.
&lt;/h2&gt;

&lt;p&gt;First extract the archive then delete it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd docker-prestashop-boilerplate

unzip prestashop_1.7.6.5.zip &amp;amp;&amp;amp; rm prestashop_1.7.6.5.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's preferable to change the project name in the .env file to whatever you want.&lt;/p&gt;

&lt;p&gt;Then build the docker-compose-ps.yml and run the containers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose -f docker-compose-ps.yml up -d --build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll notice that another docker-compose.yml file already exists in the same directory, which was extracted from the prestashop zip file. but we will use ours because it includes the phpmyadmin image and some virtual hosts.&lt;/p&gt;

&lt;p&gt;After the build is finished the containers should be up.&lt;br&gt;
Now navigate to &lt;a href="http://localhost/"&gt;localhost&lt;/a&gt; in your browser and you should see this page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--55riDjtz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/vvsge0qh1pf90wnoalcg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--55riDjtz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/vvsge0qh1pf90wnoalcg.png" alt="Alt Text" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To fix this run these command inside the container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -ti prestadock_app_dev_1 bash
chown www-data:www-data -R .
exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that prestadock is the project name for my case.&lt;/p&gt;

&lt;p&gt;Refresh browser, the install process should begin.&lt;/p&gt;

&lt;p&gt;let's continue the install process step-by-step:&lt;/p&gt;

&lt;p&gt;Choose your language and continue.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--354v1gZO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/6xqd7grfo54epa3la0gw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--354v1gZO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/6xqd7grfo54epa3la0gw.png" alt="Alt Text" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agree to the licence and continue.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R6UiCW2G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/2l2basqvrdn7z7hcogz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R6UiCW2G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/2l2basqvrdn7z7hcogz6.png" alt="Alt Text" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill your store infos and continue.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fiT2_hMT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/a2lep6wixfn759dm22rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fiT2_hMT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/a2lep6wixfn759dm22rc.png" alt="Alt Text" width="800" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For database server type &lt;strong&gt;mysql&lt;/strong&gt;, and database password type &lt;strong&gt;root&lt;/strong&gt; as below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rJJTlX0m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/58yd004773phj8o3u6o9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rJJTlX0m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/58yd004773phj8o3u6o9.png" alt="Alt Text" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the database connection is failed (happened to me in another setup) you can create another mysql user and use it instead of root user as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -ti prestadock_mysql_1 bash
chown -R mysql:mysql /var/lib/mysql
mysql -u root -p
# password: root
CREATE USER 'ps_user'@'%' IDENTIFIED BY 'user';
GRANT ALL ON *.* TO 'ps_user'@'%';
FLUSH PRIVILEGES;
EXIT;
exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our mysql user is identified as &lt;strong&gt;ps_user&lt;/strong&gt; with &lt;strong&gt;user&lt;/strong&gt; as password.&lt;/p&gt;

&lt;p&gt;Now grab your second cup of coffee and chill for a moment.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YkUredaR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/immga6zlh61qv0eivrgu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YkUredaR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/immga6zlh61qv0eivrgu.png" alt="Alt Text" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now head to your store front office:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mGpVMnqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/5vmv25s2s97ikcn66esj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mGpVMnqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/5vmv25s2s97ikcn66esj.png" alt="Alt Text" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;tada!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--elAH1Wag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/4t181pe9gtyn3k7kqx9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--elAH1Wag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/4t181pe9gtyn3k7kqx9m.png" alt="Alt Text" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;before heading to the back office we should do some cleaning first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -ti prestadock_app_dev_1 bash

rm -rf install
rm docker-compose.yml
mv docker-compose-ps.yml docker-compose.yml
exit

docker-compose down --remove-orphans
docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can log into the back office without problems.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Mj_7O6fJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/zrd82b5yrfdj1wtttfw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Mj_7O6fJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/zrd82b5yrfdj1wtttfw0.png" alt="Alt Text" width="569" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so much zeros :o&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yOT7jF3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/8se0uyp64ahi36v2bf2n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yOT7jF3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/moghwan/dev.to/master/blog-posts/1-prestashop-docker-compose/assets/8se0uyp64ahi36v2bf2n.png" alt="Alt Text" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And voilà!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This Docker Compose Prestashop boilerplate was created to be able to jump from standard X/M/LAMP stack, mainly for my case, avoiding the hassle to install/configure local webserver after every OS switch (special thanks to linux :)).&lt;/p&gt;

&lt;h2&gt;
  
  
  Found a Typo?
&lt;/h2&gt;

&lt;p&gt;Just let me know in the comments. Hope you found this article helpful!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>prestashop</category>
    </item>
  </channel>
</rss>
