{"id":4622,"date":"2019-08-29T06:59:18","date_gmt":"2019-08-29T06:59:18","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=4622"},"modified":"2019-08-29T08:24:16","modified_gmt":"2019-08-29T08:24:16","slug":"sylius-standard-edition","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/08\/29\/sylius-standard-edition\/","title":{"rendered":"Sylius Standard Edition"},"content":{"rendered":"<p>READ: https:\/\/sylius.com\/download\/<br \/>\nMake sure to use PHP 7.2<br \/>\nDownload via composer and create a new app &#8216;sylius-app&#8217;<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius$ composer create-project sylius\/sylius-standard sylius-app<\/pre>\n<p>go to the app directory<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius$ cd sylius-app\/<\/pre>\n<p>Install!<br \/>\nNOTE: make sure the &#8216;timezone&#8217; variable for PHP is already set! if not, You&#8217;d get this error &#8216;timezone | ERROR!&#8217;. Check the variable in \/etc\/php\/7.2\/cli\/php.ini file. Set like this (for example): date.timezone = Asia\/Jakarta<br \/>\nNOTE: Make sure to create a new file for override the default env. the new file is &#8216;.env.local&#8217;. (ref: https:\/\/docs.sylius.com\/en\/1.5\/book\/installation\/installation.html)<br \/>\nI want this app stores file in &#8216;sylius_app&#8217; database. So here is the file content<\/p>\n<pre class=\"lang:default decode:true \">DATABASE_URL=mysql:\/\/username:password@host\/my_sylius_database_name<\/pre>\n<p>Change the parameters like username, password, etc to fit your system.<br \/>\n<span class=\"rcp-restricted-content-message\">SORRY, ONLY ADMIN CAN SHOW THIS!<\/span><br \/>\nThen run the install command<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius\/sylius-app$ php bin\/console sylius:installInstalling Sylius...\r\n                                                                  \r\n           ,                                                       \r\n         ,;:,                                                      \r\n       `;;;.:`                                                     \r\n      `::;`  :`                                                    \r\n       :::`   `          .'++:           ''.   '.                  \r\n       `:::             :+',;+'          :+;  `+.                  \r\n        ::::            +'   :'          `+;                       \r\n        `:::,           '+`     ++    :+.`+; `++. ;+'    ''  ,++++.\r\n         ,:::`          `++'.   .+:  `+' `+;  .+,  ;+    +'  +;  ''\r\n          ::::`           ,+++.  '+` :+. `+;  `+,  ;+    +'  '+.   \r\n   ,.     .::::             .++` `+: +'  `+;  `+,  ;+    +'  `;++; \r\n`;;.:::`   :::::             :+.  '+,+.  `+;  `+,  ;+   `+'     .++\r\n .;;;;;;::`.::::,       +'` `++   `++'   `+;  `+:  :+. `++'  '.  ;+\r\n  ,;;;;;;;;;:::::       .+++++`    ;+,    ++;  ++, `'+++,'+' :++++,\r\n   ,;;;;;;;;;:::`                  ;'                              \r\n    :;;;;;;;;;:,                :.:+,                              \r\n     ;;;;;;;;;:                 ;++,\r\n\r\nStep 1 of 4. Checking system requirements.\r\n------------------------------------------\r\n\r\nSuccess! Your system can run Sylius properly.\r\n\r\nStep 2 of 4. Setting up the database.\r\n-------------------------------------\r\n\r\nCreating Sylius database for environment dev.\r\n 2\/2 [\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591] 100%\r\n\r\nLoading sample data for environment dev from suite default.\r\nWarning! This action will erase your database.\r\nContinue? (y\/N) y\r\n 1\/1 [\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591] 100%\r\n\r\n\r\nStep 3 of 4. Shop configuration.\r\n--------------------------------\r\n\r\nCurrency (press enter to use USD): \r\nAdding US Dollar currency.\r\nLanguage (press enter to use en_US): \r\nAdding American English Language.\r\nAdding en_US locale.\r\nCreate your administrator account.\r\nE-mail: advcha@yahoo.com\r\nUsername (press enter to use email): admin\r\nChoose password:\r\nConfirm password:\r\nAdministrator account successfully registered.\r\n\r\n\r\nStep 4 of 4. Installing assets.\r\n-------------------------------\r\n\r\nInstalling Sylius assets for environment dev.\r\nCreated \"\/home\/teddy\/Documents\/works\/sylius\/sylius-app\/public\/assets\" directory.\r\n 1\/1 [\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591] 100%\r\n\r\n                                                                                \r\n [OK] Sylius has been successfully installed.                                   \r\n                                                                                \r\n\r\nYou can now open your store at the following path under the website root: \/<\/pre>\n<p>My settings:<br \/>\n<span class=\"rcp-restricted-content-message\">SORRY, ONLY ADMIN CAN SHOW THIS!<\/span><\/p>\n<p>Install Assets<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius\/sylius-app$ yarn install\r\nyarn install v1.12.3\r\n[1\/4] Resolving packages...\r\n[2\/4] Fetching packages...\r\ninfo fsevents@1.2.9: The platform \"linux\" is incompatible with this module.\r\ninfo \"fsevents@1.2.9\" is an optional dependency and failed compatibility check. Excluding it from installation.\r\n[3\/4] Linking dependencies...\r\n[4\/4] Building fresh packages...\r\nwarning Your current version of Yarn is out of date. The latest version is \"1.17.3\", while you're on \"1.12.3\".\r\ninfo To upgrade, run the following command:\r\n$ curl --compressed -o- -L https:\/\/yarnpkg.com\/install.sh | bash\r\nDone in 12.45s.<\/pre>\n<p>Then run gulp to build the frontend<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius\/sylius-app$ yarn run gulp\r\nyarn run v1.12.3\r\n$ gulp build\r\n[14:05:22] Requiring external module babel-register\r\n[14:05:22] Using gulpfile ~\/Documents\/works\/sylius\/sylius-app\/gulpfile.babel.js\r\n[14:05:22] Starting 'build'...\r\n[14:05:22] Starting 'buildAdmin'...\r\n[14:05:22] Starting 'buildShop'...\r\n[gulp-chug] Gulpfile, gulpfile.babel.js, contents is empty. Reading directly from disk...<\/pre>\n<p>Run the cli server<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/sylius\/sylius-app$ php bin\/console server:start\r\n\r\n                                                                                \r\n [OK] Server listening on http:\/\/127.0.0.1:8000<\/pre>\n<p>Open it on your browser: http:\/\/localhost:8000<br \/>\nHere is the screenshots<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4627\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage-1024x705.png\" alt=\"\" width=\"840\" height=\"578\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage-1024x705.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage-300x207.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage-768x529.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage-1200x827.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/Sylius-local-homepage.png 1366w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>Admin login: http:\/\/localhost:8000\/admin\/login<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-administration-login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4628\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-administration-login.png\" alt=\"\" width=\"525\" height=\"451\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-administration-login.png 525w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-administration-login-300x258.png 300w\" sizes=\"auto, (max-width: 525px) 85vw, 525px\" \/><\/a><\/p>\n<span class=\"rcp-restricted-content-message\">SORRY, ONLY ADMIN CAN SHOW THIS!<\/span><br \/>\nHere is the admin dashboard<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4629\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard-1024x628.png\" alt=\"\" width=\"840\" height=\"515\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard-1024x628.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard-300x184.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard-768x471.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard-1200x736.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2019\/08\/sylius-admin-dashboard.png 1366w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>MODIFICATION<br \/>\nCREATE A NEW ROUTE AND CONTROLLER<br \/>\nREAD: https:\/\/alanstorm.com\/symfonys-service-container\/<br \/>\nMODIFY THE ROUTE IN config\/routes.yaml<\/p>\n<pre class=\"lang:default decode:true \">a_unique_identifier:\r\n    path: \/advcha_helloworld\r\n    methods: [GET]\r\n    controller: App\\MyControllers\\Advcha\\HelloWorldController::showHello\r\n<\/pre>\n<p>THEN CREATE A CONTROLLER IN src\/MyControllers\/Advcha\/HelloWorldController.php<\/p>\n<pre class=\"lang:default decode:true \">&lt;?php\r\nnamespace App\\MyControllers\\Advcha;\r\n\r\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\r\n\r\nclass HelloWorldController extends AbstractController{\r\n    public function showHello(){\r\n        echo \"Hello World!\";\r\n        exit;\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>READ: https:\/\/sylius.com\/download\/ Make sure to use PHP 7.2 Download via composer and create a new app &#8216;sylius-app&#8217; teddy@teddy:~\/Documents\/works\/sylius$ composer create-project sylius\/sylius-standard sylius-app go to the app directory teddy@teddy:~\/Documents\/works\/sylius$ cd sylius-app\/ Install! NOTE: make sure the &#8216;timezone&#8217; variable for PHP is already set! if not, You&#8217;d get this error &#8216;timezone | ERROR!&#8217;. Check the variable in &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/08\/29\/sylius-standard-edition\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sylius Standard Edition&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101,33],"tags":[],"class_list":["post-4622","post","type-post","status-publish","format-standard","hentry","category-sylius","category-symfony"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=4622"}],"version-history":[{"count":6,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4622\/revisions"}],"predecessor-version":[{"id":4631,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4622\/revisions\/4631"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=4622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=4622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=4622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}