duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

Creating an order removes user groups and super admin #1122

Closed sbrow closed 1 month ago

sbrow commented 2 months ago

Description

This issue is similar to #1063, only worse :(

When I, as an admin user, make an order, I lose my super admin attribute, and also all of my groups.

image

Steps to reproduce

  1. Install plugin
  2. Configure plugin to use users as customers
  3. Create a group and add your user to it.
  4. Make sure your user is a super admin
  5. Make an order.

Environment

Environment Application Name: <REDACTED> Laravel Version: 11.7.0 PHP Version: 8.2.13 Composer Version: 2.6.5 Environment: local Debug Mode: ENABLED URL: <REDACTED>.test Maintenance Mode: OFF

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED

Drivers Broadcasting: null Cache: file Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file

Simple Commerce Currencies: USD Gateways: Stripe Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\UserCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EntryOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Flat Rate Shipping, Free Shipping Tax Engine: DuncanMcClean\SimpleCommerce\Tax\Standard\TaxEngine

Sentry Enabled: MISSING DSN Environment: local Laravel SDK Version: 4.5.1 PHP SDK Version: 4.7.0 Release: NOT SET Sample Rate Errors: 100% Sample Rate Performance Monitoring: 100% Sample Rate Profiling: NOT SET Send Default PII: DISABLED

Statamic Addons: 8 Sites: 1 Stache Watcher: Enabled Static Caching: Disabled Version: 5.19.0 PRO

Statamic Addons arthurperton/wordpress-users: 1.2.0 duncanmcclean/guest-entries: 4.0.1 duncanmcclean/simple-commerce: 7.4.1 <REDACTED>/sc-affiliates: dev-8121e749b3eef1457b7bede10f2ddec0254748b4 <REDACTED>/sc-checkout: dev-8121e749b3eef1457b7bede10f2ddec0254748b4 <REDACTED>/sc-subscriptions: dev-8121e749b3eef1457b7bede10f2ddec0254748b4 sbrow/banner: dev-8121e749b3eef1457b7bede10f2ddec0254748b4 statamic/seo-pro: 6.0.3

duncanmcclean commented 1 month ago

Make an order

Which tags are you using to update customer information?

sbrow commented 1 month ago

I pretty much copy/pasted the code out of the example app, and made only the necessary visual changes.

I believe the tag you're looking for is the sc:cart:checkout, as that seems to be the only "data" tag on my _information page.

github-actions[bot] commented 1 month ago

Released as part of v7.4.2.

sbrow commented 1 month ago

That worked. Thank you :pray: