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

Comments

BLOK-Man created an issue. See original summary.

joelpittet’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new109.12 KB

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

alexgreyhead’s picture

Title: Can't select percentage discount when adding a new discount » "Compatibility with other discounts" elements obstruct the "Percentage discount" radio select in Seven administration theme
Version: 7.x-1.0-alpha7 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new157.96 KB
new134 KB
new50.53 KB
new114.07 KB

I 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:

#edit-commerce-discount-fields-commerce-compatibility-strategy {
  clear: both; 
}

Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4

BLOK-Man’s picture

StatusFileSize
new351.89 KB

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

BLOK-Man’s picture

Hi Alex

That's exactly how mine looks!

Ok, will add the CSS and report back.

Thanks

BLOK-Man’s picture

StatusFileSize
new541.68 KB

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

BLOK-Man’s picture

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

alexgreyhead’s picture

Hi 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! :)

joelpittet’s picture

StatusFileSize
new2.46 KB

@alexharries whoa never heard of that term:

CSS transpiling

. I just call it compiling...

Does this patch help resolve the problem?

joelpittet’s picture

StatusFileSize
new2.92 KB

That doesn't quite do it, and don't need the :before on clearfix.

joelpittet’s picture

Status: Needs review » Fixed
StatusFileSize
new77.28 KB

Thanks all that seems to fix the problem.

  • joelpittet committed a13fdcf on 7.x-1.x authored by BLOK-Man
    Issue #2608154 by joelpittet, BLOK-Man, alexharries: "Compatibility with...
BLOK-Man’s picture

Status: Fixed » Needs review

Thanks guys, that's great.
Really appreciate your help.

"CSS transpiling" ...whatever next?

joelpittet’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

drupbasic’s picture

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

drupbasic’s picture

Status: Closed (fixed) » Active
chrisrockwell’s picture

@drupbasic I posted a duplicate issue here: https://www.drupal.org/node/2625090. It is resolved in 7.x-1.x-dev.

joelpittet’s picture

Status: Active » Closed (fixed)

@drupbasic try the dev version if you have a dev environment.

Please don't reopen closed issues.