Jump to content

[bug] 4.6.10 - Commerce List View w/ Required fields


Go to solution Solved by Marc Stridgen,

Recommended Posts

4.6.10
all customizations disabled
default theme

I'm not sure how long this has existed, however I've encountered it while working on an application that adds custom validation to the package form.

Steps to reproduce:

  1. Create a custom text field, set it to Required, and assign it to a package
    image.thumb.png.65261ba575fc74c79d7bb0bdc07239b0.png=
     
  2. On the front end, view packages in List View.   This adds a "Choose Options" button
    image.png.d495e552a5e23ace307c84a8bd826b54.png
  3. Click Choose Options, do not fill out any fields, and try to add to cart
    image.png.fbd69d321003c7f7682c586e2c9c278a.png
     
  4. A new element will be added below the form each time "Add to cart" is clicked, instead of showing that the required field was not filled out
    image.png.a01dffa7da229c37d8eb0d540b241791.png
  5. If the field is filled out and add to cart is clicked, all the extra elements disappear and you can proceed to checkout:image.png.0004ec2b769117bb3ef137e9b37fee83.png
  6. Without reloading the page - If you click Continue Shopping, and try to Add to Cart without entering anything in the field, you get this:
    image.png.45bfc5828cd66f5802324fbb76e90faa.png

 

If we add some instrumentation to listen in on \IPS\Helpers\Form::values() , we see that the "form_required" error is being added to the element, but is just not displaying correctly via the template:

image.png.bba41ec57b8c412cc428cc12fe32de09.png

Validation works great when accessing the package directly (via Grid view), or when updating the purchase form in the client area.  It is only when the form is generated by the 'Choose Options' button that it behaves this way.

Frankly I don't use List view - I've considered just disabling it as an option - but I imagine some customers might prefer it, so please let me know if I can do or add anything to help get this resolved.

Link to comment
Share on other sites

  • 4 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...