All contributions

Paymenter/Paymenter

Paymenter

An open source webshop and billing system for hosting companies, built with Laravel.

Language
PHP
GitHub stars
2,859
Merged changes
2
Project site
paymenter.org

What we changed

A cart item whose product changed its config options after it was added now only keeps options that are still offered, so checkout no longer fails validation. The Edit button in the cart is hidden for products with nothing to change.

What this work shows

  • Livewire components in Laravel
  • Keeping a cart in line with the current offer
  • PHPUnit feature tests
What was broken

Changed product options broke checkout

When a product changed its config options after being added to the cart, reopening the item kept old values the product no longer offered. Checkout then failed with the validation error The selected ... is invalid.

How we fixed it

Options checked each time the item opens

Options are now prepared for an item that is already in the cart as well. A stored value is kept while the product still offers it, otherwise the first available one is picked, as for a new item. A feature test replays a change to a location option.

#1326

What was broken

Edit in the cart went straight back to the cart

For a product with one plan, no config options and no checkout config, the Edit button did nothing useful. The edit page saved the item unchanged and redirected straight back to the cart.

How we fixed it

Edit only where there is something to change

The cart template shows Edit only when the product has more than one plan, config options or a checkout config.

#1340

Merged changes 2

  1. #1340 fix(cart): hide Edit when there is nothing to configure Merged 10 October 2026
  2. #1326 Refresh the config options of a cart item whose product changed Merged 17 September 2026

What it taught us

In a hosting cart, a customer's saved choices have to be checked against the current offer each time an item is opened. We can fix that in a Livewire component, together with a feature test that replays the change in the offer.

More about this technology: PHP

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.