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;
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
magento2 shopping-cart-price-rules sales
New contributor
New contributor
edited May 21 at 13:42
Amit Bera♦
60.4k1682181
60.4k1682181
New contributor
asked May 21 at 13:24
Max MalmerMax Malmer
11
11
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
New contributor
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
New contributor
add a comment |
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.
New contributor
add a comment |
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.
New contributor
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.
New contributor
edited May 21 at 14:17
Rk Rathod
2,041214
2,041214
New contributor
answered May 21 at 13:57
Max MalmerMax Malmer
11
11
New contributor
New contributor
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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