Discount for Cart Items

Hi Peter

I want to set discount in my web site but failed:

Traceback (most recent call last):
File "/opt/bda/eggs/bda.plone.ajax-2.0-py3.7.egg/bda/plone/ajax/init.py", line 243, in render_ajax_form
result = context.restrictedTraverse(name)()
File "/opt/bda/devsrc/bda.plone.discount/src/bda/plone/discount/browser/forms.py", line 225, in call
return self.render_form()
File "/opt/bda/eggs/yafowil.plone-4.0.0a3-py3.7.egg/yafowil/plone/form.py", line 51, in render_form
controller = Controller(self.form, self.request)
File "/opt/bda/eggs/yafowil-2.3.2-py3.7.egg/yafowil/controller.py", line 32, in init
action.attrs['handler'](self.widget, self.data)
File "/opt/bda/devsrc/bda.plone.discount/src/bda/plone/discount/browser/forms.py", line 208, in save
group=group,
File "/opt/bda/devsrc/bda.plone.discount/src/bda/plone/discount/settings.py", line 189, in add_rule
group=group,
File "/opt/bda/devsrc/bda.plone.discount/src/bda/plone/discount/settings.py", line 87, in create_rule
assert isinstance(value, float)
AssertionError

What's the problem and how to fix it?
Thanks for your help.

Alex

Looks like some value should be a float

Hi T.Kim
But I don't know how to input the data:


Could you please let me know how to input each blank?
Thanks
Alex

@kyholdings pushed a fix to bda.plone.discount, can you give it a try?
date/time should follow the conventions of the configure language/locale... for german it's dd.mm.yyyy - widget will be fixed another time :wink:

Hi Peter

I imput like:

Peter Holzer via Plone Community <community@plone.org> 于2021年10月27日周三 下午11:50写道: