This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert html into correct element | |
* @param html | |
*/ | |
html2element: function(html) { | |
var attributes = {}, | |
$template; | |
if (_.isString(html)) { | |
this.template = _.template(html); | |
$template = $(this.template(this.model.toJSON(), vc.templateOptions.default).trim()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$product->getTypeInstance()->setUsedProductAttributeIds(array(92)); //attribute ID of attribute 'color' in my store | |
$configurableAttributesData = $product->getTypeInstance()->getConfigurableAttributesAsArray(); | |
$product->setCanSaveConfigurableAttributes(true); | |
$configurableProductsData = array(//... ); //there data with new id's | |
$product->setConfigurableProductsData($configurableProductsData); |