Get Magento Attribute Set id in import script -


I am trying to modify a Magenza OSComments import script to work with products with features and configurations. This is a challenge to say the least.

But I am making progress, I am currently trying to add specialty set names in Magenta, and after that, I am writing in my TMP table Where I need the Magenta Attribute Set ID, for the specialty set I created.

My problem is that I do not get that ID.

My current code:

  $ sql = "select from ezmage_variant_sets *"; $ Result = $ readConnection-> Get all ($ sql); Foreign Currency ($ $ as the $ result result) {If ($ line ['variant_imported'] = 'Y') {$ this-> CreateAttributeSet ($ line ['osc_variants_title'], - 1); // update tmp table $ sql = "update ezmage_variant_sets set variant_imported = 'y', mage_variant_id =". $ Variant- & gt; GetId () "Where osc_variants_id =". $ Line ['osc_variants_id']; $ WriteConnection-> Query ($ SQL); }}   

The problem is $ version-> IID () How do I get that ID?

Perhaps not the most skilled of them all, but:

  $ AttrSetCollection = Dana :: getModel ("eav / entity_attribute_set") - & gt; GetCollection (); $ AttrSet = $ attrSetCollection- & gt; AddFieldToFilter ("attribute_set_name", $ line ['osc_variants_title']) - & gt; GetFirstItem (); Echo $ attrSet-> GetAttributeSetId ();    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -