Smile-SA/magento2-module-gift-sales-rule

Issue with Magento Enterprise and the staging module

PierreLeMaguer opened this issue · 0 comments

Hi,

In Magento EE 2.3.X (and probably in 2.4.X), in the following case :
A salesrule with a rule_id different (for example 4) of the row_id (for example 1)
In the table smile_gift_salesrule, no row with a rule_id 4

In the table smile_gift_salesrule, the rule_id is linked to the row_id of salesrule. But in the code, we always give to the repository the rule_id of salesrule.
In most of case, it will work, because it exists often a row in salesrule which has the same rule_id and row_id.
But in rare case, it does not exist and cause a fatal error.
The solution is in CE, give the rule_id to the gift salesrule repository, in EE, give the row_id.