Jump to content

Display selected attribute on product page


FoodAssets

Recommended Posts

I've searched the forums for this and have not found out how to do this.

 

We want to display the selected product attribute on the product.tpl page. Right now, it just shows the product reference, but what I need to do is show the selected attribute also. We use v1.6.1.2.

 

https://foodassets.com/apples/van-drunen-farms-apple-dices-freeze-dried.html

 

This is the code that needs to be updated in product.tpl

 

            <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
                <label>{l s='Item #:'}  </label>
                <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
            </p>
 

I can't figure out what the proper variable is called. Shopping-cart.tpl uses {$product.id_product_attribute} but that doesn't seem to work.

 

What is the actual name of the variable that stores the selected attribute name?

Link to comment
Share on other sites

  • 2 weeks later...

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