0

I'm using this scrip however, i doesn't work..

function Cfg_AttributeChanged(ChangedAttribute) { for (var j = 0; j < ChangedAttribute.GetChildCount(); j++) { var attr = ChangedAttribute.GetChild(j); var attrName = attr.GetType(); var oldV = attr.GetProperty("OldVal"); var newV = attr.GetProperty("NewVal");

 if ((attrName == "attr_Name") && (newV == "024"))
 {
    AddItem("$.[rootProd]#1", "relationshipName", "childProd", "1");
    SetAttribute("$.[rootProd]#1.[relationshipName]#[childProd]", "childProd_attrName", "024");
 }

 if ((attrName == "attr_Name") && (newV == "036"))
 {
    AddItem("$.[rootProd]#1", "relationshipName", "childProd", "1");
    SetAttribute("$.[rootProd]#1.[relationshipName]#[childProd]", "childProd_attrName", "036");
 }

if ((attrName == "attr_Name") && (newV == "060")) { AddItem("$.[rootProd]#1", "relationshipName", "childProd", "1"); SetAttribute("$.[rootProd]#1.[relationshipName]#[childProd]", "childProd_attrName", "060"); }

} }

  • which version Magento version? – Nits Sep 25 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.