@@ -16,17 +16,23 @@ class PrestashopSetup extends BaseSetup {
1616 ],
1717 'database ' => true ,
1818 'resources ' => [
19- 'archive ' => [ 'src ' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.5 /prestashop_1.7.6.5 .zip ' ],
19+ 'archive ' => [ 'src ' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.7.1 /prestashop_1.7.7.1 .zip ' ],
2020 ],
2121
2222 ];
2323
2424 public function install (array $ options =null ) : bool
2525 {
2626 parent ::install ($ options );
27-
2827 $ this ->appcontext ->archiveExtract ($ this ->getDocRoot ($ this ->extractsubdir . '/prestashop.zip ' ), $ this ->getDocRoot ());
29-
28+ //check if ssl is enabled
29+ $ this ->appcontext ->run ('v-list-web-domain ' ,[$ this -> appcontext ->user (),$ this -> domain ,'json ' ],$ status );
30+ if ($ status ->code !== 0 ) {
31+ throw new \Exception ("Cannot list domain " );
32+ }
33+
34+ if ($ status -> json == 'no ' ){ $ ssl_enabled = 0 ; }else { $ ssl_enabled = 1 ;}
35+
3036 $ this ->appcontext ->runUser ('v-run-cli-cmd ' , [
3137 "/usr/bin/php " ,
3238 $ this ->getDocRoot ("/install/index_cli.php " ),
@@ -37,8 +43,9 @@ public function install(array $options=null) : bool
3743 "--lastname= " . $ options ['prestashop_account_last_name ' ],
3844 "--password= " . $ options ['prestashop_account_password ' ],
3945 "--email= " . $ options ['prestashop_account_email ' ],
40- "--domain= " . $ this ->domain ], $ status );
41-
46+ "--domain= " . $ this ->domain ,
47+ "--ssl= " . $ ssl_enabled ,], $ status );
48+
4249 // remove install folder
4350 $ this ->appcontext ->runUser ('v-delete-fs-directory ' , [$ this ->getDocRoot ("/install " )]);
4451 $ this ->cleanup ();
0 commit comments