Skip to content

Commit 49e4f3e

Browse files
committed
Merge branch 'master' of https://github.com/vuefront/prestashop
2 parents 3aef704 + f2146fc commit 49e4f3e

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

README.md

+75
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ This is a PrestaShop module that connects the PrestaShop CMS with the VueFront W
3232

3333
[VueFront on PrestaShop](https://prestashop.vuefront.com/)
3434

35+
![VueFront for PrestaShop admin panel](http://joxi.net/E2p1aYlS7JP05A.jpg)
36+
3537
### PrestaShop Blog (PrestaBlog)
3638
Since PrestaShop does not have a built-in Blog, we use [PrestaBlog](https://addons.prestashop.com/en/blog-forum-new/4731-professional-blog.html) to add blog support. If PrestaBlog is not avalible, VueFront will ignore it.
3739

@@ -45,6 +47,79 @@ Php version required >= 5.5, <= 7.2 (this limitation will be removed in the futu
4547

4648
You will need the CMS Connect URL to complete the [VueFront Web App installation](https://vuefront.com/guide/setup.html)
4749

50+
## Deploy VueFront Web App to hosting (static website)
51+
### via VueFront Deploy service (recommended)
52+
1. Install the VueFront CMS Connect App from this repo.
53+
2. Log in or register an account with VueFront.com
54+
3. Build your first Web App
55+
4. Activate the new Frontend Web App (only avalible for Apache servers)
56+
> For Nginx you need to add this code to your `nginx.config` file right after the `index` directive
57+
```
58+
location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
59+
try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
60+
}
61+
```
62+
63+
64+
### via ftp manually
65+
1. Install the VueFront CMS Connect App from this repo.
66+
2. Log in or register an account with VueFront.com
67+
3. Copy the CMS Connect URL
68+
4. Via Ftp create a new folder `vuefront` in the root of your PrestaShop site on your hosting.
69+
5. Via command line build your VueFront Web App ([read more](https://vuefront.com/guide/setup.html))
70+
```
71+
yarn create vuefront-app
72+
# When promote, provide the CMS Connect URL, which you coppied at step 3.
73+
yarn generate
74+
```
75+
6. Copy all files from folder `dist` to the newly created `vuefront` folder
76+
7. modify you `.htaccess` file by adding after `RewriteBase` rule the following rules:
77+
```htaccess
78+
# VueFront scripts, styles and images
79+
RewriteCond %{REQUEST_URI} .*(_nuxt)
80+
RewriteCond %{REQUEST_URI} !.*/vuefront/_nuxt
81+
RewriteRule ^([^?]*) vuefront/$1
82+
# VueFront sw.js
83+
RewriteCond %{REQUEST_URI} .*(sw.js)
84+
RewriteCond %{REQUEST_URI} !.*/vuefront/sw.js
85+
RewriteRule ^([^?]*) vuefront/$1
86+
# VueFront favicon.ico
87+
RewriteCond %{REQUEST_URI} .*(favicon.ico)
88+
RewriteCond %{REQUEST_URI} !.*/vuefront/favicon.ico
89+
RewriteRule ^([^?]*) vuefront/$1
90+
# VueFront pages
91+
# VueFront home page
92+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
93+
RewriteCond %{QUERY_STRING} !.*(rest_route)
94+
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html -f
95+
RewriteRule ^$ vuefront/index.html [L]
96+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
97+
RewriteCond %{QUERY_STRING} !.*(rest_route)
98+
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html !-f
99+
RewriteRule ^$ vuefront/200.html [L]
100+
# VueFront page if exists html file
101+
RewriteCond %{REQUEST_FILENAME} !-f
102+
RewriteCond %{REQUEST_FILENAME} !-d
103+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
104+
RewriteCond %{QUERY_STRING} !.*(rest_route)
105+
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html -f
106+
RewriteRule ^([^?]*) vuefront/$1.html [L,QSA]
107+
# VueFront page if not exists html file
108+
RewriteCond %{REQUEST_FILENAME} !-f
109+
RewriteCond %{REQUEST_FILENAME} !-d
110+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
111+
RewriteCond %{QUERY_STRING} !.*(rest_route)
112+
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html !-f
113+
RewriteRule ^([^?]*) vuefront/200.html [L,QSA]
114+
```
115+
116+
> For Nginx you need to add this code to your nginx.config file right after the index rule
117+
```
118+
location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
119+
try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
120+
}
121+
```
122+
48123
## Support
49124
For support please contact us at [Discord](https://discord.gg/C9vcTCQ)
50125

vuefront.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct()
2424
{
2525
$this->name = 'vuefront'; // internal identifier, unique and lowercase
2626
$this->tab = 'front_office_features'; // backend module coresponding category
27-
$this->version = '0.2.0'; // version number for the module
27+
$this->version = '2.0.0'; // version number for the module
2828
$this->author = 'VueFront'; // module author
2929
$this->need_instance = 0; // load the module when displaying the "Modules" page in backend
3030
$this->bootstrap = true;

0 commit comments

Comments
 (0)