0

We're approaching to build a custom theme, from scratch, for Prestashop (v1.7) for the first time (while we come from advanced experience in Wordpress custom themes, like using Sage 9).

So we are studying what starter theme using as foundation. We need SCSS, JS ES6, Webpack.

The docs is really unclear: here it says about this Starter Theme but at the same time the danger alert at the top page warns that "This project is not maintained anymore by the core team." Indeed on the repo GitHub says "This project is not maintained anymore by the core team. Theme improvements must be brought instead to the classic theme in the PrestaShop repository".

Someone points to this other theme.

So, what should we do, use Starter theme (not maintained) or Classic theme (that it's not a starter theme)? Really confusing.

Fred K
  • 13,249
  • 14
  • 78
  • 103

2 Answers2

1

In my experience as a module developer i would recommend to use the prestashop classic theme as base. This theme comes with all prestashop installations and will always be updated if issues occur.

Getting default classic theme:

Go to the back-office of a freshly installed prestashop 1.7+ Navigate in the left column to Design > Theme & Logo

You can see on the top right side of the page a button called Export current theme.

You will receive a .zip file which can be installed on any Prestashop webshop.

The .zip file will also learn you more about the folder structure you need.

Codding validation

Please bare in mind that Prestashop maintains a high codding standard which needs to be approved trough their validator (https://validator.prestashop.com/). Failing the validator will result in denial for uploading your packet tho there add-ons market.

Crezzur
  • 1,303
  • 2
  • 18
  • 37
  • Hi Crezzur, thanks for answering. We don't want to build a theme for selling on the market, but for a specific client, so the validator part doesn't touch us. With this additional detail, you advice anyway to duplicate Classic and build the custom theme starting from that? Notice that we need to change the whole layout of each template, *not* just some simple modifications. – Fred K Mar 25 '20 at 15:18
  • Hi Fred, The custom theme's i have encountered always have 70 to 90 % of the prestashop native modules which are needed for the theme also. When you start from an already modded theme you might encounter unnecessary issues. The Classic theme has only the core modules installed to there theme. This gives you the freedom of adding whatever you want. Using another theme might set you back in time when you need to remove unnecessary codding. However if you find a theme which does wat you want and only need small modifications you could use this theme. Its all up to you. – Crezzur Mar 25 '20 at 15:26
1

I successfully created some fully customized themes and modules for some customers. I ended up taking the Classic theme (beceause we are guaranted that it is up to date) and stripping files, testing each time that prestashop still works properly.

I also used the Prestashop's source code to figure out which tpl were necessary (because sometimes it's not that straightforward).

You can get rid of a lot of tpl file. It took few days to actually have something really minimal to build on.

Here is the list of template file we are using in one of our projects, it might help you (we merged a lot a tpl files that were split in multiple files) :

.
./catalog
./catalog/listing
./catalog/listing/product-list.tpl
./catalog/product.tpl
./catalog/_partials
./catalog/_partials/miniatures
./catalog/_partials/miniatures/product.tpl
./checkout
./checkout/cart-empty.tpl
./checkout/cart.tpl
./checkout/checkout-process.tpl
./checkout/checkout.tpl
./checkout/order-confirmation.tpl
./checkout/_partials
./checkout/_partials/address-form.tpl
./checkout/_partials/address-selector-block.tpl
./checkout/_partials/customer-form.tpl
./checkout/_partials/steps
./checkout/_partials/steps/addresses.tpl
./checkout/_partials/steps/payment.tpl
./checkout/_partials/steps/personal-information.tpl
./checkout/_partials/steps/shipping.tpl
./checkout/_partials/steps/unreachable.tpl
./cms
./cms/category.tpl
./cms/page.tpl
./cms/sitemap.tpl
./cms/stores.tpl
./contact.tpl
./customer
./customer/address.tpl
./customer/addresses.tpl
./customer/authentication.tpl
./customer/guest-login.tpl
./customer/guest-tracking.tpl
./customer/history.tpl
./customer/identity.tpl
./customer/my-account.tpl
./customer/order-detail.tpl
./customer/order-follow.tpl
./customer/order-return.tpl
./customer/order-slip.tpl
./customer/registration.tpl
./customer/_partials
./customer/_partials/address-form.tpl
./customer/_partials/customer-form.tpl
./customer/_partials/login-form.tpl
./errors
./errors/404.tpl
./errors/forbidden.tpl
./errors/maintenance.tpl
./index.tpl
./layouts
./layouts/layout.tpl
./page.tpl
./_partials
./_partials/form-errors.tpl
./_partials/form-fields.tpl
./_partials/subcategory_list.tpl

There might still be some room for simplification, especially on the "customer" part.

JulienCC
  • 446
  • 2
  • 11
  • Thanks Julien for sharing your experience. We ended up using Classic Rocket https://github.com/PrestaShop/classic-rocket . It's an updated fork of the default Classic but frankly it's not well supported and bad Webpack configs. They say it's better because on Classic we can't upgrade to latest Bootstrap since it could not work anymore. On Classic I saw that SCSS files are chaotic (ie. a bunch of rules inside theme.scss!) – Fred K Apr 17 '20 at 14:51