Jump to content

Rename ISBN, UPC, MPN for product combinations / specific References


Sycomor

Recommended Posts

Hello

I would like to rename isbn, upc and mpn on front office, for products with combinations.
for example; isbn=internal reference

For the simple product(without attributes/combinations), there s no problem because i added few lines on my product-details.tpl to show, and i can translate the names.
for example :
 {if isset($product.isbn) && !empty($product.isbn)}
 {$product_specific_references['internal reference']=$product.isbn}

But for the products with combinations, the "product.specific_references" are called differently, and i don't succeed in translate it.
these lines on the product-details.tpl :
...
{foreach from=$product.specific_references item=reference key=key}
              <dt class="name">{$key}</dt>
              <dd class="value">{$reference}</dd>
...

if i use the international/translations, it doesnt'work

If someone gets a solution, it would be great.

Many thanks

Link to comment
Share on other sites

  • 4 months later...

You can change below script in product-details.tpl to separately rename the references.

 

  {* if product have specific references, a table will be added to product details section *}
  {block name='product_specific_references'}
    {if !empty($product.specific_references)}
      <section class="product-features">
        <p class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</p>
          <dl class="data-sheet">
            {foreach from=$product.specific_references item=reference key=key}
              
             {if $key == 'upc'}
                <dt class="name">{'Barcode for Case'}</dt>
              {elseif $key == 'mpn'}    
                 <dt class="name">{'Barcode for Pack'}</dt>
              {elseif $key == 'ean13'}    
                 <dt class="name">{'Barcode for Each'}</dt>
              {else}
                <dt class="name">{$key}</dt>
              {/if}
              <dd class="value">{$reference}</dd>
            {/foreach}
          </dl>
      </section>
    {/if}

Link to comment
Share on other sites

thanks for the help

like in the last responds: product_details.tpl get's the information from the the product.specific_references. 

I have to check this now

 

I thought that it would be much easier... 😁 I found the translations, but this changes only in admin section. I hoped that it's just a translation or just a small text change, not modifying the complete code

Instead Mpn (which is shown in product details / front page) it should be "Phznr". The rest is okay. This little change is really annoying... 

 

 

 

Screenshot-2023-05-22-101423.png

Edited by Edward7 (see edit history)
  • Like 1
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...