• Home
  • Programming
    • API
      • Google
    • Javascript
    • Php
    • Server
  • CMS
    • Magento
    • Yahoo! Store

M2E additional columns in grid

Wednesday, 29 May 2019 17:20
Tim Ramsey
0 Comments
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
app/code/community/Ess/M2ePro/Block/Adminhtml/Ebay/Listing/View/Ebay/Grid
app/code/community/Ess/M2ePro/Block/Adminhtml/Ebay/Listing/Product
protected function _prepareCollection(){
$collection->addAttributeToSelect('asset_type');
}
 
protected function _prepareColumns(){
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'asset_type');
$options = array();
foreach( $attribute->getSource()->getAllOptions(false, true) as $option ) {
$options[$option['value']] = $option['label'];
}
$this->addColumn('asset_type',array(
'header'=> Mage::helper('M2ePro')->__('Dept.'),
'width' => '150px',
'index' => 'asset_type',
'type'  => 'options',
'options' => $options,
'sortable' => false,
));
 
$sets = Mage::getResourceModel('eav/entity_attribute_set_collection')
->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())
->load()
->toOptionHash();
$this->addColumn('set_name',
array(
'header'=> Mage::helper('M2ePro')->__('Attrib. Set Name'),
'width' => '100px',
'index' => 'attribute_set_id',
'type'  => 'options',
'options' => $sets,
'sortable' => false,
), 'name');
}

Linux commands for deleting files

Saturday, 13 April 2019 19:42
Tim Ramsey
0 Comments
1
2
mkdir empty_dir (create an empty directory)
rsync -a --delete empty_sessions/ session/
1
find /directory -type f -name "sess_*" -delete

.htaccess redirect from one site to another while maintaining the directory structure

Friday, 29 March 2019 14:07
Tim Ramsey
0 Comments
1
2
3
4
5
6
//Optional Keep Magento admin on the same url
RewriteCond %{REQUEST_URI} !^/(admin)
RewriteCond %{REQUEST_URI} !^/index.php/(admin)
 
RewriteCond %{HTTP_HOST} ^www.oldstore.com$ [NC]
RewriteRule ^(.*)$ https://www.newstore.com/$1 [L,R=301]

Delete Many Files in a directory

Wednesday, 20 March 2019 19:00
Tim Ramsey
0 Comments
1
2
cd yourdirectory
perl -e 'for(<*>){((stat)[9]<(unlink))}'

Page 6 of 15

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • Next

Categories

  • CMS
    • Magento
    • Shopify
    • Yahoo! Store
  • Programming
    • API
      • Google
    • Javascript
    • Php
    • Server
    • SVN
  • VOIP

Recent Posts

  • How to write to Google Sheet with API in PHP
  • How to Migrate FreePBX server to a new server
  • Unifi Controller Java CPU 100%
  • Update Unifi Controller on Linux
  • Code Signing Desktop App