magento-configurable-simple
magento-configurable-simple copied to clipboard
Dynamically update displayed product 'additional information'
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
I have that code
=$_product->getAttributeText('your_attribute_name')?>And it works
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
In additional attributes seting 1 brand but in description other one? Thats the problem or woot?:)
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.
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 :)
Thank you
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
Gutted... Thanks for looking pandeo.
Anyone else out there have any ideas?
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; }); };
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.
Dear! I've got something new for you, you'll definetely love it, take a look at http://one.thinkhrhotline.com/e6syoq
Thx, info