Get Current Value Of Product Options

Hi All.

Im using a smarty block in a product tab.

I am trying to display the currently selected values for some of the options but even when the options are changed they do not seem to update their current value.

I have tried the following.

Used Javascript to get the current selected value of the item when it is changed. This just always shows the initial value. when i change the option choice it seems to refresh the form and then revert back to the original value even though the selected item is shown in the dropdown box. i have tried using javascript to force the "Selected" text to the value that is chosen. i can see in console that the "selected" text moves but then reverts back to the initial value again.

I have tried using the smarty variables to show the product option for the value in the array for the $products.prodcut_options[19].value but it never changes. and also to show from $products.selected_options again never changes.

i have used the debug mode to watch the values and even when changing the option they do not change. i presume that the must only update once the item is added to cart?

Is there any way to achieve what i am trying to do?

Many Thanks


Is there any further information I could post to get any help with this?

many thanks

Can anyone point me in the direction for help on this please? should i contact support or is this a paid development i should be looking for?


Are you using JQuery or Javascript to access the elements?

Suggest you use an 'change' JQuery event to get the value when an element is changed.

Option updates and application of modifiers is generally an AJAX request. So if your section is within one of the result_ids on the product page then it will be refreshed from Smarty data in the template.