matl Posted October 19, 2015 Share Posted October 19, 2015 Hello, I would like to add the dimensions like width, heigth, depth and so on of a product to the different product pages. I added via product preferences the values width (breite), heigth (Höhe) and depth (Tiefe). Now I would like to give these values automatically the value I imported with my .csv file. The value of width, heigth and depth is available in the transport section of the product, but it is not shown yet on the product page. The question is, how could I show the different values on the product page, without, however to enter every value manually to the different products. Is there a module for this or is it possible to enter a special value to the vaule of the preference to do this automatically for all products? Thank's for your help Kind regards Tobias Link to comment Share on other sites More sharing options...
Daaaaad Posted October 14, 2019 Share Posted October 14, 2019 Hello @matl, on PrestaShop 1.7 you can add this block in your template (templates/catalog/_partials/product-details.tpl) : {block name='product_dimensions'} {if $product.width > 0} <div class="product-width"> <label class="label">{l s='Width' d='Shop.Theme.Catalog'} </label> <span>{sprintf("%.0f", $product.width)} {Configuration::get('PS_DIMENSION_UNIT')}</span> </div> {/if} {if $product.height > 0} <div class="product-height"> <label class="label">{l s='Height' d='Shop.Theme.Catalog'} </label> <span>{sprintf("%.0f", $product.height)} {Configuration::get('PS_DIMENSION_UNIT')}</span> </div> {/if} {if $product.depth > 0} <div class="product-depth"> <label class="label">{l s='Depth' d='Shop.Theme.Catalog'} </label> <span>{sprintf("%.0f", $product.depth)} {Configuration::get('PS_DIMENSION_UNIT')}</span> </div> {/if} {if $product.weight > 0} <div class="product-weight"> <label class="label">{l s='Weight' d='Shop.Theme.Catalog'} </label> <span>{sprintf("%.0f", $product.weight)} {Configuration::get('PS_WEIGHT_UNIT')}</span> </div> {/if} {/block} It will show width, height, depth and weight of the product if set (> 0). Regards, David. 2 Link to comment Share on other sites More sharing options...
stoverpd Posted March 29, 2021 Share Posted March 29, 2021 Thank-you David, i had the same needs... But I would want to know if it's possible to get the same informations about weight,size... for each declination (variations of a product) when customer choose one various item product? Best regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now