I want to create integration with Commerce decimal quantities.

To do this we need to provide additional javascript settings:

  • minimum value
  • step

And add this settings to administration UI.
On next week I will provide patch for this issue!

CommentFileSizeAuthor
#2 commerce_extra_decimal-6511176-2.patch7.48 KB5n00py
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

5n00py’s picture

As I see setting for step already implemented in dev.
But if I set step value to 0.5 i get following error:
Warning: Division by zero in commerce_extra_quantity_validate_cardinality() (line 97 in sites/all/modules/contrib/commerce_extra/modules/quantity/commerce_extra_quantity.module).

5n00py’s picture

Status: Needs work » Needs review
FileSize
7.48 KB

As I say before I have patch that solving problems with commerce_decimal_quantities.
This patch do this things:

  • new setting called "minimum_value"
  • Append settings form(see above)(validation & submit also handled)
  • Update form alter for push setting to theme functions
  • Fix validation problem if minimum value rounding to zero(#1 - #1792648-1: Integrate with Commerce decimal quantities)
  • Update hook_theme(add variable to theme function)
  • Update theme function itself(this is place where we actually can send new argument to js)
  • Modify JS to deal with new "minimum_value" variable"
5n00py’s picture

DamienMcKenna’s picture

Assigned: 5n00py » Unassigned
Issue summary: View changes
Status: Active » Needs review

FYI the purpose if the "assigned" field is to indicate that you're actively working on the issue, if you've uploaded a patch and don't intend to do further work then you should un-assign the issue. Also, if there's a patch then you should also leave the issue as "needs review".

5n00py’s picture