All posts of ecommage

PHP Primer: Namespaces

After spending a bit of time poking around a Magento 1 codebase, I was reminded that Magento 2 is going to be some developer’s first major experience with PHP namespaces. Beyond Magento, many PHP systems still live in a namespaceless world, and other systems do their best to shield developers from needing to understand namespaces. […]

PHP Primer: Interfaces

On a “what they do level”, interfaces are pretty simple. Consider the following PHP class We’re all (I hope!) familiar with the idea of one class extending another. Interfaces allows a PHP class to do something else. With interfaces, a PHP class may also implement something <?php class Foo extends Bar implements BazInterface { } In the above […]

File & Folder permission problem

After installing Magento 2, we have to update permission follow this guide: Basically, this guide does not work with some web server that uses Fast-CGI which use permission 755 for folders and 644 for files. But if Magento generates new files or directories, those will have the permission 770 and 660 again. You can edit those […]

How to check display shipping method base on condition ?

How to check display shipping method base on condition ? In magento 2, as we know we have free shipping is shipping base on price to display, we can make other shipping display base on condition (based on order total, country, …). In this article, we will take an example to check whether dispay a […]