View Single Post
  #8  
Old 04-29-2020, 08:31 PM
 
gior_08 gior_08 is offline
 

Member
  
Join Date: Sep 2008
Posts: 23
 

Default Re: Adding new property to a product (radio button) for Xcart 5

You must extend the \XLite\Logic\Export\Step\Products to export and the \XLite\Logic\Import\Processor\Products to import you new property. For example to import:

Quote:
abstract class Products extends \XLite\Logic\Import\Processor\Products implements \XLite\Base\IDecorator
{
protected function defineColumns()
{
$columns = parent::defineColumns();

$columns['tester'] = array();

return $columns;
}


protected function importTester(\XLite\Model\Product $model, $value, array $column)
{
$model->setTester($this->normalizeValueAsString($value));
}


}

Quote:
Originally Posted by siddharth.puri@wheelandba
Hi, following the same method as mentioned int he docs - https://devs.x-cart.com/basics/adding_new_property_to_a_product/ ; I added a new property to the product.
How can I now include that property to import and export of products?
__________________
Xcart 4.x.x
Xcart 5.x.x
Reply With Quote