Skip to content

Commit

Permalink
Installation instruction fix, yml fix, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Jun 2, 2021
1 parent f81889c commit 6e43195
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ This theme was created to deliver starter theme with latest developers tools and

### Installation

1. Clone or download repository. Make sure to remove branch name (`master`).
1. Go to [releases](https://github.com/Oksydan/modern-prestashop-starter-theme/releases/) and download latest version `starter.zip` file not source code.

2. Download required modules and place them into `{shop_dir}/modules/` folder. Make sure that folder name of module don't contain branch name.
3. If you want to change theme name unzip file. Change folder name e.g. `your-theme-name` then go to `config/theme.yml` and change:

3. Unzip theme file and place it inside `{shop_dir}/themes/`.

4. If you want to change theme name unzip file. Change folder name e.g. `your-theme-name` then go to `config/theme.yml` and change:
```yml
name: starter
display_name: display
Expand All @@ -70,17 +74,18 @@ to:
name: your-theme-name
display_name: my theme display name
```
Name in `theme.yml` must be equal folder name. Zip theme folder and install theme from prestashop BO.
Name in `theme.yml` must be equal folder name.

4. If you changed theme name you have to go to `is_themecore` module. Find `hookActionFrontControllerSetMedia` method and change:
5. If you changed theme name you have to go to `is_themecore` module. Find `hookActionFrontControllerSetMedia` method and change:
```php
$themeAssetsObject = new ThemeAssets($pageName, 'starter', $this->context);
```
to:
```php
$themeAssetsObject = new ThemeAssets($pageName, 'your-theme-name', $this->context);
```
5. Open in terminal directory `your-theme-name/_dev` and run:

6. Open in terminal directory `your-theme-name/_dev` and run:
- for `npm` :
```
npm install
Expand All @@ -89,8 +94,22 @@ npm install
```
yarn install
```
6. Go to `your-theme-name/_dev/webpack` and find `.env-example`. Copy file and rename it with `.env`. Replace example value with proper one based on your setup.
7. Now try to run:

7. Go to `your-theme-name/_dev/webpack` and find `.env-example`. Copy file and rename it with `.env`. Replace example value with proper one based on your setup.

8. Now try to run:
- for `npm` :
```
npm run build
```
- for `yarn` :
```
yarn build
```

9. Go in BO to Design->Theme & Logo and turn on theme. Now starter should be displayed correctly in FO and modules should be installed.

10. Now try to run:
- for `npm` :
```
npm run dev
Expand All @@ -99,7 +118,7 @@ npm run dev
```
yarn dev
```
If your `.env` file is correctly setup. Your browser will open front office of your store.
If your `.env` file is correctly setup. Your browser will open FO of your store.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion _dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modern-prestashop-build-tool",
"version": "1.0.3",
"version": "1.1.1",
"description": "Modern tools that help you develop your theme.",
"main": "index.js",
"scripts": {
Expand Down
9 changes: 1 addition & 8 deletions config/theme.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: starter
display_name: starter theme
version: 1.0.3
version: 1.1.1
author:
name: "Igor Stępień"
email: "igor@istepien.dev"
Expand Down Expand Up @@ -132,10 +132,3 @@ theme_settings:
new-products: layout-left-column
prices-drop: layout-left-column
contact: layout-left-column

dependencies:
modules:
- is_themecore
- is_shoppingcart
- is_imageslider
- is_searchbar

0 comments on commit 6e43195

Please sign in to comment.