Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
litespeed_wiki:cache:lscps:customization_1_7 [2018/02/05 21:05] Jackson Zhang [Make changes to template] |
litespeed_wiki:cache:lscps:customization_1_7 [2018/02/05 21:36] Lisa Clarke Proofreading |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Customizing PrestaShop v1.7 for use with LSCWP ====== | + | ====== Customizing PrestaShop v1.7 for Use with LSCPS ====== |
PrestaShop v1.7 [[http://developers.prestashop.com/themes/smarty/helpers.html#widgets|introduces]] ''{widget}'' and ''{widget_block}'' elements that can be used in Smarty templates directly. | PrestaShop v1.7 [[http://developers.prestashop.com/themes/smarty/helpers.html#widgets|introduces]] ''{widget}'' and ''{widget_block}'' elements that can be used in Smarty templates directly. | ||
Line 17: | Line 17: | ||
</code> | </code> | ||
- | If the widget also includes a hook parameter, you need to include that in ''litespeedEsiBegin'' as well. For example, ''{widget name="module_name" hook=”specific_hook”}'' | + | If the widget also includes a hook parameter, you need to include that in ''litespeedEsiBegin'' as well. For example, ''{widget name="module_name" hook="specific_hook"}'' |
will change to | will change to | ||
<code> | <code> | ||
- | {hook h="litespeedEsiBegin" m="module_name" field="widget" hook=”specific_hook”} | + | {hook h="litespeedEsiBegin" m="module_name" field="widget" hook="specific_hook"} |
{widget name="module_name"} | {widget name="module_name"} | ||
{hook h="litespeedEsiEnd"} | {hook h="litespeedEsiEnd"} | ||
Line 51: | Line 51: | ||
This allows us to use ESI to punch a hole for this widget and regenerate the content later. | This allows us to use ESI to punch a hole for this widget and regenerate the content later. | ||
- | ===== An Example: Warehouse theme ===== | + | ===== An Example: Warehouse Theme ===== |
Let’s take the “warehouse” template as an example, and say ''header.tpl'' located at ''themes/warehouse/templates/_partials/header.tpl'' uses variant 1. | Let’s take the “warehouse” template as an example, and say ''header.tpl'' located at ''themes/warehouse/templates/_partials/header.tpl'' uses variant 1. | ||
Line 63: | Line 63: | ||
As the above code indicated, the actual header template is ''{include file='_partials/_variants/header-1.tpl'}'' | As the above code indicated, the actual header template is ''{include file='_partials/_variants/header-1.tpl'}'' | ||
- | You will need to modify _partials/_variants/header-1.tpl. Make sure you backup your file before doing any changes. | + | You will need to modify ''_partials/_variants/header-1.tpl''. Make sure you backup your file before doing any changes. |
vi _partials/_variants/header-1.tpl | vi _partials/_variants/header-1.tpl | ||
Line 136: | Line 136: | ||
{/if} | {/if} | ||
- | then you will need to backup 7 header files and make changes to these templates from header-1.tpl to header-7.tpl, the same way as above showed. | + | In this case, you will need to back up 7 header files and make changes to these templates from ''header-1.tpl'' to ''header-7.tpl'', the same way as shown above. |