I have this method inside of:
parser/product.php
These fields are what i'm targeting in the admin panel. Everything updates properly, if a product gets imported with a different price matching the sku it updates. The only field that doesn't update is "Merch Tax Category Code which the field in the db is "tax_class_id". See screenshots of inspect element.
protected function _getFieldNames()
{
return array(
'Company Number' => 'company_number',
'UPC Code' => 'sku',
'Product Code' => 'style_number',
'Description' => 'name',
'Size' => 'size',
'Price' => 'price',
'Merch Tax Category Code' => 'tax_class_id'
);
}
Inside of my Adapter folder it contains (Adapter/Product.php
):
protected $_attributesToUpdate = array(
'name' => 1,
'description' => 1,
'company_number' => 0,
'style_number' => 0,
'color' => 0,
'size' => 0,
'inseam' => 0,
'price' => 1,
'weight' => 1,
'tax_class_id' => 1
);
Not all the fields matter but price and tax is important. Price already works so now i'm just configuring tax_class_id. I believe it's set to default on Taxable goods based on this code below.
Also in Adapter/Product.php
:
protected function _getTaxClassId($importData)
{
return '2'; //Taxable goods
}
The only other field that would identify anything to do with tax is also in the same file.
//Set Tax Class
if (empty($importData['tax_class_id'])) {
$importData['tax_class_id'] = $this->_getTaxClassId($importData);
}
return $importData;
I've tried so many options so I'm now reaching out to you guys. Any help would be appreciated. Thank you.