0

I have question regarding helper attributes, in fact couple questions :)

  1. Where I can find list of all product attributes defined through Mage.php

  2. SKU is not defined through those attributes, cuz it shows me an error on line 546 in Mage.php that sku is not a part of attributes. Is it possible to add sku into?

  3. I am creating import module for XML live feed, so is it possible to calculate price margin before update prices in database? If is possible can someone show me some kind of example, just to have some intern knowledge about?

Thank you all

EDIT:

This is example of my code, just to see what I am talking about:

public function getName() {
    return 'Name';  
}

public function getIdentifier() {
    return 'name';  
}

public function getType() {
    return 'varchar';
}

public function getPreview($content) {
    return $content;
}

public function setData(Mage_Catalog_Model_Product $product, $data) {

    $product->setName($data);

}
FlorinelChis
  • 1,488
  • 1
  • 11
  • 24
Eager2Learn
  • 153
  • 4
  • 19
  • How did you try to get the sku and where? It should work without any additions. Like this? `$sku = $product->getSku();` – user1638055 Sep 24 '12 at 15:19
  • Hi. I tried same thing and get error on mage.php line 546, there is no attribute sku in mage.php. that is whole script which parse xml file with product data into magento db using attributes – Eager2Learn Sep 24 '12 at 15:26
  • So in fact i need to INSERT sku into magento database, not use getSku to list variables – Eager2Learn Sep 24 '12 at 15:31
  • Where did you try it and what exactly does the error message look like? – user1638055 Sep 24 '12 at 15:31

0 Answers0