Child pages
  • Najlepsze praktyki

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contentsSpis treści 

Table of Contents
maxLevel2

Best practices

There are a few steps you can take, from designing your theme in Photoshop to optimizing you code for search engines, which have been established as being the must-do for theme development. Following these best practices will help you build a better theme.

Thinking ahead

Before opening Photoshop, GIMP or any other graphic editor, you should sit at a desk with a pen and a sheet paper, and think of the map/hierarchy for your shop, making it as flexible as possible (not all shops have the same amount of categories, or of products per category).

A complete PrestaShop theme requires at least 30 pages or page sections:

  • Home page
  • Category page
  • Product page
  • Product comparison page
  • Search results page
  • "My Account" and its inner pages:
    • My vouchers
    • Orders history
    • Personal information
  • "My Cart"
  • Authentication page
  • Account creation
  • Checkout pages:
    • Addresses list
    • Shipping costs
    • Payment choice (check, bank transfer)
    • One page checkout
  • Address creation
  • Delivery page
  • Maintenance page
  • Manufacturers list and single manufacturer page
  • Suppliers list and single supplier page
  • The 404 page ("Page not found")
  • "Best sales" page
  • "New products" page
  • "Current promotions" page
  • "Forgotten password" page
  • Legal notice
  • Sitemap
  • Stores page
  • Contact form

Please do take all these into account, so as to not forget any. Failing to take some page into account may result in an incomplete theme, and thus a bad experience for your users.

In truth, these 30 files just make sure you scratch the surface. To get a better sense of the pages you should take into account, dive into the default theme, located in the /themes/default folder. It has no less than 60 template files, not mentioning the CSS, JavaScript and image files, along with the mobile version (in the /themes/default/mobile folder) which has its own set of 58 template files, along with its own CSS, JavaScript and image files.

Once you feel good about your shop's hierarchy and mandatory template files, make a few sketches of the interface, in order to get a feel of where the various elements will be placed: new products, promotions, pictures, text, etc.). Also, include the important details, such as the various mentions on the product's page: on sale, promotion, new product, stricken price...).

Of course, these are just general tips; some professional might prefer to do it all directly in Photoshop, and then jump right into PHP/Smarty, HTML and CSS.

Designing in Photoshop

You are seldom alone when creating a theme: whether a colleague or a client, there are many occasions when you will have to share your design with other people. You should therefore make it easy for them to work with it out-of-the-box.

One of the first thing to do is to provide a work in the RGB color space, in 72 dpi, and to always provide the non-flattened file (unless it is for the final client, in which case you should provide the flattened one, unless he paid for the non-flattened version explicitly).
In general, you should never flatten a design, unless you are certain you are never going to want to edit it again.

When building a PrestaShop theme, you should work with a 980px width and, depending on your uses, with:

...

Najlepsze praktyki 

Istnieje kilka kroków, które można podjąć, od projektowania motywu w programie PrestaShop do optymalizacji kodu dla wyszukiwarek, które zostały określone jako konieczne do rozwoju tematu. Postepując zgodnie z tymi praktykami można zbudować lepszy motyw. 

Patrzeć w przyszłość

Przed otwarciem Photoshop, GIMP lub innego edytora graficznego, należy usiąść przy biurku z piórem i arkuszem papieru i pomysleć o mapie strony/hierarchi dla swojego sklepu, dzięki czemu będzie on tak elastyczny jak to tylko mozliwe (nie wszystkie sklepy mają taką samą ilosc kategorii lub produktów w każdej kategorii) 

Kompletny temat PrestaShop wymaga co najmniej 30 stron i stron sekcji.

  • Strona główna
  • Strona kategorii 
  • Strona produktu
  • Strona porównywarki produktów
  • Strona wyników wyszukiwania
  • "Moje Konto" i jego wewnętrzne strony:
    • Moje kupony 
    • Historia zamówień 
    • Informacje osobiste 
  • "Mój koszyk"
  • Strona uwierzytelniena
  • Utworzenie konta 
  • Strony zamówienia:
    • Lista adresów Addresses list
    • Koszty wysyłki 
    • Wybór płatności Payment choice (czek, przelew bankowy) 
    • Zakup na jednej stronie 
  • Stworzenie adresu 
  • Strona dostawy 
  • Strona konserwacji 
  • Lista producentów i jedna strona producenta 
  • Lista dostawców i strona jednego dostawcy 
  • Strona 404 ("Strony nie znaleziono") 
  • Strona "Najczęściej kupowane"
  • Strona "Nowe produkty" 
  • Strona "Aktualne promocje" 
  • Strona "Zapomniałem chasła" 
  • Nota prawna 
  • Mapa strony 
  • Strona sklepów 
  • Formularz kontaktowy 

Weż te wszystkie sekcje i strony pod uwagę, tak aby o żadnym z nich nie zapomnieć. Nie uwględniając jednej ze stron, może spowodować, że temat będzie niekompletny, a więc będzie to złe doświadczenie dla twoich klientów.

W rzeczywistości, upewnij się, że te 30 plików zostało dodanych.  Aby uzyskać lepszy sens strony, należy wziąc pod uwagę i zgłębić domyślny temat, który zlokalizowany jest w folderze /themes/default .Nie ma więcej niż 60 plików szablonów, nie wspominając już o CSS, JavaScript i plikach graficznych wraz z wersją mobilną  (w folderze /themes/default/mobile ) który ma swój własny zestaw 58 plików szablonów, wraz z własnym CSS, JavaScript i plikami graficznymi.

Kiedy czujesz się dobrze w hierarchii swojego sklepu i obowiązkowych plików szablonów, zrób kilka szkiców interfejsu, aby zorientować się gdzie zostaną umieszczone różne elementy: Nowe produkty, promocje, obrazy, tekst, etc.). Ponadto zawierają one ważne dane, takie jak wzmianki na stronie produktu: w sprzedaży, promocji nowego produktu, obniżone ceny...)

Oczywiście są to tylko tylko ogólne wkażówki; niektórzy profesjonalisci wolą zrobić to bezpośednio w PrestaShop, a następnie przejść do PHP/Smarty , HTML, CSS

Projektowanie w Photoshop

Rzadko jesteśmy sami podczas tworzenia tematu: Nie zależnie czy z kolegą, lub klientem jest wiele sytuacji, kiedy będziesz musiał się dzielić swoim proejktem z innymi ludźmi. Dlatego będzie im łatwiej pracować jeśli będą myśleć niestandardowo. 

Jedną z pierwszych rzeczy do zrobienia jest dostarczenie prac w przestrzeni kolorów RGB w 72 dpi. i zawsze zapewnić niepłaski plik ( chyba, że jest to dla kilenta końcowego, w takim przypadku, należy podać płaski plik, chyba, że wyraźnie zapłacił za nie spłaszczoną wersję)

Ogólnie rzecz biorąc, nigdy nie należy spłaszczać projektu, chyba że masz pewność, że nie będą chcieli edytować go ponownie. 

Przy budowie motywu PrestaShop, należy pracować z 980px szerokości w zależności od zastosowań, wraz z 

  • Jeden folder Photoshop dla wszytkich wartt tekstowych, dzięki czemu developrzy mogą łatwo uzyskać dostęp do projektu.
  • Jeden folder Photoshop na projektowany blok (nowe produkty, najlepiej się sprzedające,etc.).

Color space

Always rely on RGB. Do not ever use CMYK, which is made for print.

Units

When designing for the Web, the base unit is the pixel. Do not measure in picas, points or centimeters.

Font

Do not use atypical fonts! Keep it readable at all times!

...

Of course, you can use any font you like when designing a graphic, such as the header image or a slide-show picture.

Font size

Never forget that the user has the final say on the text size, since modern browsers can increase or decrease it at the touch of a keyboard key.
As a matter of fact, you should test your website with various browser variations, see how easy it is break your design... and therefore rework your design in order to avoid such easy breakage.

...

  • Titles: 18px.
  • Smaller titles: 14px.
  • Regular text: 10 to 12px.

Transparency

Transparent images do not work well with older browsers, particularly with Internet Explorer, so you should stay away from 24-bits PNG images. As for GIF images with transparency, use the over a plain background to ensure they work properly. Avoid 50% opacity by using the same matte color as the website's background color.

Miscellaneous

  • Test your theme with all of PrestaShop's options activated, so as to see how the theme reacts.
  • Edit a product in order to see how the various options influence your design (promotion, new product, etc. …)... if it does at all.
  • Make sure to have a homogeneous style for your shop.

Usability

We won't delve into complex human–computer interaction theories here, but rather try to make sure that your shop is accessible to as many potential customers as possible. Your ultimate goal should be to have visitors trust your shop enough so that they star buying.

...

When design your shop's theme, keep in mind that its mission (in addition to selling goods, of course) is to show your visitors that your website is managed by serious and competent people.

The home page

This is the most important page of your shop, the one where it is "hit or miss". This is the page where the visitor will get a general opinion of your shop, and decide if she should trust you with her money.

...

Clearly display your Return Merchandise conditions, your general T&C and other applicable laws that you respect.

The product page

A visitor only comes to the product page if she's interested by said product, and wants more details. There should therefore be aplenty of those.

...

Make sure to display all the relevant labels: "New product", "Promotion", "Voucher", etc. Also, do not forget to add the delivery delays.

The conversion funnel: "My Account" and related pages

The conversion funnel is where your visitors become client (hence the use of "conversion", or sometimes "transformation"). If these pages are badly designed or structured, this can mean the loss of many potential clients, and therefore all the order they would have made on your site. To learn more about the conversion funnel, read this Wikipedia page: http://en.wikipedia.org/wiki/Conversion_funnel.

Account creation / "My Account"

The default PrestaShop theme comes with an account form that gives a very good transformation percentage. But it might still not suit your own site's needs. Hence, here are a few tips to follow if you intend to update the form.

  • Be basic, keep the essential only. The visitor must concentrate on the account creation, and the purchase. See how Amazon does it.
  • Reduce the number of steps. The user must know how many steps she still has to go through before she can actually finalize her purchase.
  • Clearly display any mistake the user makes, right next to form field. Errors should be displayed in a distinct color (red is a favorite), and mandatory fields should indicated (with an asterisk *, for instance).

Payment

The visitor has created her client account, great! But it's still not over yet, she must now go through the purchase itself.

...

All these usability tips are just part of the whole story, but they can bring you a solid ground on which building your theme, in order to improve your shop.

Optimizing images

One important thing to keep in mind is that images slow a shop down, especially if the images are not optimized. This section shows you how to optimize images, but at the end of the end, the optimization is to only keep the important images, and let go of the others.
There are just a few important images on a shop theme: the products images/thumbnails, the shop's logo or header, and maybe the homepage's slideshow. Most of the rest can be easily replaced by clever use of CSS and HTML, especially if it belongs to the shop's design. Keep the number of images on any page to a minimum: the faster a shop will be, the longer a potential customer will be willing to browser its page.

...

  • Pngnq: converts 24-bit PNG files into 6 to 8-bit ones, by only keeping the needed colors.
    Download: http://pngnq.sourceforge.net/
    Sample command line: pngnq -vf -s1 image.png
  • OptiPNG: tests several compression methods on a PNG file in order to find the best one.
    Download: http://optipng.sourceforge.net/
    Sample command line: optipng -o7 image-nq8.png
  • pngcrush: another PNG optimization tool.
    Download: http://pmt.sourceforge.net/pngcrush/
    Sample command line: pngcrush image.png -rem all -reduce -brute result.png
  • jpegtran: performs lossless operations on JPEG images.
    Download: http://jpegclub.org/jpegtran/
    Sample command line: jpegtran -copy none -optimize -perfect src.jpg dest.jpg

Key SEO tips

Improving your site ranking is key to getting new clients. While we will not dive into SEO in this section, there is a handful of tips you should strive for:

...