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.

Comments

joshmiller’s picture

Status:Active» Needs work

Haven't tested, but maybe you could make one change...

+++ b/public/profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_block/commerce_kickstart_block.moduleundefined
@@ -51,7 +81,11 @@ function commerce_kickstart_block_block_view($delta = '') {
+        $amount = '9999';

I would recommend changing this to 2500 to keep the original design.

medden’s picture

In 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.

medden’s picture

StatusFileSize
new2.68 KB

Here 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.

makokis’s picture

I aplied this two patchs but,
how can I hide decimals to get 300€ and not 300,00€ ?

thanks

jsacksick’s picture

@makokis :

how can I hide decimals to get 300€ and not 300,00€ ?

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.

makokis’s picture

thanks 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

bigmonmulgrew’s picture

Great work. Thanks a lot for this.

lsolesen’s picture

Issue summary:View changes
Status:Needs work» Needs review

Seems that we need to review the latest patch?

lsolesen’s picture

The 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?

mglaman’s picture

Status:Needs review» Needs work
Related issues:+#1821798: Discounts should be able to activate one or more blocks

Rather 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?