I find that I can remove a lot of the options just by changing 'mandatory' => true to false. I can then remove an entire column in the sample bulk file. Not all the columns in the bulk uploader are necessary for my site. The smaller the sample file the less scary it looks to sellers.
I can't just change all 'mandatory' => true to false and expect the bulk uploader to work after I remove a few unnecessary columns. Some columns NEED to be filled in, but to make it easier for the sellers I would like to be able to automatically set one value and completely remove the column.
For instance to keep it simple on my site I have a few minor mods that makes all auctions buyitnow so it's not necessary for users to have stores. This means I can possibly remove the 3rd column (ListIn) in the bulk uploader completely and just program my site to automatically set the ListIn value to "auction" for all bulk uploads.
Here's the the stock bulk.php looks like when addressing ListIn.
function setListIn()
{
//$this->list_in = null;
if (!$this->setts['enable_store_only_mode'])
{
$this->list_in[] = 'auction';
}
if ($this->user_details['shop_active'])
{
$shop = new shop();
$shop->setts = &$this->setts;
$shop_status = $shop->shop_status($this->user_details, true);
if ($shop_status['remaining_items'] > 0)
{
$this->list_in[] = 'both';
$this->list_in[] = 'store';
}
}
return array(
'id' => 'list_in',
'name' => MSG_LIST_IN,
'description' => 'enum',
'sample' => 'auction',
'formchecker' => array(array('in_array', $this->list_in)),
'max_length' => 50, 'type' => 'enum', 'mandatory' => true, 'accepted_values' => $this->list_in
);
}
How can I modify this code so that the user can leave the ListIn value empty in the bulk upload file, but have the listin value automatically set to auction?


Sign In
Create Account

Back to top









