Q&A: Add custom contents below the reference field about shipping and payment

PrestaShop user question

Please take a look on the image below. This is an example of the product page. If You see this field "referenca" and "stanje". Under this field i would like to add two additional field with payment information and shipping information. I want that the same information display on all products. Can You please help me what i have to add to which file or is this a module that do this job. Thanks


PrestaShop expert answer

Hello,
You can achieve this in a Two ways. First - is a modification of your theme file: product.tpl, Second is a paid module html box pro (module allows to put custom contents anywhere you want).
I will explain here how to achieve this with modification of product.tpl file

First method
Open file product.tpl located in your theme directory. Find there code like:
<p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}> <label>{l s='Reference:'} </label> <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span> </p> {if !$product->is_virtual && $product->condition} <p id="product_condition"> <label>{l s='Condition:'} </label> {if $product->condition == 'new'} <link itemprop="itemCondition" href="https://schema.org/NewCondition"/> <span class="editable">{l s='New product'}</span> {elseif $product->condition == 'used'} <link itemprop="itemCondition" href="https://schema.org/UsedCondition"/> <span class="editable">{l s='Used'}</span> {elseif $product->condition == 'refurbished'} <link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/> <span class="editable">{l s='Refurbished'}</span> {/if} </p> {/if}
Below this code just add own contents, these contents will appear on each product page then. You can put there a code (html) of course.
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment