magento-configurable-simple icon indicating copy to clipboard operation
magento-configurable-simple copied to clipboard

Dynamically update displayed product 'additional information'

Open syncddesign opened this issue 12 years ago • 11 comments

I've displayed some of the additional attribute information on the product view, However the additional information at the bottom update, but my call outs don't...

Is there anything I can do to get these to change when flicking between products ?

For instance i've callout the 'Brand' attribute after the product name to make it more prominent, but this does not update when change product. Brand: getAttributeText('brand') ?>

Sorry if i've not explained the problem very well...

Steve

syncddesign avatar Nov 01 '12 18:11 syncddesign

I have that code

=$_product->getAttributeText('your_attribute_name')?>

And it works

pandeo avatar Nov 01 '12 18:11 pandeo

Not sure whats i've done wrong but its not changing

Have a look... http://c4890068.myzen.co.uk/magento/index.php/wools-yarns/brand/araucania/aysen-8.html?color=Black

I have even tried getData

syncddesign avatar Nov 01 '12 18:11 syncddesign

In additional attributes seting 1 brand but in description other one? Thats the problem or woot?:)

pandeo avatar Nov 01 '12 18:11 pandeo

Sorry not sure what you mean... if you open the additional information tab you can see the brand change when clicking between colours, but the brand callout at the top does not change.

syncddesign avatar Nov 01 '12 19:11 syncddesign

Aha! Understood now what a problem is. Will try to do some researches today to figure out. Will report as soon i will find out how to do that, or willnt find :)

pandeo avatar Nov 01 '12 19:11 pandeo

Thank you

syncddesign avatar Nov 01 '12 19:11 syncddesign

Did some researches and found that: Dynamically update displayed product 'additional information' - doing in JS And i couldnt find solution how to put it as a code separetly, im sorry

pandeo avatar Nov 01 '12 20:11 pandeo

Gutted... Thanks for looking pandeo.

Anyone else out there have any ideas?

syncddesign avatar Nov 01 '12 21:11 syncddesign

This is the JS for Name... Can I some how adapt it to do Brand?

Product.Config.prototype.updateProductName = function(productId) { var productName = this.config.productName; if (productId && this.config.childProducts[productId].productName) { productName = this.config.childProducts[productId].productName; } $$('#product_addtocart_form div.product-name h1').each(function(el) { el.innerHTML = productName; }); };

syncddesign avatar Nov 05 '12 16:11 syncddesign

Its very easy(This is only for magento extension 1.8+) go to \skin\frontend\base\default\js directory

In scp_product_extension.js change some coding search for Product.Config.prototype.updateProductAttributes and change the id only like this

Product.Config.prototype.updateProductAttributes = function(productId) { var productAttributes = this.config.productAttributes; if (productId && this.config.childProducts[productId].productAttributes) { productAttributes = this.config.childProducts[productId].productAttributes; }

//Please note I changed only id here

$$('#product-attribute-specs-table').each(function(el) { el.innerHTML = productAttributes; decorateTable('product-attribute-specs-table'); }); };

I am sure this is working perfectly.

thegreatrravi avatar Feb 09 '15 08:02 thegreatrravi

Dear! I've got something new for you, you'll definetely love it, take a look at http://one.thinkhrhotline.com/e6syoq

Thx, info

syncddesign avatar Oct 15 '16 18:10 syncddesign