---
title: "Paymenter: cart config option fixes in PHP | VulCode"
description: "Two cart fixes to Paymenter in PHP and Laravel: cart items pick up the product's current config options, and an Edit button with nothing to edit is hidden."
url: "https://vulcode.com/en/opensource/contributions/paymenter"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

Paymenter/Paymenter

# Paymenter

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

[See the repository](https://github.com/Paymenter/Paymenter) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: PHP
- **GitHub stars**: 2,859
- **Merged changes**: 2
- **Project site**: [paymenter.org](https://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](https://github.com/Paymenter/Paymenter/pull/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](https://github.com/Paymenter/Paymenter/pull/1340)

## Merged changes 2

- [#1340 fix(cart): hide Edit when there is nothing to configure Merged 10 October 2026](https://github.com/Paymenter/Paymenter/pull/1340)

- [#1326 Refresh the config options of a cart item whose product changed Merged 17 September 2026](https://github.com/Paymenter/Paymenter/pull/1326)

## 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](https://vulcode.com/en/technologies/php)

## Other projects we write code for

- [**Composer** PHP · 29,590 stars The dependency manager for PHP: it installs and updates a project's libraries from its composer.json.](https://vulcode.com/en/opensource/contributions/composer)

- [**PHPMailer** PHP · 22,347 stars The classic PHP library for sending email, used by WordPress and many other systems.](https://vulcode.com/en/opensource/contributions/phpmailer)

- [**Monolog** PHP · 21,407 stars A PHP logging library that sends records to files, sockets, inboxes, databases and web services. Symfony and Laravel use it, among others.](https://vulcode.com/en/opensource/contributions/monolog)

- [**Carbon** PHP · 16,583 stars A PHP DateTime extension for working with dates, standard in the Laravel ecosystem.](https://vulcode.com/en/opensource/contributions/carbon)

- [**Whoops** PHP · 13,231 stars A PHP library that turns uncaught exceptions into a readable error page with the stack trace, known from Laravel.](https://vulcode.com/en/opensource/contributions/whoops)

- [**ramsey/uuid** PHP · 12,642 stars A PHP library for generating universally unique identifiers (UUIDs).](https://vulcode.com/en/opensource/contributions/ramsey-uuid)

## Describe your project.

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

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
