PrestaShop 1.7 - classic theme installation


Module in prestashop 1.7 uses default prestashop's hook displayProductListReviews - you do not have to follow any advances modifications of files. During configuration of the module select this position. 

As you already know - this module right after installation assigns "combinations table" to hook named displayProductDeliveryTime . Unfortunately - this hook is not available in PrestaShop 1.7 'classic' theme anymore. Because of this we have to add this hook manually to theme file responsible for the product thumb.

 

If you use non-default theme, please verify if theme settings does not allow to turn on / off this position. Search there for option like "show reviews on list of products". Some of themes also uses feature named "apPageBuilder" that allows to design list of products. You will have to enable this default position there.

How to add displayProductDeliveryTime to classic theme?

To add support of this hook to new PrestaShop 1.7 we have to alter .tpl file of 'classic' theme. We need to add there special shortcode that executes the hook. The shortcode is:

    {hook h='displayProductDeliveryTime' product=$product}

Copy it and open the file: /themes/classic/templates/catalog/_partials/miniatures/product.tpl and at the end of the file, right before paste this shortcode. You can see the modified code below. I highlighted line with shortcode - so you can see where to add it exactly.

{block name='product_thumbnail'} {$product.cover.legend} {/block}
{block name='product_name'}

{$product.name|truncate:30:'...'}

{/block} {block name='product_price_and_shipping'} {if $product.show_price}
{if $product.has_discount} {hook h='displayProductPriceBlock' product=$product type="old_price"} {$product.regular_price} {if $product.discount_type === 'percentage'} {$product.discount_percentage} {/if} {/if} {hook h='displayProductPriceBlock' product=$product type="before_price"} {$product.price} {hook h='displayProductPriceBlock' product=$product type='unit_price'} {hook h='displayProductPriceBlock' product=$product type='weight'}
{/if} {/block}
{block name='product_flags'}
    {foreach from=$product.flags item=flag}
  • {$flag.label}
  • {/foreach}
{/block}
{l s='Quick view' d='Shop.Theme.Actions'} {block name='product_variants'} {if $product.main_variants} {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants} {/if} {/block}
    {hook h='displayProductDeliveryTime' product=$product}

 

Result of modification

theme supports displayProductDeliveryTime now and module will work with PrestaShop 1.7 classic theme properly. Screenshot below.

product list attributes