Jump to content

Edit History

finnenhawke

finnenhawke

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".

 

finnenhawke

finnenhawke

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. 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".

 

finnenhawke

finnenhawke

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 codes 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. 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".

 

×
×
  • Create New...