Jump to content

How to add custom fields to the products details


adknath

Recommended Posts

Hi there,

In this case, you need to change your theme.

Step 1:

Open product.tpl file (via ftp, or cpanel): public_html/themes/your_current_theme/templates/catalog/product.tpl

Step 2: Add the title of the tab Product customization

EX: theme classic: go to line code 172 add this pieces code:

{if $product.is_customizable && count($product.customizations.fields)}
                      <li class="nav-item">
                      <a
                        class="nav-link"
                        data-toggle="tab"
                        href="#customizations"
                        role="tab"
                        aria-controls="customizations">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
                    </li>
                  {/if}

Step 3: Add the content of tab Product customization

{* Add the content of tab Product customization*}
                 <div class="tab-pane fade in" id="customizations" role="tabpanel">
                 {if $product.is_customizable && count($product.customizations.fields)}
                    {block name='product_customization'}
                      {include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
                    {/block}
                  {/if}
                  </div>
                  {* End of add the content of tab Product customization*}

Step 4: Remove old code of Product customization

Hope it helpful.

 

6-13-2020 4-23-29 PM.jpg

6-13-2020 4-22-02 PM.jpg

6-13-2020 4-25-02 PM.jpg

6-13-2020 4-28-33 PM.jpg

Link to comment
Share on other sites

On 6/13/2020 at 10:30 AM, prestamonste said:

Hi there,

In this case, you need to change your theme.

Step 1:

Open product.tpl file (via ftp, or cpanel): public_html/themes/your_current_theme/templates/catalog/product.tpl

Step 2: Add the title of the tab Product customization

EX: theme classic: go to line code 172 add this pieces code:

{if $product.is_customizable && count($product.customizations.fields)}
                      <li class="nav-item">
                      <a
                        class="nav-link"
                        data-toggle="tab"
                        href="#customizations"
                        role="tab"
                        aria-controls="customizations">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
                    </li>
                  {/if}

Step 3: Add the content of tab Product customization

{* Add the content of tab Product customization*}
                 <div class="tab-pane fade in" id="customizations" role="tabpanel">
                 {if $product.is_customizable && count($product.customizations.fields)}
                    {block name='product_customization'}
                      {include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
                    {/block}
                  {/if}
                  </div>
                  {* End of add the content of tab Product customization*}

Step 4: Remove old code of Product customization

Hope it helpful.

 

6-13-2020 4-23-29 PM.jpg

6-13-2020 4-22-02 PM.jpg

6-13-2020 4-25-02 PM.jpg

6-13-2020 4-28-33 PM.jpg

Thank you, I appreciate you effort...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...