Overriding shop templates
To override existing shop templates, you need to create a design for your shop.
| ezdesign:
design_list:
my_shop: [my_shop_theme, transaction_theme, eshop_base_theme, checkout_base_theme]
templates_theme_paths:
eshop_base_theme:
- '%kernel.project_dir%/vendor/ezsystems/ezcommerce-shop/src/Silversolutions/Bundle/EshopBundle/Resources/views'
checkout_base_theme:
- '%kernel.project_dir%/vendor/ezsystems/ezcommerce-checkout/src/bundle/Resources/views/themes/base_theme/'
transaction_theme:
- '%kernel.project_dir%/vendor/ezsystems/ezcommerce-transaction/src/Siso/Bundle/ShopFrontendBundle/Resources/views/themes/base_theme/'
|
Template theme paths
All shop bundles contain an ez_design.yml
file which is used to define the templates_theme_path
path to the templates.
Without the template theme path, the templates are not recognized by the design engine.
In ezplatform.yaml
, indicate that the design should be used for the relevant scope, for example, for the site_group
SiteAccess group:
| site_group:
design: my_shop
|
Place your override templates in templates/themes/<theme_name>
.
For example, to override the left menu in the product catalog view, place the template in
templates/themes/my_shop_theme/Navigation/left_menu.html.twig
:
| {{ fos_httpcache_tag('siso_menu') }}
<nav>
<h2>{{ 'Our products:'|trans }}</h2>
<hr>
{{ ses_product() }}
<hr>
<ul class="side-nav js-side-nav" role="navigation">
{{ knp_menu_render(menu, {'template': '@ezdesign/Navigation/knp_left_menu.html.twig'}) }}
</ul>
</nav>
|