getting value of product features

i have this script in the product page which is working fine:




Now i need to replace the isbn number with a dynamic value coming from "ISBN" found in one my the Product Features. How can i get $features.value_int to use in my script?

any help is appreciated.

thanks.

If that’s the right variable, then just replace your ISBN number with {$features.value_int} DO NOT INCLUDE YOUR SCRIPT WITHIN {literal} TAGS.



I must have missed something because this answer seems too obvious… :slight_smile:

sorry i wasnt very clear with my post :frowning: i tried that but it didnt work.



$features.value_int is actually just a guess and its not working

Im trying to find out how to use the values in one of the product features. I previously used $product.product_code for this purpose but i’m now using a separate field (under product features) for ISBN.



thanks!

Add a {debug} to your file. Then look for the $product variable and see where your info lies. Then use the resulting variable as {$product.features.name} or whatever is appropriate.

thank you. i did that but i can’t still figure out how to get it. here’s from the debug console



product_features => Array (4)

8 => Array (17)

feature_id => “8”

feature_type => “O”

parent_id => “0”

display_on_product => “1”

display_on_catalog => “0”

description => “ISBN”

prefix => "ISBN "

suffix => “”

categories_path => “165,166,167,168,169,171,172,173,174,1…”

full_description => “”

status => “A”

comparison => “N”

position => “1”

group_position => “”

value => “”

variant_id => “”

value_int => “545010225”



I need to use the value_int of feature_ID=8 (ISBN) in my code.



thanks!

Need to see the full listing for product_features. Is this it’s own variable or is this an element of the $product?

{$product_features[8].value_int} would do it if in fact the array element is suffixed with ‘8’. But I doubt it is so you’ll have to find the right ‘key’ by looping through the array.



Please use the code tag and include everything that is in the variable where you are finding this.

you rock. that did it. i used this

{$product.product_features[8].value_int}



thanks!

But this could break if you ever do an import or make any other change to the product. You would be better served to go through the extra work of looping through the $product.product_features array looking for the name you want and then storing it in a variable for use later.



Just a recommendation to keep you from pulling your hair out later.