New answers tagged

1 vote

Stop customers from increasing line item

I found a coded solution using EVENT_BEFORE_SAVE_LINE_ITEM ... but I think @JamesSmith's answer would be the ideal solution
Jaytrix's user avatar
  • 187
2 votes

Stop customers from increasing line item

I might be misunderstanding your situation, but Commerce has built-in min/max "Allowed Quantity" per product (per variant technically) here: Limiting that to 1 max will prevent more from ...
James Smith's user avatar
  • 4,924
1 vote

How-to display a dropdown field with optgroups?

FYI, small change to get this working in Craft 4 via Craft support/Oli. Change the 3rd line in the above to: {% set optgroupCount = 'optgroup' in 'field.options.optgroup' ? 0 : false %}
Ian Ebden's user avatar
  • 894
3 votes

How to make AJAX request to controller inside module?

The documentation on controllers has everything you need. An action path consists of the module ID, the name of the controller and the name of the action. In your case, the action path will be ...
MoritzLost's user avatar
  • 10.7k
2 votes
Accepted

Craft Commerce Missing Products Tab

The Products link in the navigation only shows up if you have at least one product type defined. Go to Commerce -> System settings -> Product Types to create your first product type.
MoritzLost's user avatar
  • 10.7k

Top 50 recent answers are included