Answer the question
In order to leave comments, you need to log in
How to set default value for TV in catalogfill?
Hello!
While testing only on export.
I'm trying to import and export under the Yandex market, I've come across the fact that the tv values are not substituted by the mind.
For example, I have only one currency, rubles. Then there is no point in making a list. Made a hidden field with RUR value by default. When importing, there is not RUR but empty. I tried to write the same $cf_config['imp_content_default'] here, and it's empty again.
What is the problem?
https://yandex.ru/support/partnermarket/yml/about-...
//разбивка по столбцам при импорте и экспорте (content|tv|category)
$cf_config['content_row'] = array(
array('id',array('id','content')),
array('available',array('published','content')),
array('url',array('uri','content')),
array('price',array(1,'tv')),
array('currencyId',array(24,'tv')),
array('picture',array(3,'tv')),
array('category',array('parent','content')),
array('name',array('pagetitle','content')),
//array('description',array('introtext','content')),
array('description',array('content','content'))
);
//значения по умолчанию при импорте или проверка при экспорте
$cf_config['imp_content_default'] = array(
'content' => array(
'deleted' => 0,
'published' => 1,
'template' => 3
//'createdon' => strtotime("now")
//'publishedon' => strtotime("now")
//'pub_date' => strtotime("now")
//'editedby' => 1
//'editedon' => strtotime("now")
),
'tv' => array(
24 => 'RUR'
)
);
function filter_export($value_arr,$doc_id=0){
$output_arr = $value_arr;
if(isset($output_arr['content']['uri']))
$output_arr['content']['uri'] = 'https://'.$_SERVER['SERVER_NAME'].$output_arr['content']['uri'];
return $output_arr;
}
if($output_arr['content']['id']){
$output_arr['content']['id'] = 'https://'.$_SERVER['SERVER_NAME'].$output_arr['content']['parent'];
}
return $output_arr;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question