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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/home/htlwork.com/www/dev/pricelow/app/code/WebbyTroops/
Upload File :
Current File : /home/htlwork.com/www/dev/pricelow/app/code/WebbyTroops/FireImportExport.tar
FireImportExport/0000755000000000000000000000000014364325176013051 5ustar  rootrootFireImportExport/etc/0000755000000000000000000000000014364325176013624 5ustar  rootrootFireImportExport/etc/di.xml0000644000000000000000000000050114364325176014736 0ustar  rootroot<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    
    <preference for="Firebear\ImportExport\Model\Import\Product" type="WebbyTroops\FireImportExport\Model\Import\Product"/>
    
</config>
FireImportExport/etc/module.xml0000644000000000000000000000056214364325176015636 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="WebbyTroops_FireImportExport" setup_version="1.0.0">
        <sequence>
            <module name="Firebear_ImportExport"/>
        </sequence>
    </module>
</config>
FireImportExport/etc/adminhtml/0000755000000000000000000000000014364325176015601 5ustar  rootrootFireImportExport/etc/adminhtml/di.xml0000644000000000000000000000060414364325176016717 0ustar  rootroot<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\Reporting">
        <plugin name="fire_import_grid_collection" type="\WebbyTroops\FireImportExport\Model\Plugin\ResourceModel\Import\Grid"/>
    </type>
</config>FireImportExport/Ui/0000755000000000000000000000000014364325176013426 5ustar  rootrootFireImportExport/Ui/Component/0000755000000000000000000000000014364325176015370 5ustar  rootrootFireImportExport/Ui/Component/Listing/0000755000000000000000000000000014364325176017001 5ustar  rootrootFireImportExport/Ui/Component/Listing/Column/0000755000000000000000000000000014364325176020236 5ustar  rootrootFireImportExport/Ui/Component/Listing/Column/SellerEmailProvder.php0000644000000000000000000000427414364325176024516 0ustar  rootroot<?php
namespace WebbyTroops\FireImportExport\Ui\Component\Listing\Column;
 
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Framework\App\ResourceConnection;
 
class SellerEmailProvder extends Column
{
    /**
     * 
     * @var ResourceConnection
     */
    protected $connection;
    
    /**
     * 
     * @param ContextInterface   $context           
     * @param UiComponentFactory $uiComponentFactory   
     * @param ResourceConnection $connection
     * @param array              $components        
     * @param array              $data              
     */
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        ResourceConnection $connection,
        array $components = [],
        array $data = []
    ) {
        $this->connection = $connection;
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }
 
    /**
     * Prepare Data Source
     *
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        $conn = $this->connection->getConnection();
        $sellerTable = $this->connection->getTableName('lof_marketplace_seller');
        
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                /* Get seller email from lof_marketplace_seller with seller_id */
                if ($item['seller_id'] > 0) {
                    $selectSeller = $conn->select()->from(
                        ["seller" => $sellerTable],
                        ['email']
                    )->where(
                        "seller.seller_id = ?",
                        $item['seller_id']
                    );
                    /* Set email on seller id */
                    $SellerEmail = $conn->fetchOne($selectSeller);
                    $item[$this->getData('name')] = $SellerEmail;
                }else {
                    $item[$this->getData('name')] = '';
                }
            }
        }
        return $dataSource;
    }
}FireImportExport/Model/0000755000000000000000000000000014364325176014111 5ustar  rootrootFireImportExport/Model/Import/0000755000000000000000000000000014364325176015363 5ustar  rootrootFireImportExport/Model/Import/Product.php0000644000000000000000000016206014454775172017526 0ustar  rootroot<?php
declare(strict_types=1);
/**
 * @copyright: Copyright © 2017 Firebear Studio. All rights reserved.
 * @author   : Firebear Studio <fbeardev@gmail.com>
 */

namespace WebbyTroops\FireImportExport\Model\Import;

use Firebear\ImportExport\Model\JobRepository;
use function array_diff;
use function array_keys;
use function array_map;
use function array_merge;
use function array_values;
use Exception;
use function explode;
use Firebear\ImportExport\Api\UrlKeyManagerInterface;
use Firebear\ImportExport\Helper\Additional;
use Firebear\ImportExport\Helper\Data as FirebearImportExportData;
use Firebear\ImportExport\Model\Cache\Type\ImportProduct as ImportProductCache;
use Firebear\ImportExport\Model\Export\RowCustomizer\ProductVideo;
use Firebear\ImportExport\Model\Import;
use Firebear\ImportExport\Model\Import\Product\CategoryProcessor;
use Firebear\ImportExport\Model\Import\Product\Image as ImportImage;
use Firebear\ImportExport\Model\Import\Product\ImageProcessor as ImportImageProcessor;
use Firebear\ImportExport\Model\Import\Product\Integration\IntegrationInterface;
use Firebear\ImportExport\Model\Import\Product\Integration\MageArrayMarketplace;
use Firebear\ImportExport\Model\Import\Product\Integration\WebkulMarketplace;
use Firebear\ImportExport\Model\Import\Product\MediaVideoGallery;
use Firebear\ImportExport\Model\Import\Product\OptionFactory;
use Firebear\ImportExport\Model\Import\Product\Price\Rule\ConditionFactory as ConditionFactoryAlias;
use Firebear\ImportExport\Model\Import\Product\Type\Downloadable;
use Firebear\ImportExport\Model\Job;
use Firebear\ImportExport\Model\ResourceModel\Job\CollectionFactory;
use Firebear\ImportExport\Model\Source\Import\Config;
use Firebear\ImportExport\Model\Source\Type\AbstractType;
use Firebear\ImportExport\Model\Translation\Translator;
use Firebear\ImportExport\Traits\Import\Entity as ImportTrait;
use Firebear\ImportExport\Ui\Component\Listing\Column\Entity\Import\Attributes\SystemOptions;
use Firebear\ImportExport\Ui\Component\Listing\Column\Import\Source\Configurable\Type\Options as TypeOptions;
use Firebear\ImportExport\Api\Data\SeparatorFormatterInterface;
use function implode;
use function in_array;
use function interface_exists;
use InvalidArgumentException;
use function is_array;
use function is_int;
use Magento\Bundle\Model\Product\Price as BundlePrice;
use Magento\BundleImportExport\Model\Import\Product\Type\Bundle;
use Magento\Catalog\Api\Data\CategoryLinkInterface;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Helper\Data as CatalogHelperData;
use Magento\Catalog\Helper\Product as CatalogHelperProduct;
use Magento\Catalog\Model\CategoryLinkRepository;
use Magento\Catalog\Model\Config as CatalogConfig;
use Magento\Catalog\Model\Product\Action;
use Magento\Catalog\Model\Product\ActionFactory;
use Magento\Catalog\Model\Product\Attribute\Backend\Sku;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Catalog\Model\Product\Link as ProductLink;
use Magento\Catalog\Model\Product\Media\ConfigInterface;
use Magento\Catalog\Model\Product\Url;
use Magento\Catalog\Model\Product\Visibility;
use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory;
use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory;
use Magento\Catalog\Model\ResourceModel\Product\LinkFactory;
use Magento\CatalogImportExport\Model\Import\Product as MagentoProduct;
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\CatalogImportExport\Model\Import\Product\SkuProcessor;
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
use Magento\CatalogImportExport\Model\Import\Product\TaxClassProcessor;
use Magento\CatalogImportExport\Model\Import\Product\Type\Factory;
use Magento\CatalogImportExport\Model\Import\Product\Validator;
use Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModel;
use Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory;
use Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory;
use Magento\CatalogImportExport\Model\StockItemImporterInterface;
use Magento\CatalogInventory\Api\StockConfigurationInterface;
use Magento\CatalogInventory\Api\StockRegistryInterface;
use Magento\CatalogInventory\Model\ResourceModel\Stock\Item;
use Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory;
use Magento\CatalogInventory\Model\Spi\StockStateProviderInterface;
use Magento\Customer\Model\GroupFactory;
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
use Magento\Eav\Model\EntityFactory;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory as AttributeGroupCollectionFactory;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory as AttributeSetCollectionFactory;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\ProductMetadataInterface;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\DB\Adapter\ConnectionException;
use Magento\Framework\DB\Adapter\DeadlockException;
use Magento\Framework\DB\Adapter\LockWaitException;
use Magento\Framework\Event\ManagerInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Filesystem;
use Magento\Framework\Indexer\IndexerRegistry;
use Magento\Framework\Intl\DateTimeFactory;
use Magento\Framework\MessageQueue\PublisherInterface;
use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor;
use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface;
use Magento\Framework\Module\Manager;
use Magento\Framework\Stdlib\DateTime;
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
use Magento\ImportExport\Model\Import\Config as ImportConfig;
use Magento\ImportExport\Model\Import\Entity\AbstractEntity;
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
use Magento\Store\Model\ScopeInterface;
use Magento\Store\Model\Store;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Store\Model\WebsiteFactory;
use Magento\Swatches\Helper\Data;
use Magento\Swatches\Helper\Media;
use Magento\Swatches\Model\ResourceModel\Swatch\CollectionFactory as SwatchCollectionFactory;
use Magento\Swatches\Model\Swatch;
use Magento\Tax\Model\ClassModel;
use Magento\Tax\Model\ResourceModel\TaxClass\CollectionFactory as TaxClassCollectionFactory;
use function mb_strtolower;
use function strlen;
use function strtolower;
use function substr;
use Symfony\Component\Console\Output\ConsoleOutput;
use function version_compare;
use Zend_Db_Select;
use Zend_Validate_Exception;
use Zend_Validate_Regex;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable as TypeConfigurable;


class Product extends \Firebear\ImportExport\Model\Import\Product
{
    private $cachedSwatchOptions = [];
    private $importCollection;
    private $_isRowCategoryMapped;
    private $lastSku;

    /**
     * Product entity identifier field
     *
     * @var string
     */
    private $productEntityIdentifierField;

    /**
     * Product entity link field
     *
     * @var string
     */
    private $productEntityLinkField;
    
    /**
     * Stock Item Importer
     *
     * @var StockItemImporterInterface
     */
    private $stockItemImporter;
    
    /**
     * @var ProductCollectionFactory
     */
    private $productCollectionFactory;
    
    /**
     * @var SeparatorFormatterInterface
     */
    private $separatorFormatter;
    
    private $storeIds = [];
    
    public function __construct(
        \Firebear\ImportExport\Model\Import\Context $context,
        \Firebear\ImportExport\Model\Import\Product\Image $importImage,
        \Firebear\ImportExport\Model\Import\Product\ImageProcessor $importImageProcessor,
        \Firebear\ImportExport\Helper\Data $helper, \Magento\Framework\App\CacheInterface $cache,
        \Firebear\ImportExport\Helper\Additional $additional,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,
        \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration,
        \Magento\CatalogInventory\Model\Spi\StockStateProviderInterface $stockStateProvider,
        \Magento\Catalog\Helper\Data $catalogData,
        \Magento\ImportExport\Model\Import\Config $importConfig,
        \Firebear\ImportExport\Model\Source\Import\Config $fireImportConfig,
        \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory,
        \Firebear\ImportExport\Model\Import\Product\OptionFactory $optionFactory,
        \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $setColFactory,
        \Magento\CatalogImportExport\Model\Import\Product\Type\Factory $productTypeFactory,
        \Magento\Catalog\Model\ResourceModel\Product\LinkFactory $linkFactory,
        \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory,
        \Magento\Framework\Filesystem $filesystem,
        \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $stockResItemFac,
        \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
        \Magento\Framework\Stdlib\DateTime $dateTime,
        \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
        \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver,
        \Magento\CatalogImportExport\Model\Import\Product\SkuProcessor $skuProcessor,
        \Magento\CatalogImportExport\Model\Import\Product\Validator $validator,
        \Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor $objectRelationProcessor,
        \Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface $transactionManager,
        \Magento\CatalogImportExport\Model\Import\Product\TaxClassProcessor $taxClassProcessor,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Catalog\Model\Product\Url $productUrl,
        \Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory $attributeFactory,
        \Magento\Eav\Model\EntityFactory $eavEntityFactory,
        \Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory $groupCollectionFactory,
        \Magento\Catalog\Helper\Product $productHelper,
        \Magento\Framework\App\ProductMetadataInterface $productMetadata,
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $collectionFactory,
        \Magento\Customer\Model\GroupFactory $groupFactory,
        \Magento\Store\Model\WebsiteFactory $websiteFactory,
        \Firebear\ImportExport\Model\Import\Product\CategoryProcessor $categoryProcessor,
        \Firebear\ImportExport\Model\Import\UploaderFactory $uploaderFactory,
        \Magento\Tax\Model\ResourceModel\TaxClass\CollectionFactory $collectionTaxFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Firebear\ImportExport\Model\ResourceModel\Job\CollectionFactory $importCollectionFactory,
        \Firebear\ImportExport\Model\Import\Product\Price\Rule\ConditionFactory $priceRuleConditionFactory,
        \Magento\Swatches\Helper\Data $swatchesHelperData,
        \Magento\Swatches\Helper\Media $swatchHelperMedia,
        \Magento\Swatches\Model\ResourceModel\Swatch\CollectionFactory $swatchCollectionFactory,
        \Magento\Catalog\Model\Product\Media\ConfigInterface $mediaConfig,
        \Magento\Framework\Module\Manager $moduleManager,
        \Magento\Catalog\Model\Product\Link $productLink,
        \Firebear\ImportExport\Api\UrlKeyManagerInterface $urlKeyManager,
        \Magento\Catalog\Model\CategoryLinkRepository $categoryLinkRepository,
        \Magento\Catalog\Model\Product\ActionFactory $productActionFactory,
        \Firebear\ImportExport\Model\Translation\Translator $translator,
        \Firebear\ImportExport\Model\Import\SourceManager $sourceManager,
        \Firebear\ImportExport\Model\Import\Product\ConfigurationVariations $configurationVariations,
        \Firebear\ImportExport\Api\Data\SeparatorFormatterInterface $separatorFormatter,
        \Firebear\ImportExport\Model\JobRepository $jobRepository,
        \Lof\MarketPlace\Helper\Data $lofHelper,
        array $data = array(),
        array $integrations = array(),
        array $dateAttrCodes = array(),
        \Magento\Catalog\Model\Config $catalogConfig = null,
        \Magento\Framework\Intl\DateTimeFactory $dateTimeFactory = null
    ) {
        $this->translator = $translator;
        $this->lofHelper = $lofHelper;
        parent::__construct($context, $importImage, $importImageProcessor, $helper, $cache, $additional, $eventManager, $stockRegistry, $stockConfiguration, $stockStateProvider, $catalogData, $importConfig, $fireImportConfig, $resourceFactory, $optionFactory, $setColFactory, $productTypeFactory, $linkFactory, $proxyProdFactory, $filesystem, $stockResItemFac, $localeDate, $dateTime, $indexerRegistry, $storeResolver, $skuProcessor, $validator, $objectRelationProcessor, $transactionManager, $taxClassProcessor, $scopeConfig, $productUrl, $attributeFactory, $eavEntityFactory, $groupCollectionFactory, $productHelper, $productMetadata, $productRepository, $collectionFactory, $groupFactory, $websiteFactory, $categoryProcessor, $uploaderFactory, $collectionTaxFactory, $storeManager, $importCollectionFactory, $priceRuleConditionFactory, $swatchesHelperData, $swatchHelperMedia, $swatchCollectionFactory, $mediaConfig, $moduleManager, $productLink, $urlKeyManager, $categoryLinkRepository, $productActionFactory, $translator, $sourceManager, $configurationVariations, $separatorFormatter, $jobRepository, $data, $integrations, $dateAttrCodes, $catalogConfig, $dateTimeFactory);
    }
    
    /**
     * Gather and save information about product entities.
     *
     * @return $this
     * @throws LocalizedException
     * @throws Zend_Validate_Exception
     * @throws Exception
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     * @SuppressWarnings(PHPMD.NPathComplexity)
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    protected function saveProducts()
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/fbimport.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $jobId = isset($this->_parameters['job_id']) ? $this->_parameters['job_id'] : "";
        $logger->info('Info '.date("Y-m-d H:i:s").' job Id: ',[$this->_parameters['job_id']]);
        $sellerId = '';
        if ($jobId) {
        $logger->info('Info '.date("Y-m-d H:i:s").' job Id find: ',[$jobId]);
            $jobCollection = $this->jobRepository->getById($jobId);
        $logger->info('Info '.date("Y-m-d H:i:s").' $jobCollection: ',[$jobCollection]);
            if ($jobCollection) {
                $sellerId = $jobCollection->getSellerId();
            $logger->info('Info '.date("Y-m-d H:i:s").' $sellerId: ',[$sellerId]);
            }
        }
            $logger->info('Info '.date("Y-m-d H:i:s").' $sellerId out: ',[$sellerId]);
//        $logPath = '/var/log/firebear/marketplace_import_rule/job_'.$sellerId.'_'.'import.log';
//        $logger->info('Info '.date("Y-m-d H:i:s").': ',["app/code/WebbyTroops/FireImportExport/Model/Import/Product.php"]);
        
        $this->translator = $this->translator->init($this->_parameters);
        
        
        // s validation for seller Id 
        $sellerValid = false;
        $rowCount = 1;
        $sellerErrorMeg = "";
        $logger->info('Info '.date("Y-m-d H:i:s").': ',[$sellerId]);
        if ($sellerId) {
            /* Set validation for seller when add import new product */
                $select = $this->_connection->select()
                    ->from(
                        ['o' => 'lof_marketplace_seller'],
                        ['seller_id', 'customer_id']
                    )
                    ->join(
                        ['lmm' => 'lofmp_marketplace_membership'],
                        'lmm.seller_id=o.seller_id'
                    )
                    ->order('lmm.created_at DESC')
                    ->where('o.seller_id =?', $sellerId)
                    ->where('lmm.status =?', 1); 
            /* Get seller membership data */
            $membership = $this->_connection->fetchRow($select);
            $logger->info('in Product plugin $membership: ',[$membership]);
            
            if ($membership) {
                $currentDnT = date('Y-m-d h:i:s');
                $logger->info('in Product plugin $currentDnT: ',[$currentDnT]);
                $logger->info('in Product plugin $membership["expiration_date"]: ',[$membership['expiration_date']]);
                if (strtotime($currentDnT) <= strtotime($membership['expiration_date'])) {
                    if ($membership['limit_product_duration'] > 0) {
                        $logger->info('in Product plugin $membership["limit_product_duration"]: ',[$membership['limit_product_duration']]);
                        $startingDate = date('Y-m-d h:i:s', strtotime('-'.$membership['duration'], strtotime($membership['expiration_date'])));
                        $logger->info('in Product plugin $startingDate: ',[$startingDate]);
                        $products = $this->collectionFactory->create()->addAttributeToSelect('entity_id', 'seller_id', 'created_at')
                                    ->addAttributeToFilter('seller_id',['eq'=>$membership['seller_id']])
                                    ->addAttributeToFilter('created_at',['from'=>$startingDate, 'to'=>$membership['expiration_date']])
                                    ->getData();
                        $logger->info('in Product plugin $products: ',[$products]);
                        $productCount = count($products) ? count($products) : 0;
                        $logger->info('in Product plugin $productCount in database: ',[$productCount]);
                        $diffCount = $membership['limit_product_duration'] - $productCount;
                        $logger->info('in Product plugin seller limit of product $membership["limit_product_duration"]: ',[$membership['limit_product_duration']]);
                        $logger->info('in Product plugin $diffCount: ',[$diffCount]);
                        $sellerValid = true;
                    } else {
                        $sellerErrorMeg = "Your membership limit product duration is not define.";
                    }
                } else {
                    $sellerErrorMeg = "Your membership is expired. please buy package.";
                }
            } else {
                $sellerErrorMeg = "You don't have any membership please buy package.";
            }
        } else {
            $logger->info('Seller id does not found.');
        }
        // e validation for seller Id 
        
        
        $existingImages = [];
        $existingUpload = [];
        $entityLinkField = $this->getProductEntityLinkField();
        if (!empty($this->_parameters['import_source']) && $this->_parameters['import_source'] != 'file') {
            $this->_initSourceType($this->_parameters['import_source']);
        }
        $configurableData = [];

        $isPriceGlobal = $this->_catalogData->isPriceGlobal();
        $productLimit = null;
        $productsQty = null;
        $this->importImage->setConfig($this->_parameters);

        while ($nextBunch = $this->_dataSourceModel->getNextBunch()) {
            $entityRowsIn = $entityRowsUp = [];
            $attributes = [];
            $this->websitesCache = $this->categoriesCache = $this->categoryProductPosition = [];
            $this->categoryProcessor->setRowCategoryPosition($this->categoryProductPosition);
            $mediaGallery = $uploadedImages = [];
            $tierPrices = [];
            $previousType = $prevAttributeSet = null;
            $existingImages = $this->getExistingImages($nextBunch);
            $existingAttributeImages = $this->importImageProcessor->getExistingAttributeImages($nextBunch);
            if ($this->sourceType && $this->_parameters['image_import_source']) {
                $nextBunch = $this->prepareImagesFromSource($nextBunch);
            }

            $prevData = [];
            $createValuesAllowed = (bool)$this->scopeConfig->getValue(
                Import::CREATE_ATTRIBUTES_CONF_PATH,
                ScopeInterface::SCOPE_STORE
            );
            
            $storeIds = $this->getStoreIds();
            foreach ($nextBunch as $rowNum => $rowData) {
                $time = explode(" ", microtime());
                $startTime = $time[0] + $time[1];
                if (isset($rowData[self::COL_CATEGORY])) {
                    $categoriesMapping = $this->categoriesMapping($rowData);
                    $rowData[self::COL_CATEGORY] = $categoriesMapping[self::COL_CATEGORY];
                    if (!empty($categoriesMapping[self::COL_CATEGORY . '_position'])) {
                        $rowData[self::COL_CATEGORY . '_position'] =
                            $categoriesMapping[self::COL_CATEGORY . '_position'];
                    }
                }
                $rowData = $this->joinIdenticalyData($rowData);
                if (isset($rowData['_attribute_set']) && isset($rowData['attribute_set_code'])) {
                    if (isset($rowData['update_attribute_set']) && ((int)($rowData['update_attribute_set']) > 0)) {
                        $rowData['_attribute_set'] = $rowData['attribute_set_code'];
                    } else {
                        unset($rowData['attribute_set_code']);
                    }
                }
                $oldSkus = $this->skuProcessor->getOldSkus();
                $sku = strtolower($this->getCorrectSkuAsPerLength($rowData));

                if (!isset($oldSkus[$sku])) {
                    if (!isset($rowData['_attribute_set'])
                        || (isset($rowData['_attribute_set']) && empty($rowData['_attribute_set']))
                    ) {
                        $collectSets = $this->_attrSetIdToName;
                        reset($collectSets);
                        $rowData['_attribute_set'] = current($collectSets);
                    }
                }
                if (isset($this->_parameters['remove_related_product'])
                    && $this->_parameters['remove_related_product'] == 1
                ) {
                    $this->removeRelatedProducts($this->getCorrectSkuAsPerLength($rowData));
                }
                if (isset($this->_parameters['remove_crosssell_product'])
                    && $this->_parameters['remove_crosssell_product'] == 1
                ) {
                    $this->removeCrosssellProducts($this->getCorrectSkuAsPerLength($rowData));
                }
                if (isset($this->_parameters['remove_upsell_product'])
                    && $this->_parameters['remove_upsell_product'] == 1
                ) {
                    $this->removeUpsellProducts($this->getCorrectSkuAsPerLength($rowData));
                }
                $rowData = $this->checkAdditionalImages($rowData);
                $rowData = $this->customChangeData($rowData);
                $rowData = $this->applyCategoryLevelSeparator($rowData);
            
                if (!$this->validateRow($rowData, $rowNum) || !$this->validateRowByProductType($rowData, $rowNum)) {
                    $this->addLogWriteln(
                        __('product with sku: %1 is not valided', $this->getCorrectSkuAsPerLength($rowData)),
                        $this->output,
                        'info'
                    );
                    $this->notValidedSku[] = strtolower($this->getCorrectSkuAsPerLength($rowData));
                    unset($nextBunch[$rowNum]);
                    continue;
                } else {
                    $rowData = $this->stripSlashes($rowData);
                }

                $productType = isset($rowData[self::COL_TYPE]) ?
                    strtolower($rowData[self::COL_TYPE]) :
                    $this->skuProcessor->getNewSku($this->getCorrectSkuAsPerLength($rowData))['type_id'];
                // custom
                if ($productType) {
                    $productTypeModel = $this->_productTypeModels[$productType];
                    if ($createValuesAllowed) {
                        $rowData = $this->createAttributeValues(
                            $productTypeModel,
                            $rowData
                        );
                    }
                }

                if (!isset($rowData[self::COL_ATTR_SET]) ||
                    !isset($this->_attrSetNameToId[$rowData[self::COL_ATTR_SET]])) {
                    $this->addRowError(ValidatorInterface::ERROR_INVALID_ATTR_SET, $rowNum);
                    $this->addLogWriteln(
                        __(
                            'product with sku: %1 is not valided. ' .
                            'Invalid value for Attribute Set column (set doesn\'t exist?)',
                            $this->getCorrectSkuAsPerLength($rowData)
                        ),
                        $this->output,
                        'info'
                    );
                    $this->notValidedSku[] = strtolower($this->getCorrectSkuAsPerLength($rowData));
                    unset($nextBunch[$rowNum]);
                    continue;
                }
                $urlKey = null;
                if (!($this->onlyUpdate && empty($rowData[self::URL_KEY]))) {
                    $urlKey = $this->getProductUrlKey($rowData);
                }

                if ($urlKey) {
                    if (!empty($rowData[self::URL_KEY])) {
                        // If url_key column and its value were in the CSV file
                        $rowData[self::URL_KEY] = $urlKey;
                    } elseif ($this->isNeedToChangeUrlKey($rowData)) {
                        // If url_key column was empty or even not declared in the CSV file but by the rules
                        // it is need to be setteed. In case when url_key is generating from name column we
                        // have to ensure that the bunch of products will pass for the event with url_key column.
                        $nextBunch[$rowNum][self::URL_KEY] = $rowData[self::URL_KEY] = $urlKey;
                    } elseif (isset($rowData[self::URL_KEY]) || isset($rowData[self::COL_NAME])) {
                        $rowData[self::URL_KEY] = $urlKey;
                    }
                }

                $this->urlKeys = [];
                $rowData = $this->adjustBundleTypeAttributes($rowData);

                if (empty($this->getCorrectSkuAsPerLength($rowData))) {
                    $rowData = array_merge($prevData, $this->deleteEmpty($rowData));
                } else {
                    $prevData = $rowData;
                }
                $sku = $this->getCorrectSkuAsPerLength($rowData);
                if ($this->onlyUpdate) {
                    $collectionUpdate = $this->collectionFactory->create()->addFieldToFilter(
                        self::COL_SKU,
                        $this->getCorrectSkuAsPerLength($rowData)
                    );
                    if (!$collectionUpdate->getSize()) {
                        $this->addLogWriteln(__('product with sku: %1 does not exist', $sku), $this->output, 'info');
                        unset($nextBunch[$rowNum]);
                        continue;
                    }
                }
                if ($this->getErrorAggregator()->isErrorLimitExceeded()) {
                    $this->getErrorAggregator()->addRowToSkip($rowNum);
                    unset($nextBunch[$rowNum]);
                    $this->notValidedSku[] = strtolower($this->getCorrectSkuAsPerLength($rowData));

                    continue;
                }

                if (isset($rowData['_attribute_set']) && isset($this->_attrSetNameToId[$rowData['_attribute_set']])) {
                    $this->skuProcessor->setNewSkuData(
                        $this->getCorrectSkuAsPerLength($rowData),
                        'attr_set_id',
                        $this->_attrSetNameToId[$rowData['_attribute_set']]
                    );
                }
                $rowScope = $this->getRowScope($rowData);
                $rowSku = $this->getCorrectSkuAsPerLength($rowData);
                $checkSku = $rowSku;

                if (version_compare($this->productMetadata->getVersion(), '2.2.0', '>=')) {
                    $checkSku = strtolower($rowSku);
                }
                if (!$rowSku) {
                    $this->getErrorAggregator()->addRowToSkip($rowNum);
                    continue;
                } elseif (self::SCOPE_STORE == $rowScope) {
                    // set necessary data from SCOPE_DEFAULT row
                    $rowData[self::COL_TYPE] = $this->skuProcessor->getNewSku($checkSku)['type_id'];
                    $rowData['attribute_set_id'] = $this->skuProcessor->getNewSku($checkSku)['attr_set_id'];
                    $rowData[self::COL_ATTR_SET] = $this->skuProcessor->getNewSku($checkSku)['attr_set_code'];
                }
                
                // Entity phase
                if (!isset($this->_oldSku[$checkSku])) {
                    $logger->info('If New product',[$checkSku]);
                    // new row
                    if (!$productLimit || $productsQty < $productLimit) {
                        if ($sellerId) {
                            // s change import data for seller validation
                            $logger->info('in Product plugin In foreach loop IN IF $sellerId: ',[$sellerId]);
                            if ($sellerValid) {
                            $logger->info('in Product plugin In IF $sellerValid: ',[$sellerValid]);
                            $logger->info('in Product plugin In IF $rowCount: ',[$rowCount]);
                            $logger->info('in Product plugin In IF $diffCount: ',[$diffCount]);
                                if ($rowCount > $diffCount) {
                                    $logger->info('in Product plugin In IF $rowCount > $diffCount: ',[""]);
                                    $logger->info('in Product plugin In IF $rowCount > $diffCount = $rowCount: ',[$rowCount]);
                                    $logger->info('in Product plugin In IF $rowCount > $diffCount = $diffCount: ',[$diffCount]);
                                    $logger->info('in Product plugin In IF $rowCount > $diffCount = $rowSku: ',[$rowSku]);
                                    $rowSku = null;
                                    // sign for child rows to be skipped
                                    $this->getErrorAggregator()->addRowToSkip($rowNum);
                                    $logger->info('in Product plugin error 0: ',['You already import product'. $productCount .' for this duration and now your product limit is '.$diffCount]);
                                    $this->addLogWriteln(__('You already import product'. $productCount .' for this duration and now your product limit is '.$diffCount), $this->output, 'info');
                                    continue;
                                } else {
                                    $logger->info('in Product plugin In ELSE $rowCount > $diffCount: ',[""]);
                                    if (isset($rowData['has_options'])) {
                                        $hasOptions = $rowData['has_options'];
                                    } else {
                                        $hasOptions = 0;
                                    }
                                    $logger->info('in Product plugin In BEFORE $entityRowsIn[$rowSku]: ',[$rowSku]);
                                    $entityRowsIn[$rowSku] = [
                                        'attribute_set_id' => $this->skuProcessor->getNewSku($checkSku)['attr_set_id'],
                                        'type_id' => $this->skuProcessor->getNewSku($checkSku)['type_id'],
                                        'sku' => $rowSku,
                                        'has_options' => $hasOptions,
                                        'created_at' => $this->_localeDate->date()->format(DateTime::DATETIME_PHP_FORMAT),
                                        'updated_at' => $this->_localeDate->date()->format(DateTime::DATETIME_PHP_FORMAT),
                                    ];
                                    $productsQty++;
                                    $rowCount++;
                                    $logger->info('in Product plugin In AFTER $entityRowsIn[$rowSku]: ',[""]);

                                    $logger->info('in Product plugin error 1: ',["add new product"]);
                                }
                            } else {
                                $logger->info('in Product plugin ELSE $sellerValid : ',[$sellerErrorMeg]);
                                $logger->info('in Product plugin error 2: ',[$sellerErrorMeg]);
                                $rowSku = null;
                                // sign for child rows to be skipped
                                $this->getErrorAggregator()->addRowToSkip($rowNum);
                                $this->addLogWriteln(__($sellerErrorMeg), $this->output, 'info');
                                $logger->info('in Product plugin END ELSE $sellerValid : ',[$sellerErrorMeg]);
                                continue;
                            }
                            // m change import data for seller validation
                        } else {
                            $logger->info('in Product plugin ELSE $sellerId : ',[$sellerId]);
                            if (isset($rowData['has_options'])) {
                                $hasOptions = $rowData['has_options'];
                            } else {
                                $hasOptions = 0;
                            }
                            $entityRowsIn[$rowSku] = [
                                'attribute_set_id' => $this->skuProcessor->getNewSku($checkSku)['attr_set_id'],
                                'type_id' => $this->skuProcessor->getNewSku($checkSku)['type_id'],
                                'sku' => $rowSku,
                                'has_options' => $hasOptions,
                                'created_at' => $this->_localeDate->date()->format(DateTime::DATETIME_PHP_FORMAT),
                                'updated_at' => $this->_localeDate->date()->format(DateTime::DATETIME_PHP_FORMAT),
                            ];
                            $productsQty++;
                            $logger->info('in Product plugin END ELSE $sellerId : ',[""]);
                        }
                    } else {
                        $rowSku = null;
                        // sign for child rows to be skipped
                        $this->getErrorAggregator()->addRowToSkip($rowNum);
                        continue;
                    }
                } else {
                    $logger->info('If existing product',[$checkSku]);
                    $array = [
                        'updated_at' => $this->_localeDate->date()->format(DateTime::DATETIME_PHP_FORMAT),
                        $entityLinkField => $this->_oldSku[$checkSku][$entityLinkField],
                    ];
                    $array['attribute_set_id'] = $this->skuProcessor->getNewSku($checkSku)['attr_set_id'];
                    $array['type_id'] = $productType;
                    // existing row
                    $entityRowsUp[] = $array;
                }

                // Categories phase
                if (!array_key_exists($rowSku, $this->categoriesCache)) {
                    $this->categoriesCache[$rowSku] = [];
                }

                $rowData['rowNum'] = $rowNum;
                $categoryIds = $this->getCategories($rowData);
                if (isset($rowData['category_ids'])) {
                    $catIds = explode($this->getMultipleValueSeparator(), $rowData['category_ids']);
                    $finalCatId = [];
                    foreach ($catIds as $catId) {
                        $catId = (int)$catId;
                        $existingCat = $this->categoryProcessor->getCategoryById($catId);
                        if (is_int($catId) && $catId > 0 && $existingCat && $existingCat->getId()) {
                            $finalCatId[] = $catId;
                        }
                    }
                    $categoryIds = array_merge($categoryIds, $finalCatId);
                }

                foreach ($categoryIds as $id) {
                    $this->categoriesCache[$rowSku][$id] = true;
                }

                $catIds = [];
                if ($this->isSkuExist($rowSku)) {
                    if (!isset($this->_oldSku[strtolower($rowData[self::COL_SKU])]['entity_id'])) {
                        $entityId = $this->_oldSku[strtolower($rowData[self::COL_SKU])]['row_id'];
                        $this->skuProcessor->setNewSkuData($rowData[self::COL_SKU], 'entity_id', $entityId);
                    } else {
                        $entityId = $this->_oldSku[strtolower($rowData[self::COL_SKU])]['entity_id'];
                    }
                    $oldCategoryIds = $this->getCategoryLinks($entityId);

                    if (!empty($categoryIds)
                        && isset(
                            $this->_parameters['remove_product_categories'],
                            $this->_oldSku[strtolower($rowData[self::COL_SKU])]
                        )
                        && $this->_parameters['remove_product_categories'] > 0
                    ) {
                        foreach ($oldCategoryIds as $oldCategoryId) {
                            if (!in_array($oldCategoryId['category_id'], $categoryIds, false)) {
                                $this->categoriesCache[$rowSku][$oldCategoryId['category_id']] = false;
                            }
                        }
                    }
                }
                

                if (!isset($this->categoryProductPosition[$rowSku])) {
                    $this->categoryProductPosition[$rowSku] = [];
                }
                $this->categoryProductPosition[$rowSku] += $this->categoryProcessor->getRowCategoryPosition();

                if (isset($rowData[self::COL_CATEGORY]) && empty($rowData[self::COL_CATEGORY])) {
                    foreach ($catIds as $categoryId) {
                        $this->categoryLinkRepository->deleteByIds($categoryId, $rowData[self::COL_SKU]);
                        $this->categoriesCache[$rowSku] = [];
                        $this->categoryProductPosition[$rowSku] = [];
                    }
                }

                unset($rowData['rowNum']);
                if (!array_key_exists($rowSku, $this->websitesCache)) {
                    $this->websitesCache[$rowSku] = [];
                }
                // Product-to-Website phase
                if (!empty($rowData[self::COL_PRODUCT_WEBSITES])) {
                    $websiteCodes = explode($this->getMultipleValueSeparator(), $rowData[self::COL_PRODUCT_WEBSITES]);
                    foreach ($websiteCodes as $websiteCode) {
                        $websiteId = $this->storeResolver->getWebsiteCodeToId($websiteCode);
                        $this->websitesCache[$rowSku][$websiteId] = true;
                    }
                }
                
                // Price rules
                $rowData = $this->applyPriceRules($rowData);
                $fixedName = __("Fixed");
                $fixed = $fixedName;
                if (isset($rowData['_tier_price_value_type'])) {
                    $fixed = $rowData['_tier_price_value_type'] == $fixedName;
                }
                // Tier prices phase
                if (!empty($rowData['_tier_price_website'])) {
                    $tierPrices[$rowSku][] = [
                        'all_groups' => $rowData['_tier_price_customer_group'] == self::VALUE_ALL,
                        'customer_group_id' => $rowData['_tier_price_customer_group'] ==
                        self::VALUE_ALL ? 0 : $rowData['_tier_price_customer_group'],
                        'qty' => $rowData['_tier_price_qty'],
                        'value' => ($fixed) ? $rowData['_tier_price_price'] : 0,
                        'website_id' => self::VALUE_ALL == $rowData['_tier_price_website'] || $isPriceGlobal
                            ? 0
                            : $this->storeResolver->getWebsiteCodeToId(
                                $rowData['_tier_price_website']
                            ),
                        'percentage_value' => (!$fixed) ? $rowData['_tier_price_price'] : 0,
                    ];
                    $tierPrices = array_merge($tierPrices, $this->getTierPrices($rowData, $rowSku));
                } else {
                    $tierPrices += $this->getTierPrices($rowData, $rowSku);
                }
                if (!$this->validateRow($rowData, $rowNum)) {
                    $this->addLogWriteln(__('product with sku: %1 is not valided', $sku), $this->output, 'info');
                    unset($nextBunch[$rowNum]);
                    continue;
                }
                
                // Media gallery phase
                if ($this->publisher && isset($this->_parameters['deferred_images']) &&
                    $this->_parameters['deferred_images']) {
                    $this->importImage->addMediaGalleryRows($rowData);
                } else {
                    $this->importImageProcessor->setConfig($this->_parameters);
                    $this->processMediaGalleryRows(
                        $rowData,
                        $mediaGallery,
                        $existingImages,
                        $uploadedImages,
                        $rowNum,
                        $existingAttributeImages
                    );
                }

                if (!$productType === null) {
                    $previousType = $productType;
                }
                $prevAttributeSet = null;
                if (isset($rowData[self::COL_ATTR_SET])) {
                    $prevAttributeSet = $rowData[self::COL_ATTR_SET];
                }
                if (self::SCOPE_NULL == $rowScope) {
                    // for multiselect attributes only
                    if (!$prevAttributeSet === null) {
                        $rowData[self::COL_ATTR_SET] = $prevAttributeSet;
                    }
                    if ($productType === null && !$previousType === null) {
                        $productType = $previousType;
                    }
                    if ($productType === null) {
                        continue;
                    }
                }
                
                if (!$productType) {
                    $tempProduct = $this->skuProcessor->getNewSku($checkSku);
                    if (isset($tempProduct['type_id'])) {
                        $productType = $tempProduct['type_id'];
                    }
                }
                
                if ($productType) {
                    $rowScope = empty($rowData[self::COL_STORE]) ? self::SCOPE_DEFAULT : self::SCOPE_STORE;
                    $rowStore = (self::SCOPE_STORE == $rowScope)
                        ? $this->storeResolver->getStoreCodeToId($rowData[self::COL_STORE])
                        : 0;
                    $productTypeModel = $this->_productTypeModels[$productType];

                    if (!empty($rowData['tax_class_name'])) {
                        $rowData['tax_class_name'] = $this->getCurrentTaxClass($rowData['tax_class_name']);
                        $rowData['tax_class_id'] =
                            $this->taxClassProcessor->upsertTaxClass($rowData['tax_class_name'], $productTypeModel);
                    }

                    if ($this->getBehavior() == Import::BEHAVIOR_APPEND ||
                        empty($this->getCorrectSkuAsPerLength($rowData))) {
                        if (isset($this->_parameters['clear_attribute_value'])
                            && $this->_parameters['clear_attribute_value'] == 0) {
                            $rowData = $productTypeModel->clearEmptyData($rowData);
                        }
                    }

                    if (isset($this->_parameters['clear_attribute_value'])
                        && $this->_parameters['clear_attribute_value'] == 1
                    ) {
                        $rowData[self::COL_STORE] = null;
                    }
                    $rowData = $productTypeModel->prepareAttributesWithDefaultValueForSave(
                        $rowData,
                        !isset($this->_oldSku[$checkSku])
                    );
                    $this->prepareConfigurableVariation($prevData, $rowData, $configurableData);
                    //google translation data
                    if ($this->translator->isTranslatorSet()) {
                        $translateAttributes = $this->_parameters['translate_attributes'] ?? [];
                        $translateStore = (int)($this->_parameters['translate_store_ids'] ?? 0);
                    }

                    $skuLower = strtolower($rowSku);

                    // retrieves attributes
                    $attributeList = [];
                    foreach ($rowData as $attrCode => $attrValue) {
                        $attributeList[$attrCode] = $this->retrieveAttributeByCode($attrCode);
                    }

                    // attributes default values
                    $attributesDefaultValues = $this->getDefaultAttributesValue($attributeList, $skuLower, $rowStore);
                    
                    foreach ($rowData as $attrCode => $attrValue) {
                        $attribute = $this->retrieveAttributeByCode($attrCode);
                        if ('multiselect' != $attribute->getFrontendInput() && self::SCOPE_NULL == $rowScope) {
                            // skip attribute processing for SCOPE_NULL rows
                            continue;
                        }
                        
                        $attrId = $attribute->getId();
                        $backModel = $attribute->getBackendModel();
                        $attrTable = $attribute->getBackend()->getTable();
                        $storeIds = [0];

                        if ('datetime' == $attribute->getBackendType()
                            && (
                                in_array($attribute->getAttributeCode(), $this->dateAttrCodes)
                                || $attribute->getIsUserDefined()
                            )
                        ) {
                            $attrValue = $this->dateTime->formatDate($attrValue, false);
                        } elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
                            $attrValue = gmdate(
                                'Y-m-d H:i:s',
                                $this->_localeDate->date($attrValue)->getTimestamp()
                            );
                        }

                        $defaultValue = $attributesDefaultValues[
                            $this->getAttributeDefaultValueKey($skuLower, $attribute->getId(), 0)
                            ] ?? false;
                        $storeValue = $attributesDefaultValues[
                            $this->getAttributeDefaultValueKey($skuLower, $attribute->getId(), $rowStore)
                            ] ?? false;

                        if (!isset($this->adminAttributeValue[$rowSku])) {
                            $this->adminAttributeValue = [$rowSku => []];
                        }

                        if (false === $defaultValue && $rowStore == 0) {
                            $this->adminAttributeValue[$rowSku][$attrCode] = $attrValue;
                        }
                        
                        /*
                         * If storeValue exists and the default value is same as new value then remove it
                         */
                        if ($storeValue && $defaultValue === (string)$attrValue && $rowStore > 0) {
                            $this->_deleteStoreAttributeValue($attribute, $rowSku, $rowStore);
                        }
                        if ($this->translator->isTranslatorSet()) {
                            if (!empty($translateAttributes)
                                && !empty($translateStore)
                                && !isset($attributes[$attrTable][$rowSku][$attrId][$translateStore])
                                && in_array($attrCode, $translateAttributes, true)
                            ) {
                                $storeValue = $this->translator
                                    ->translateAttributeValue($attrValue, $attrCode, $translateStore);
                                $attributes[$attrTable][$rowSku][$attrId][$translateStore] = $storeValue;
                            } elseif (isset($translateStore) && $translateStore > 0) {
                                $this->_deleteStoreAttributeValue($attribute, $rowSku, $translateStore);
                            }
                        }
                        if ($defaultValue && ($defaultValue === (string)$attrValue)) {
                            continue;
                        }

                        $adminValue = $this->adminAttributeValue[$rowSku][$attrCode] ?? false;
                        if (false !== $adminValue && $adminValue === $attrValue && $rowStore > 0) {
                            continue;
                        }

                        if (self::SCOPE_STORE == $rowScope) {
                            if (self::SCOPE_WEBSITE == $attribute->getIsGlobal()) {
                                // check website defaults already set
                                if (!isset($attributes[$attrTable][$rowSku][$attrId][$rowStore])) {
                                    $storeIds = $this->storeResolver->getStoreIdToWebsiteStoreIds($rowStore);
                                }
                            } elseif (self::SCOPE_STORE == $attribute->getIsGlobal()) {
                                $storeIds = [$rowStore];
                            } elseif (self::SCOPE_DEFAULT == $attribute->getIsGlobal()) {
                                $storeIds = [0];
                            }

                            if (!isset($this->_oldSku[$checkSku])) {
                                $storeIds[] = 0;
                            }
                        }
                        $storeIds = array_unique($storeIds);
                        sort($storeIds);

                        foreach ($storeIds as $storeId) {
                            if (!isset($attributes[$attrTable][$rowSku][$attrId][$storeId])) {
                                if (isset($this->_oldSku[$checkSku])
                                    && in_array($attrCode, ['image', 'small_image', 'thumbnail', 'swatch_image'])
                                    && !in_array(Store::DEFAULT_STORE_ID, $storeIds) && !$defaultValue) {
                                    $attributes[$attrTable][$rowSku][$attrId][Store::DEFAULT_STORE_ID] = $attrValue;
                                } else {
                                    $attributes[$attrTable][$rowSku][$attrId][$storeId] = $attrValue;
                                }
                            }
                        }
                        // restore 'backend_model' to avoid 'default' setting
                        $attribute->setBackendModel($backModel);
                    }

                    $time = explode(" ", microtime());
                    $endTime = $time[0] + $time[1];
                    $totalTime = $endTime - $startTime;
                    $totalTime = round($totalTime, 5);
                    $this->addLogWriteln(__('product with sku: %1 .... %2s', $sku, $totalTime), $this->output, 'info');
                }
            }
            $logger->info('in Product plugin $rowCount last: ',[$rowCount]);
            
            
            
            if (method_exists($this, '_saveProductEntity')) {
                $this->_saveProductEntity(
                    $entityRowsIn,
                    $entityRowsUp
                );
            } else {
                $this->saveProductEntity(
                    $entityRowsIn,
                    $entityRowsUp
                );
            }

            $isCached = $this->_parameters['cache_products'] ?? false;
            if ($isCached) {
                $this->saveProductsCache($entityRowsIn, $entityRowsUp);
            }
            $this->afterSaveNewEntities($entityRowsIn);
            $this->addLogWriteln(__('Imported: %1 rows', count($entityRowsIn)), $this->output, 'info');
            $this->addLogWriteln(__('Updated: %1 rows', count($entityRowsUp)), $this->output, 'info');
            $this->_saveProductWebsites(
                $this->websitesCache
            )->_saveProductCategories(
                $this->categoriesCache
            )->_saveProductTierPrices(
                $tierPrices
            );
            if ($this->publisher && isset($this->_parameters['deferred_images']) &&
                $this->_parameters['deferred_images']) {
                $this->importImage->publishBranch();
            } else {
                $this->_saveMediaGallery($mediaGallery);
            }
            $this->_saveProductAttributes($attributes);
            $this->_saveProductCategoriesPosition($this->categoryProductPosition);

            $this->_eventManager->dispatch(
                'catalog_product_import_bunch_save_after',
                ['adapter' => $this, 'bunch' => $nextBunch]
            );
        }
        if (!empty($configurableData)) {
            $this->saveConfigurationVariations($configurableData, $existingImages);
        }

        $this->cache->clean([ImportProductCache::BUFF_CACHE]);
        return $this;
    }
    
    /**
     * Get product entity link field
     *
     * @return string
     * @throws Exception
     */
    protected function getProductEntityLinkField()
    {
        if (!$this->productEntityLinkField) {
            $this->productEntityLinkField = $this->getMetadataPool()
                ->getMetadata(ProductInterface::class)
                ->getLinkField();
        }
        
        return $this->productEntityLinkField;
    }
    
    /**
     * Check if product exists for specified SKU
     *
     * @param string $sku
     *
     * @return bool
     */
    protected function isSkuExist($sku)
    {
        if (version_compare($this->productMetadata->getVersion(), '2.2.0', '>=')) {
            $sku = strtolower($sku);
        }
        return isset($this->_oldSku[$sku]);
    }
    
    /**
     * @return array
     */
    protected function getStoreIds()
    {
        if (empty($this->storeIds)) {
            $this->storeIds = array_merge(
                array_keys($this->getStoreManager()->getStores()),
                [0]
            );
        }
        return $this->storeIds;
    }
    
    /**
     * @param array $attributeList
     * @param $sku
     * @param int $rowStoreId
     * @return array|false
     * @throws Exception
     */
    protected function getDefaultAttributesValue(array $attributeList, $sku, $rowStoreId = 0)
    {
        $resultList = [];
        $defaultStoreId = 0;
        $storeIdList = [];
        $storeIdList[] = $defaultStoreId;
        if ($rowStoreId != $defaultStoreId) {
            $storeIdList[] = $rowStoreId;
        }

        $linkField = $this->getProductEntityLinkField();

        if (!isset($this->_oldSku[$sku][$linkField])) {
            return false;
        }
        $linksFieldId = $this->_oldSku[$sku][$linkField];

        $attributeIdListByGroup = [];
        foreach ($attributeList as $attribute) {
            $attributeIdListByGroup[$attribute->getBackend()->getTable()][] = $attribute->getId();
        }

        foreach ($attributeIdListByGroup as $table => $attrIdList) {
            $select = $this->_connection->select()
                ->from($table, ['*'])
                ->where('attribute_id in(?)', $attrIdList)
                ->where('store_id in(?)', $storeIdList)
                ->where($linkField . ' = ?', $linksFieldId);

            $attrs = $this->_connection->fetchAll($select);
            if (!empty($attrs)) {
                foreach ($attrs as $attr) {
                    $resultKey = $this->getAttributeDefaultValueKey($sku, $attr['attribute_id'], $attr['store_id']);
                    $resultList[$resultKey] = $attr['value'];
                }
            }
        }

        return $resultList;
    }
    
    /**
     * @param $sku
     * @param $attributeId
     * @param int $storeId
     * @return string
     */
    protected function getAttributeDefaultValueKey($sku, $attributeId, $storeId = 0)
    {
        return implode('-', [$sku, $attributeId, $storeId]);
    }
    
    /**
     * Whether a url key is needed to be change.
     *
     * @param array $rowData
     * @return bool
     */
    protected function isNeedToChangeUrlKey(array $rowData): bool
    {
        $urlKey = $this->getUrlKey($rowData);
        $productExists = $this->isSkuExist($rowData[self::COL_SKU]);
        $markedToEraseUrlKey = isset($rowData[self::URL_KEY]);
        // The product isn't new and the url key index wasn't marked for change.
        if (!$urlKey && $productExists && !$markedToEraseUrlKey) {
            // Seems there is no need to change the url key
            return false;
        }
        return true;
    }
    
}
FireImportExport/Model/Plugin/0000755000000000000000000000000014364325176015347 5ustar  rootrootFireImportExport/Model/Plugin/ResourceModel/0000755000000000000000000000000014364325176020117 5ustar  rootrootFireImportExport/Model/Plugin/ResourceModel/Import/0000755000000000000000000000000014364325176021371 5ustar  rootrootFireImportExport/Model/Plugin/ResourceModel/Import/Grid.php0000644000000000000000000000565214364325176022777 0ustar  rootroot<?php
namespace WebbyTroops\FireImportExport\Model\Plugin\ResourceModel\Import; 
 
use Magento\Framework\App\ResourceConnection;

class Grid
{
    /**
     * 
     * @var ResourceConnection
     */
    protected $connection;
    
    public static $tableImport = 'firebear_import_jobs';
    public static $tableExport = 'firebear_export_jobs';
 
    /**
     * 
     * @param ResourceConnection $connection
     */
    public function __construct(
        ResourceConnection $connection
    ) {
        $this->connection = $connection;
    }
    
    public function afterSearch($intercepter, $collection)
    {
        if (($collection->getMainTable() === $collection->getConnection()->getTableName(self::$tableImport)) 
                || ($collection->getMainTable() === $collection->getConnection()->getTableName(self::$tableExport))) {
            /* Get full query in string */
            $fullstring = $collection->getSelect()->__toString();
            /* Chcek isset where condition for seller_id */
            $keyWord = $this->getKeyWord($fullstring, "`seller_id` LIKE '%", "%')");
            if ($keyWord) {
                /* Get all seller ids from lof_marketplace_seller table with search keyword email*/
                $conn = $this->connection->getConnection();
                $sellerTable = $this->connection->getTableName('lof_marketplace_seller');
                $selectSeller = $conn->select()->from(
                        ["seller" => $sellerTable],
                        ['seller_id', 'email']
                    )->where('seller.email LIKE (?)', '%'.$keyWord.'%');
                
                $sellerIds = $conn->fetchCol($selectSeller);
                /* If get seller ids form lof_marketplace_seller table */
                if (count($sellerIds)) {
                    $where = $collection->getSelect()->getPart(\Magento\Framework\DB\Select::WHERE);
                    /* Chenge where condition in collection for seller id with where LIKE to where IN for seller_id */
                    $serch = "`seller_id` LIKE '%".$keyWord."%'";
                    $replace = "`seller_id` IN(". implode(',', $sellerIds).")";
                    $newWhere = str_replace($serch, $replace, $where);
                    /* Chenge collection data with new where condition */
                    $collection->getSelect()->setPart(\Magento\Framework\DB\Select::WHERE, $newWhere);   
                }   
            }
        }
        return $collection;
 
 
    }
    
    /**
     * Get string between to character for get search key word
     * 
     * @param string $string
     * @param type $start
     * @param type $end
     * @return string
     */
    public function getKeyWord($string, $start, $end){
        $string = ' ' . $string;
        $ini = strpos($string, $start);
        if ($ini == 0) return '';
        $ini += strlen($start);
        $len = strpos($string, $end, $ini) - $ini;
        return substr($string, $ini, $len);
    }
 
 
}FireImportExport/registration.php0000644000000000000000000000026214364325176016274 0ustar  rootroot<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'WebbyTroops_FireImportExport',
    __DIR__
);
FireImportExport/view/0000755000000000000000000000000014364325176014023 5ustar  rootrootFireImportExport/view/adminhtml/0000755000000000000000000000000014364325176016000 5ustar  rootrootFireImportExport/view/adminhtml/ui_component/0000755000000000000000000000000014364325176020477 5ustar  rootrootFireImportExport/view/adminhtml/ui_component/import_job_grid.xml0000644000000000000000000000152714364325176024377 0ustar  rootroot<?xml version="1.0" encoding="UTF-8"?>

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="import_job_columns">
        <column name="seller_id" class="WebbyTroops\FireImportExport\Ui\Component\Listing\Column\SellerEmailProvder">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="label" xsi:type="string" translate="true">Seller Email</item>
                    <item name="sortOrder" xsi:type="number">71</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>FireImportExport/view/adminhtml/ui_component/export_job_grid.xml0000644000000000000000000000152714364325176024406 0ustar  rootroot<?xml version="1.0" encoding="UTF-8"?>

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="export_job_columns">
        <column name="seller_id" class="WebbyTroops\FireImportExport\Ui\Component\Listing\Column\SellerEmailProvder">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="label" xsi:type="string" translate="true">Seller Email</item>
                    <item name="sortOrder" xsi:type="number">61</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>