CustomerGroupsId always true for cart price rulesShopping Cart Price RulesCart Price RulesAlways display Shopping Cart Price Rules Label above cart (not just when rule is first applied)shopping cart rules for multiple countries?Again Shopping Cart Price RulesMagento discount for various shopping cart price rulesCatalog price rules vs. shopping cart price rulesCoupon + other cart price rulesCart Price Rules HelpCart Price Rules having issues

Looking for a soft substance that doesn't dissolve underwater

I think I may have violated academic integrity last year - what should I do?

Were pens caps holes designed to prevent death by suffocation if swallowed?

Is there a public standard for 8 and 10 character grid locators?

Is floating in space similar to falling under gravity?

What is the largest (size) solid object ever dropped from an airplane to impact the ground in freefall?

Command to Search for Filenames Exceeding 143 Characters?

Where did Wilson state that the US would have to force access to markets with violence?

Binary Search in C++17

How do I align equations in three columns, justified right, center and left?

At what point in European history could a government build a printing press given a basic description?

Array Stutter Implementation

Rename photos to match video titles

Should I disclose a colleague's illness (that I should not know about) when others badmouth him

Why is desire the root of suffering?

Does revoking a certificate result in revocation of its key?

Why colon to denote that a value belongs to a type?

Why does the 6502 have the BIT instruction?

Rests in pickup measure (anacrusis)

Is CD audio quality good enough for the final delivery of music?

analysis of BJT PNP type - why they can use voltage divider?

Can't remember the name of this game

Four-in-a-line Puzzle

How were these pictures of spacecraft wind tunnel testing taken?



CustomerGroupsId always true for cart price rules


Shopping Cart Price RulesCart Price RulesAlways display Shopping Cart Price Rules Label above cart (not just when rule is first applied)shopping cart rules for multiple countries?Again Shopping Cart Price RulesMagento discount for various shopping cart price rulesCatalog price rules vs. shopping cart price rulesCoupon + other cart price rulesCart Price Rules HelpCart Price Rules having issues






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm a bit new here in the forum som feel free to slap me on the fingers if I'm dumb.



I want to change the logic in the sales rules engine so it doesn't check the salesrules_customer_id table and instead just skips that filtering.



The reason for this is that the site I'm building is going to use A lot of the same cart price rules. And the less the algorithm checks for the faster the site.



I've been debugging around in:
MagentoSalesRuleModelResourceModel



But still I'm not able to find what I'm searching for.



Anyone got any clue how to solves this?










share|improve this question









New contributor



Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I'm a bit new here in the forum som feel free to slap me on the fingers if I'm dumb.



    I want to change the logic in the sales rules engine so it doesn't check the salesrules_customer_id table and instead just skips that filtering.



    The reason for this is that the site I'm building is going to use A lot of the same cart price rules. And the less the algorithm checks for the faster the site.



    I've been debugging around in:
    MagentoSalesRuleModelResourceModel



    But still I'm not able to find what I'm searching for.



    Anyone got any clue how to solves this?










    share|improve this question









    New contributor



    Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      0












      0








      0








      I'm a bit new here in the forum som feel free to slap me on the fingers if I'm dumb.



      I want to change the logic in the sales rules engine so it doesn't check the salesrules_customer_id table and instead just skips that filtering.



      The reason for this is that the site I'm building is going to use A lot of the same cart price rules. And the less the algorithm checks for the faster the site.



      I've been debugging around in:
      MagentoSalesRuleModelResourceModel



      But still I'm not able to find what I'm searching for.



      Anyone got any clue how to solves this?










      share|improve this question









      New contributor



      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm a bit new here in the forum som feel free to slap me on the fingers if I'm dumb.



      I want to change the logic in the sales rules engine so it doesn't check the salesrules_customer_id table and instead just skips that filtering.



      The reason for this is that the site I'm building is going to use A lot of the same cart price rules. And the less the algorithm checks for the faster the site.



      I've been debugging around in:
      MagentoSalesRuleModelResourceModel



      But still I'm not able to find what I'm searching for.



      Anyone got any clue how to solves this?







      magento2 shopping-cart-price-rules sales






      share|improve this question









      New contributor



      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited May 21 at 13:42









      Amit Bera

      60.4k1682181




      60.4k1682181






      New contributor



      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked May 21 at 13:24









      Max MalmerMax Malmer

      11




      11




      New contributor



      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I've narrowed it down to this code:



          public function addCustomerGroupFilter($customerGroupId)

          $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
          if (!$this->getFlag('is_customer_group_joined'))
          $this->setFlag('is_customer_group_joined', true);
          $this->getSelect()->join(
          ['customer_group' => $this->getTable($entityInfo['associations_table'])],
          $this->getConnection()
          ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
          . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
          . $entityInfo['rule_id_field'],
          []
          );

          $this->setFlag('is_customer_group_joined', true);
          $this->getSelect()->join(
          ['customer_group' => $this->getTable($entityInfo['associations_table'])],
          $this->getConnection()
          ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
          . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
          . $entityInfo['rule_id_field'],
          []
          );
          return $this;



          Still not sure how I'm going to modify it though.






          share|improve this answer










          New contributor



          Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.



















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            Max Malmer is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275489%2fcustomergroupsid-always-true-for-cart-price-rules%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I've narrowed it down to this code:



            public function addCustomerGroupFilter($customerGroupId)

            $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
            if (!$this->getFlag('is_customer_group_joined'))
            $this->setFlag('is_customer_group_joined', true);
            $this->getSelect()->join(
            ['customer_group' => $this->getTable($entityInfo['associations_table'])],
            $this->getConnection()
            ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
            . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
            . $entityInfo['rule_id_field'],
            []
            );

            $this->setFlag('is_customer_group_joined', true);
            $this->getSelect()->join(
            ['customer_group' => $this->getTable($entityInfo['associations_table'])],
            $this->getConnection()
            ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
            . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
            . $entityInfo['rule_id_field'],
            []
            );
            return $this;



            Still not sure how I'm going to modify it though.






            share|improve this answer










            New contributor



            Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.























              0














              I've narrowed it down to this code:



              public function addCustomerGroupFilter($customerGroupId)

              $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
              if (!$this->getFlag('is_customer_group_joined'))
              $this->setFlag('is_customer_group_joined', true);
              $this->getSelect()->join(
              ['customer_group' => $this->getTable($entityInfo['associations_table'])],
              $this->getConnection()
              ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
              . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
              . $entityInfo['rule_id_field'],
              []
              );

              $this->setFlag('is_customer_group_joined', true);
              $this->getSelect()->join(
              ['customer_group' => $this->getTable($entityInfo['associations_table'])],
              $this->getConnection()
              ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
              . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
              . $entityInfo['rule_id_field'],
              []
              );
              return $this;



              Still not sure how I'm going to modify it though.






              share|improve this answer










              New contributor



              Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                0












                0








                0







                I've narrowed it down to this code:



                public function addCustomerGroupFilter($customerGroupId)

                $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
                if (!$this->getFlag('is_customer_group_joined'))
                $this->setFlag('is_customer_group_joined', true);
                $this->getSelect()->join(
                ['customer_group' => $this->getTable($entityInfo['associations_table'])],
                $this->getConnection()
                ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
                . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
                . $entityInfo['rule_id_field'],
                []
                );

                $this->setFlag('is_customer_group_joined', true);
                $this->getSelect()->join(
                ['customer_group' => $this->getTable($entityInfo['associations_table'])],
                $this->getConnection()
                ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
                . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
                . $entityInfo['rule_id_field'],
                []
                );
                return $this;



                Still not sure how I'm going to modify it though.






                share|improve this answer










                New contributor



                Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                I've narrowed it down to this code:



                public function addCustomerGroupFilter($customerGroupId)

                $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
                if (!$this->getFlag('is_customer_group_joined'))
                $this->setFlag('is_customer_group_joined', true);
                $this->getSelect()->join(
                ['customer_group' => $this->getTable($entityInfo['associations_table'])],
                $this->getConnection()
                ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
                . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
                . $entityInfo['rule_id_field'],
                []
                );

                $this->setFlag('is_customer_group_joined', true);
                $this->getSelect()->join(
                ['customer_group' => $this->getTable($entityInfo['associations_table'])],
                $this->getConnection()
                ->quoteInto('customer_group.' . $entityInfo['entity_id_field'] . ' = ?', $customerGroupId)
                . ' AND main_table.' . $entityInfo['rule_id_field'] . ' = customer_group.'
                . $entityInfo['rule_id_field'],
                []
                );
                return $this;



                Still not sure how I'm going to modify it though.







                share|improve this answer










                New contributor



                Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share|improve this answer



                share|improve this answer








                edited May 21 at 14:17









                Rk Rathod

                2,041214




                2,041214






                New contributor



                Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                answered May 21 at 13:57









                Max MalmerMax Malmer

                11




                11




                New contributor



                Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.




                New contributor




                Max Malmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    Max Malmer is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    Max Malmer is a new contributor. Be nice, and check out our Code of Conduct.












                    Max Malmer is a new contributor. Be nice, and check out our Code of Conduct.











                    Max Malmer is a new contributor. Be nice, and check out our Code of Conduct.














                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275489%2fcustomergroupsid-always-true-for-cart-price-rules%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form