Activities of "cstobler"

Thank you for following up; this is what I was looking for. I didn't realize some of that data was already exposed to me that way, so I appreciate your patience.

I think I know everything I need to complete this feature.

I still need help with this. I decided to try to implement what was listed by the AI along with your comments. I created a page that allows the user to change their subscription. Here is the on post method:

public async Task<IActionResult> OnPostChangeEditionAsync(Guid editionId)
{
    try
    {
        var result = await _multiTenancyAppService.ChangeEditionAsync(editionId);

        if (result.RequiresPayment && result.PaymentRequestId != Guid.Empty)
        {
            return LocalRedirectPreserveMethod($"/Payment/GatewaySelection?paymentRequestId={result.PaymentRequestId}");
        }

        Alerts.Success(result.Message ?? "Plan changed successfully!");
        return RedirectToPage();
    }
    catch (UserFriendlyException ex)
    {
        Alerts.Danger(ex.Message);
        return RedirectToPage();
    }
}

This line:

var result = await _multiTenancyAppService.ChangeEditionAsync(editionId);

in turn (eventually, after some checks) calls this:

paymentRequestDto = await _subscriptionAppService.CreateSubscriptionAsync(newEditionId, tenantId);

This collects payment and successfully changes the edition of the tenant, but the problem is that the payment isn't prorated, which is what I feared. I went into my sandbox Stripe account, and it showed a transaction for the full amount of the original edition, and then when I switched the edition, it showed the full amount for the new edition. I was hoping this would the amount for the new edition less the original edition (since in this case the new edition was more expensive).

I feel like this type of functionality has to exist in ABP somewhere, but so far, I am striking out.

Please reply soon; I need help with this and I'm disappointed I still haven't received a reply after two months.

That worked! Thanks for your help!

When I call that function, nothing happens, and I get these errors in the browser console:

If I click the appearance modes in the toolbar settings, it still functions correctly, and there are no errors. I'm not sure why it is looking for 'undefined' css files. Do you know what might be causing this?

Thank you for providing some instructions on the source code. I was able to download it and have overridden _Sidebar.cshtml successfully.

Regarding the appearance switching, it is this section here: What I want to do is create a rocker/toggle like this: Building a Dark Mode Theme Toggle that toggles between light and dark mode. But to do that, it seems like I would need to call some function that changes the mode, but I cannot find it. Is there a way to programmatically access the appearance switcher?

  1. I checked the nuget package for LeptonX and that path doesn't exist. Layouts and down isn't there, and there are no .cshtml files in any of the directories as far as I can tell.
  2. I tried implementing this javascript and it didn't do anything. I suspect this is incorrect unless someone confirms that is the correct way to do it. Weirdly, I was also comparing my app to the LeptonX demo site and found that the demo site has a theme class and data-bs-theme attribute on the body which changes when the mode does, while my app doesn't (at least after making all of these changes). I definitely think something is very wrong with my configuration but I cannot find any documentation about this.

I want to change the design a bit on LeptonX since the way it is setup now doesn't suit my use-case. What I am trying to do is to add a light/dark mode toggle and a logout button the footer area of the sidebar and then completely remove the toolbar. I have been able to remove the toolbar successfully, but the other tasks have proven more difficult.

  1. The first issue is that I don't know how to properly override _Sidebar.cshtml. This documentation (https://abp.io/docs/latest/ui-themes/lepton-x/mvc) says I can override with a file with the same name and under the same folder, but without any source code, I don't know how to do this. I feel like I need something to work off of to be able to modify it, since I don't know the logic behind it, the names of the components, etc. Worst case scenario, I could decompile the dll's to look at the source code, but I feel like that is likely not the intended workflow here.
  2. The second issue is that I don't know how to tie in to the appearance mode switcher. I feel like the closest I got was with this support ticket (https://abp.io/support/questions/7452/How-to-configure-LeptonX-theme-appearance-without-having-to-make-you-own-version-of-it-just-for-simple-changes), but the javascript provided was to set a default that never changes. I tried to set leptonx.globalConfig.defaultSettings.appearance but it threw an error saying it only has a getter, not a setter. I can't find any documentation on this so I need help figuring out how to tie in to this programmatically so I can create my own buttons.

Any help with this? I can start throwing things at the wall and see what sticks, but it would be really helpful to get some guidance on this, especially since I used a support ticket to ask this question. I'm still not sure if I will need to overwrite the SubscriptionCreatedHandler.cs file and it seems like I will need to get a copy from someone to be able to do that.

Please help. Thanks.

Charlie

Hi, hoping to have those questions above answered. I feel like I need a bit more context regarding how ABP handles changing editions, since it will require prorated payment with Stripe. To reiterate, can I simply create a new subscription for the tenant (and have it overwrite the existing subscription), or do I need to somehow trigger a subscription change (with payment proration) with Stripe before changing the edition entity for the tenant?

Any help on this would be greatly appreciated.

Charlie

Thanks for looking into this.

A few questions:

  1. I don't think I have access to Saas module source code. I can't find SubscriptionCreatedHandler.cs. Is this something I can ask for in an email like I have asked for other files?
  2. I'm still not sure how this works with Stripe to prorate payment, and what I need to do to work with it (maybe it would be more clear if I had access to SubscriptionCreatedHandler.cs). Is it as simply as just creating a new subscription? Does it know to update the existing one or does it just create another one? Obviously, worst case scenario, if there is no logic in place that addresses this, I could customize SubscriptionCreatedHandler.cs like you said and change the logic, but I'm trying to figure out if this has been accounted for already.
Showing 1 to 10 of 70 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 05, 2026, 13:24
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.