-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Syam Mohan
committed
Oct 16, 2014
1 parent
bdac8e8
commit 890d31c
Showing
20 changed files
with
1,189 additions
and
17 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
app/code/community/Medma/MarketPlace/Block/Adminhtml/System/Convert/Gui/Grid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Medma Marketplace | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Magento Team | ||
* that is bundled with this package of Medma Infomatix Pvt. Ltd. | ||
* ================================================================= | ||
* MAGENTO EDITION USAGE NOTICE | ||
* ================================================================= | ||
* This package designed for Magento COMMUNITY edition | ||
* Contact us Support does not guarantee correct work of this package | ||
* on any other Magento edition except Magento COMMUNITY edition. | ||
* ================================================================= | ||
* | ||
* @category Medma | ||
* @package Medma_MarketPlace | ||
**/ | ||
class Medma_MarketPlace_Block_Adminhtml_System_Convert_Gui_Grid extends Mage_Adminhtml_Block_System_Convert_Gui_Grid | ||
{ | ||
|
||
protected function _prepareCollection() | ||
{ | ||
$collection = Mage::getResourceModel('dataflow/profile_collection') | ||
->addFieldToFilter('entity_type', array('notnull'=>'')); | ||
|
||
|
||
$isVendor = Mage::helper('marketplace')->isVendor();//current user is vendor or not | ||
|
||
if($isVendor) | ||
{ | ||
$collection->addFieldToFilter('name',array('in'=>array('Vendor Import Products','Vendor Export Products'))); | ||
//$collection->addFieldToFilter('entity_type','product'); | ||
$this->setCollection($collection); | ||
return $this; | ||
} | ||
else | ||
{ | ||
$this->setCollection($collection); | ||
return parent::_prepareCollection(); | ||
} | ||
|
||
|
||
} | ||
|
||
} | ||
|
21 changes: 21 additions & 0 deletions
21
app/code/community/Medma/MarketPlace/Block/Adminhtml/System/Convert/Profile/Edit/Tab/Run.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
class Medma_MarketPlace_Block_Adminhtml_System_Convert_Profile_Edit_Tab_Run extends Mage_Adminhtml_Block_System_Convert_Profile_Edit_Tab_Run | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
/**Code For Vendor**/ | ||
$isVendor = Mage::helper('marketplace')->isVendor();//current user is vendor or not | ||
|
||
$model = Mage::registry('current_convert_profile'); | ||
|
||
if($isVendor && $model->getDirection()=='export') | ||
{ | ||
$this->setTemplate('marketplace/system/convert/profile/run.phtml'); | ||
} | ||
} | ||
|
||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.