Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Skip add mysql products for status true
 
tefon
Jr. Member
 
Total Posts:  9
Joined:  2013-09-25
 

My XML files two options for Status..

option 1 : True and option 2 : False

i use this code and works for me. but i want dont adding option-1 on mySQL. i want skiped option-2 pls help me?:

<?php

class Tweakit_Ezimport_Helper_Attributes_Status implements Tweakit_Ezimport_Helper_IAttribute{

public function getName() {
return ‘Status’;
}

public function getIdentifier() {
return ‘status’;
}

public function getType() {
return ‘text’;
}

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

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

$tef10 = 1;

if ($data == “True") {
$tef10 = 2;
}

$product->setStatus($tef10);

}

}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top