Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure if this is useful to anyone, but I made a small patch that allows you to change the discount amount when you edit this block.
Forgive me if the patch dir isn't correct, my git base is probably different from yours.
If you can tell me where I should roll the patch from I will do it again.
Comment | File | Size | Author |
---|---|---|---|
#3 | commerce_kickstart_block_module.patch | 2.68 KB | medden |
commerce_kickstart_block.patch | 2.57 KB | medden |
Comments
Comment #1
joshmillerHaven't tested, but maybe you could make one change...
I would recommend changing this to 2500 to keep the original design.
Comment #2
medden CreditAttribution: medden commentedIn the Kickstart I downloaded, the discount amount was listed as $0.99
But in the Shipping Condition Rules, there was an option for free delivery on orders over $99.99
I changed them both to $25.00 coincidently, as that was the required amount for my store.
I agree the patch should keep the amount the same as before, but perhaps we can open another issue to match the discount block amount, with the discount rule.
Comment #3
medden CreditAttribution: medden commentedHere is an updated patch, made from a clean install of commerce kickstart.
It does change the shipping discount to $99.99, which now matches the free shipping rule that gets enabled in kickstart.
Having one set at 0.99 and the other at 99.99 seems confusing right.
Comment #4
makokis CreditAttribution: makokis commentedI aplied this two patchs but,
how can I hide decimals to get 300€ and not 300,00€ ?
thanks
Comment #5
jsacksick CreditAttribution: jsacksick commented@makokis :
You currently can because it uses the commerce_currency_format() function, that is a sample block, if you need something really different you should define your own, otherwise the module could expose a setting to say "I want this amount to be passed to the commerce_currency_format function.
Comment #6
makokis CreditAttribution: makokis commentedthanks for your help but... I don't understand how and where can I change that. Maybe if you can post an screenshot.
thanks in advance
Comment #7
bigmonmulgrew CreditAttribution: bigmonmulgrew commentedGreat work. Thanks a lot for this.
Comment #8
lsolesen CreditAttribution: lsolesen commentedSeems that we need to review the latest patch?
Comment #9
lsolesen CreditAttribution: lsolesen commentedThe shipping block on the frontpage should match the rule, so I created this pull request https://github.com/commerceguys/commerce_kickstart/pull/38
I agree that it could easily be configurable. However, it should probably work together with the rule then, because otherwise people might get thrown off when changing the block does not change the rule?
Comment #10
mglamanRather than come up with a variable for the block, it seems the proper fix would be #1821798: Discounts should be able to activate one or more blocks. Also, isn't this block and the shipping discount part of the demo store?
Comment #11
rszrama CreditAttribution: rszrama at Centarro commentedCommerce Kickstart 2.x is in minimal maintenance mode. Closing out all outdated tickets now to maintain focus on Commerce Kickstart 3.x.