Jump to content

Edit History

María_Amieva

María_Amieva


Forgot ps version

Hi.

I have a similar problema. On product page I want to show the reference and the supplier reference, I have achieved this

{if isset($product.reference_to_display)}
                <div class="product-reference">
                    <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label>
                    <span itemprop="sku">{$product.reference_to_display}</span>
                </div>
 {/if}
 {if isset($product.supplier_reference) && $product.supplier_reference != ''}    
                <div class="product-supplier-reference">
                    <label class="label">{l s='Referencia del fabricante' d='Shop.Theme.Catalog'} </label>
                    <span itemprop="sku">{$product.supplier_reference}</span>
                </div>
 {/if}

but when a product has combinations and you change to another combination, the page refreshes, but it continues to show the references of the product, not the combination

I have tried with the code that WissQQ says by overriding the ProductController.php, but in product.tpl when I do a var_dump of the $group variable it returns null, so I don't know what I'm doing wrong, nor if exactly this code will change me references when changing to another combination.

Can anybody help me?

 

Thanks

 

Edit: I'm using prestashop 8.1.3

Hi.

I have a similar problema. On product page I want to show the reference and the supplier reference, I have achieved this

{if isset($product.reference_to_display)}
                <div class="product-reference">
                    <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label>
                    <span itemprop="sku">{$product.reference_to_display}</span>
                </div>
 {/if}
 {if isset($product.supplier_reference) && $product.supplier_reference != ''}    
                <div class="product-supplier-reference">
                    <label class="label">{l s='Referencia del fabricante' d='Shop.Theme.Catalog'} </label>
                    <span itemprop="sku">{$product.supplier_reference}</span>
                </div>
 {/if}

but when a product has combinations and you change to another combination, the page refreshes, but it continues to show the references of the product, not the combination

I have tried with the code that WissQQ says by overriding the ProductController.php, but in product.tpl when I do a var_dump of the $group variable it returns null, so I don't know what I'm doing wrong, nor if exactly this code will change me references when changing to another combination.

Can anybody help me?

 

Thanks

×
×
  • Create New...