Created
November 22, 2021 08:43
-
-
Save AshlinRejo/d16e622b6c87df8e7b675cbd6fa4f56a to your computer and use it in GitHub Desktop.
Discount rule v2: Get matched rule range/table info based on product in product page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(class_exists('\Wdr\App\Router')) { | |
global $product; | |
$discountManager = \Wdr\App\Router::$manage_discount; | |
$discountCalculator = $discountManager::$calculator; | |
$is_variant = false; | |
$bulk_discounts_ranges = $discountCalculator->getDefaultLayoutMessagesByRules($product, $is_variant); | |
//$bulk_discounts_ranges Here you get rule range info | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment