Since Version 3, J2Store comes with a sub-templating system that is very similar to the K2 content construction kit’s system.Sub-templates allows store owners to have finer control over their product layouts. They can move the pieces around and have a unique design for their store front.
IMPORTANT: Sub-templates work only with J2Store Product List Layout. They will not work with any other layouts.
The J2Store package by default comes with two sub-templates
- Default (supports Bootstrap 2)
- Bootstrap3 (supports Bootstrap 3)
The sub-templates are located in the following location: /components/com_j2store/templates
You can take one of these as your base to create your own sub-template. The best way is by copying an existing sub-template
Let us create a sub-template called: foo
Using a FTP client or your hosting cpanel’s File manager, go to /components/com_j2store/templates
Copy the default folder (copy the entire folder)
Now go to /templates/<YOUR_TEMPLATE>/html/com_j2store/templates/ folder
You will see the folder: default.
Rename it as: foo
Now go to /templates/<YOUR_TEMPLATE>/html/com_j2store/templates/foo
You will a list of files
- files starting with default_* = controls the list view
- files starting with view_* = controls the detail product view
There are four master files (one for each product type)
Similarly, you will find the files for detail single product view (view_simple.php, view_configurable.php, view_variable.php and view_downlodable.php)
You will have to edit these files and organise your layout. These master files in turn will call child templates as well (which are common for many product types)