Created
July 12, 2013 06:39
-
-
Save tasz/5982399 to your computer and use it in GitHub Desktop.
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
<?php | |
global $post, $product; | |
$pricing_rule_sets = get_post_meta($post->ID, '_pricing_rules', true); | |
$pricing_rule_sets = array_shift($pricing_rule_sets); | |
if ($pricing_rule_sets && is_array($pricing_rule_sets) && sizeof($pricing_rule_sets) > 0){ | |
?> | |
<div> | |
<div> | |
Qty | |
</div> | |
<div> | |
Amount | |
</div> | |
</div> | |
<?php | |
foreach ( $pricing_rule_sets['rules'] as $key => $value ) { | |
echo "<div class=\"float_l\">"; | |
echo "<div class=\"qt1\">".$pricing_rule_sets['rules'][$key]['from']."-".$pricing_rule_sets['rules'][$key]['to']."</div>"; | |
echo "<div class=\"amt1\">$".$pricing_rule_sets['rules'][$key]['amount']."</div>"; | |
echo "</div>"; | |
} | |
} ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Tasz, this works great when you have only one variation.
Do you have an idea what to do when you have more than one variation on a product.
Then it should show the bulk prices for the different variants, but I did not succeed in doing that.
Thanks en regards,
Floris