Important

Okay
  Public Ticket #1501456
Customer Earning Behaviour Rules
Closed

Comments

  • Basant Sharma started the conversation

    The behaviour rules are not showing in behaviour rules page but they are getting saved in databases infact they are save twice for single creation of rule.

    Please look into as soon as possible

  •  1,315
    Land of replied

    Hello Basant Sharma,

    Can you give me your admin account and server info? I will check and help your resolve this issue

  • Basant Sharma replied

    Below is the URL:

    http://34.204.42.148:15672/storeadmin

    user: admin

    Pass: Welcome@10

  •  1,315
    Land of replied

    Hello Basant Sharma,

    Have a nice day!

    Can you give me SSH info? I will help you resolve this issue.

  • Basant Sharma replied

    Sharing SSH info would not be possible from our side. Please let us know what you require from code perspective and we can share that.

  •  1,315
    Land of replied

    Hello Basant Sharma,

    Please follow the instructions below:

    - Find two line

    $storeId = (int)$this->_coreRegistry->registry('current_store');
    $type    = $this->_coreRegistry->registry('current_type');

    You can find them at "app\code\Lof\RewardPointsBehavior\Model\ResourceModel\Earning\Grid\Collection.php ", function "_initSelect()"

    - Replace two line by this code

    $this->getSelect()->from(['main_table' => $this->getMainTable()]);
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();  
    $request = $objectManager->get('Magento\Framework\App\Request\Http');  
    $type = $request->getParam('type');
    $storeId = (int) $request->getParam('store', 0);


  • Basant Sharma replied

    Hi,

    Thanks for your support.

    But the admin can see the rule now but saving a rule still places two record in database.

    we can work around that but it would be prefered if it didn't happen.

    Thanks,

    Basant Sharma

  •  1,315
    Land of replied

    Hello Basant Sharma,

    We working to update extension, we will update on our download page soon.

  • Rikinkumar replied

    Hi Land of

    We are also facing same situation, when we create earning rule, it stores multiple time (7 times) in table "lof_rewardpoints_earning_rule"

    But it's not showing on Earning Rates Grid

    I tried the solution you provided to Basant Sharma, but it's not working for me, However if on following file : \app\code\Lof\RewardPoints\Model\ResourceModel\Earning\Grid\Collection.php,  function _initSelect()  If i comment this line : $this->getSelect()->where('main_table.type = (?)', $type);

    $this->getSelect()->from(['main_table' => $this->getMainTable()]);
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();  
            $request = $objectManager->get('Magento\Framework\App\Request\Http');
            $type = $request->getParam('type');
            $storeId = (int) $request->getParam('store', 0);
            //$this->getSelect()->where('main_table.type = (?)', $type);
            $this->addStoreFilter((int) $storeId);
            $this->getSelect()->group(
                'main_table.rule_id'
                );
            return $this;

    Then it works. Same issue for Spending Rate. The parameter "type" is blank on above code, there is no type parameter in URL.

    Also please give me solution for the issue of multiple record saving in database.

    Thank you in Advance.

  •  1,315
    Land of replied

    Hello Rikinkumar Patel,

    Have a nice day!

    We are working to resolve the issue of multiple record saving in database. We will update extension on Friday(Mar 30).

  • Rikinkumar replied

    Hi Land of


    Thank you for your reply. 


    Where i can get latest code though?



  •  1,315
    Land of replied

    Hello Rikinkumar Patel,

    We will update latest code on our download page.

  • Basant Sharma replied

    Hi,

    Could you confirm if the updated code is ready for download? If not by when we can have the updated code?

    Thanks

    Basant Sharma 


  •  1,315
    Land of replied

    Hello Basant Sharma,

    Have a nice day!

    We just updated module file extension at our download page, please try download and upgrade file on your server.

  • Basant Sharma replied

    Hi,

    We're still seeing the lof version to be 1.0.0 when we're downloading it.

    Is it the right and updated version for the updated code since the version in my orders is different (1.1).

  •  1,315
    Land of replied

    Hi Basant Sharma,

    Please try download on download page, it can version 1.0.0 for magento 2.1. We resolved the issue of listing rule. The issue of multiple record I need more time to research to resolve it.