CMS Magento Mastering Development

show text in item description for currently selected attribute

Magento 1.9.3

I have a custom piece of code in the description.phtml page for a product. This description auto populates if the item has attributes associated with it.

This works well for my purpose but to refine it further I would like it to show instead of the products attribute show the currently selected attribute from the drop downs on the product page.

ie. if a custom changes the size of a product, in the description instead of showing (default size for product eg: Size L) it would show the currently selected size( eg. size M)

I realise this would require some sort of ajax call to load this.. or not? Im not that advanced yet in coding.

thought it worth asking the question as it would make a great addition to my product pages.

here is the current code I am using to show text.

<?php if ($_product->getData("finger_size") == true){
echo " this ring comes in size ",$_product->getData("finger_size"),"

Leave a Reply

Your email address will not be published. Required fields are marked *