Jump to content
finnenhawke

ISBN/EAN-13/UPC references show up ONLY if product has combinations - PrestaShop 1.7.5.1

Recommended Posts

Posted (edited)

I either do not understand the intent behind the way it works or there is a bug with displaying specific references. As you know, in PrestaShop you can set up ISBN,  EAN-13 and UPC codes (references) for each product. It is done in "Options" tab when editing the product ("Condition & References" section). As I understand, these codes should show up in the product details section called "Specific References". Except they don't, because that section doesn't show up, even though there is a code for it in product-details.tpl:

    {* 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}
                <dt class="name">{$key}</dt>
                <dd class="value">{$reference}</dd>
              {/foreach}
            </dl>
        </section>
      {/if}
    {/block}

However, when I change the product type from "Simple product" to "Product with combinations" and add a single combination (without adding any specific references to that individual combination), these references from "OPTIONS > Conditions & References" tab immediately show up! What's more, when I even go one step further and set individual ISBN/EAN-13/UPC codes for each combination, they also show up and switch correctly. So it's working fine, but for some reason it's not working on product without combinations. Is this intended? Why can't it work the same for simple product and show the ISBN/EAN13/UPC?

If it's not intended then it must be a bug in PrestaShop that prevents showing Specific References in "Simple products". Is there any way I could fix this? I know that I can manually force showing EAN-13/ISBN/UPC codes by adding it directly to product.tpl file. However, it's not a good fix. It will work for simple products, but on "products with combinations" it will be a mess since the specific references will show up twice (from my forced code AND from the above code that works only on products with combinations). 

Is there any way that I could fix this? Or is there any way I could create code similar to the above that is limited only to simple products? Something that would work like that "IF Product Type = Simple Product SHOW [ EAN13 / ISBN / UPC ]". Sadly, I don't know Smarty and PHP so it's very hard for me to put this logic into actual code. I know how to call for EAN/ISBN/UPC code but I don't know how to limit that "call" only to "simple products".

 

Edited by finnenhawke (see edit history)

Share this post


Link to post
Share on other sites

I've found this problem too.   Hopefully PrestaShop will soon have a resolve for this issue.

Mark
www.TopToners.com

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More