Hi
Thanks to all who worked on this module.
I have installed it, and its various dependencies, but cannot seem to select a percentage discount when adding a new discount.
The field automatically defaults to a fixed amount discount, and the only other selectable discount is "free products".
I've fiddled around with some of the options to see if that allowed me to select a percentage discount, but couldn't make it happen.
I assume i've done something wrong in installation as I can't find any record of anyone having the same problem before.
So, i deleted the module and re-installed it, then ran other updates etc, but still the percentage discount field is unselectable.
Although I've been fiddling around with drupal sites for 5 years, I'm still a newb in terms of expertise...so apologies for any stupid mistakes. Normally, i can work my way through using this forum & google. But i've now wasted a day and can't get anywhere with it.
So...can someone put me out of my misery...please?
Module version: 7.x-1.0-alpha7
Inline conditions 7.x-1.0-alpha5
entityreference-7.x-1.1
inline_entity_form-7.x-1.6
rules-7.x-2.9
Thanks
Fred
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Add_order_discount_commerce_discount___Drupal_standard.png | 77.28 KB | joelpittet |
| #10 | compatibility_with-2608154-10.patch | 2.92 KB | joelpittet |
| #9 | compatibility_with-2608154-9.patch | 2.46 KB | joelpittet |
| #6 | commerce-discount-screen-working.jpg | 541.68 KB | BLOK-Man |
| #4 | commerce-discount-screen.jpg | 351.89 KB | BLOK-Man |
Comments
Comment #2
joelpittetI just did what you were trying to do(I think). I need a bit more information on your exact actions and what messages you may be getting?
Does your page look like this?

Also if you try to delete and re-install the module, make sure you disabled and uninstall it first. Don't delete the folder because the uninstall clean-up scripts won't run.
Comment #3
alexgreyhead commentedI think this is because the options to select a fixes discount, percentage, or free products, is floated left on the form, and the "Compatibility with other discounts" div needs a clear: both applied to position it underneath the element.
You could simply add the following to the ./commerce_discount/scss/commerce_discount.scss file:
Comment #4
BLOK-Man commentedHi Joel
Thanks for the response.
I have attached a screenshot.
Mine is similar..but as you can see...it is different at the bottom of the screen in the "Choose offer type" area.
I can't select any of the radio buttons except "£ off" or "Free products".
If I select "product discount" under the Choose discount type" option, then the only two options available are "£ off" and "% off"..and again th epercent option can' be selected.
I did disable the module..but not sure I uninstalled it first. I will try that now, thanks.
Maybe I'll try a different version of the module? What one are you using?
Comment #5
BLOK-Man commentedHi Alex
That's exactly how mine looks!
Ok, will add the CSS and report back.
Thanks
Comment #6
BLOK-Man commentedHi Alex
That's definitely the issue!
I was able to add the "clear both" in "inspect element" in my chrome browser and it worked perfectly. See photo attached.
However, when I make the edits to the commerce_discount/scss/commerce_discount.scss file and upload/overwrite..it doesn't seem to work.
This is what I'm adding:
.edit-commerce-discount-fields-commerce-compatibility-strategy {
clear: both;
}
As I said I'm a blunderer with all this..so might have made a simple mistake...but have tried it a number of times...and flushed caches etc
[I also tried it with the hash in front as you had typed it above...and with both...]
Thanks again for your help. Solution feels close. Wonder if my theme is overriding it somehow...
Comment #7
BLOK-Man commentedps...as a workaround....i'm just using the inspect element feature in chrome to make the functionality temporarily available..but a long term fix would obvs be preferable.
thnx
Comment #8
alexgreyhead commentedHi Blok-Man, the SCSS file won't work automagically - you would need to do a thing called CSS transpiling. But, as a work-around, just add the definition onto the end of the commerce_discount/css/commerce_discount.css file and it should work.
Good luck! :)
Comment #9
joelpittet@alexharries whoa never heard of that term:
. I just call it compiling...
Does this patch help resolve the problem?
Comment #10
joelpittetThat doesn't quite do it, and don't need the :before on clearfix.
Comment #11
joelpittetThanks all that seems to fix the problem.
Comment #13
BLOK-Man commentedThanks guys, that's great.
Really appreciate your help.
"CSS transpiling" ...whatever next?
Comment #14
joelpittetComment #16
drupbasic commentedSame here, can only choose between fixed amount and free product in Bootstrap theme. Only way to have the other options (percentage, free shipping) selectable is to add: clear:both to css with Chrome element inspector. Will this be fixed with the next release?
Comment #17
drupbasic commentedComment #18
chrisrockwell commented@drupbasic I posted a duplicate issue here: https://www.drupal.org/node/2625090. It is resolved in 7.x-1.x-dev.
Comment #19
joelpittet@drupbasic try the dev version if you have a dev environment.
Please don't reopen closed issues.