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

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

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?