Giter VIP home page Giter VIP logo

magento2-marello-bridge's Issues

Module sequence

Add sequence Magento_Sales to module.xml to ensure your module is loaded after Magento_Sales.

<sequence>
    <module name="Magento_Sales"/>
 </sequence>

Only for EE?

Hello,

I am not able to run your code in Magento CE. You are using RMA classes which I cannot find like

Magento\Rma\Model\RmaRepository
Magento\Rma\Model\ResourceModel\Item\Collection
Magento\Rma\Model\ResourceModel\Item\CollectionFactory

Is this a EE Module?

Schema update

After installation row "marello_export_status" is missing in sales_order_grid. Placing order is not possible.

QueueCollection does not iterate

The process in EntityQueueManagement.php stops with limit of batch size without iteration through the queue.

This code loads queue fully with setting current page for collection

/**
     * {@inheritdoc}
     * @return $this
     */
    protected function getQueueCollection($curPage = 1)
    {
        $entityQueueCollection = $this->entityQueueFactory->create()->getCollection();
        $entityQueueCollection->addFilter('processed', ['eq' => 0]);
        return $entityQueueCollection->setPageSize($this->getBatchSize())->setCurPage($curPage);
    }

    /**
     * {@inheritdoc}
     * @return bool
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function processQueue()
    {
        $allLoaded = FALSE;
        $curPage = 1;
        $i = 1;
                    
        while(!$allLoaded) {
            $collection = $this->getQueueCollection($curPage);

            if($collection->getSize() >= $i) {
                try {
                    foreach ($collection as $queueItem) {
                        $eventType = $queueItem->getEventType();
                        $processor = null;
                        if ($eventType) {
                            $processor = $this->getEntityProcessor($eventType);
                        }
                        $entityData = $this->getEntityData($queueItem);
                        $result = $processor->process($entityData);
                        var_dump($result);
                        if ($result) {
                            $queueItem->setProcessed(1);
                            $queueItem->setProcessedAt(new \DateTime('now'));
                            $this->entityQueueRepository->save($queueItem);
                        }
                        $i++;
                    }
                } catch (\Exception $e) {
                    throw new \Magento\Framework\Exception\LocalizedException(__('Could not process Queue item'));
                    return false;
                }

                $curPage++;
            } else {
                $allLoaded = TRUE;
            }
        }
        
        return true;
    }

Customer creation fails in special case

I have experienced a special case where customer creation stopped. The default store ID becomes "0" in some cases. I have only loaded one default store with ID "1".

I have added these lines in CustomerDataConverter:

$websiteId = $order->getStore()->getWebsite()->getId();
$customer = $this->customerRepository->get($order->getCustomerEmail(), $websiteId);

Now it works without problems

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.