Menu

Post image 1
Post image 2
1 / 2
0

Evolution of CartRule.php: PrestaShop 9.0.x 9.1.x

DEV Community: php·Nicolas Dabene·3 days ago
#HqliZsky
#dev#class#discount#cart#prestashop#article
Reading 0:00
15s threshold

Context The 9.1.x branch of PrestaShop introduces a new Discount system , protected behind a feature flag. This structural change is directly reflected in classes/CartRule.php , which serves as the foundation for the new system while maintaining backward compatibility with the legacy cart rules system. Sources : DevDocs 9.1.x , Official Blog , Core Monthly January 2026 , GitHub develop branch. 1. New imports and dependencies 9.0.x The CartRuleCore class in 9.0.x uses classic PrestaShop imports without dependency on the new discount system. 9.1.x (develop) New use statements appear at the top of the file: <span class= "kn" > use </span> <span class= "nc" > PrestaShop\PrestaShop\Adapter\ContainerFinder </span><span class= "p" > ; </span> <span class= "kn" > use </span> <span class= "nc" > PrestaShop\PrestaShop\Adapter\Discount\Application\DiscountApplicationService </span><span class= "p" > ; </span> <span class= "kn" > use…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More