Jump to content
Sign in to follow this  
sentq

Display Credit Balance In Six Template

Recommended Posts

Just tried the conditional version, worked perfectly fine :)

The only thing missing is the link that it is still active on the "Available Credit" box but it is not a big problem for me. It is ok as it is.

 

Thank you for all your help and extremely fast prompt.

Share this post


Link to post
Share on other sites
Just tried the conditional version, worked perfectly fine :)

The only thing missing is the link that it is still active on the "Available Credit" box but it is not a big problem for me. It is ok as it is.

you could remove the code below and that would remove the link...

'uri' => 'clientarea.php?action=addfunds',

if add funds is enabled, then the client can use the button link in the footer... if it's not enabled, the above link is irrelevant! :)

Share this post


Link to post
Share on other sites
22 hours ago, Rowan said:

Am i able to make it so it appears under the your info ta

change 'order' => '1' to..

'order' => '15',

and remove...

    $balancePanel->moveToBack();
    $balancePanel->setOrder(0);

 

Share this post


Link to post
Share on other sites

Hi,

Is there a way to enable clients to view their fund transactions? Admin can view on the backend from Manage Credits section. Can client view it from their client area? Is there an addon for it?

Thanks

Share this post


Link to post
Share on other sites
On 1/15/2018 at 5:22 PM, Sri said:

Hi,

Is there a way to enable clients to view their fund transactions? Admin can view on the backend from Manage Credits section. Can client view it from their client area? Is there an addon for it?

Thanks

I'm not aware of one, but you can search WHMCS Marketplace and use "credit" as the keyword.

Share this post


Link to post
Share on other sites

Thanks sentq,

I was able to find 2 useful addon. One for admin and one for client.

Thanks

Share this post


Link to post
Share on other sites

Hi there,

I got this alignment error: https://dns.d.pr/DHjRN1 and I was wondering if there is a quick fix for this?

I am using the default SIX theme and just uploaded the module to the website. If I remove it, everything goes back to the right alignment.

Thank you

Share this post


Link to post
Share on other sites
5 hours ago, brian! said:

isn't it the same issue you asked about (and solved) on the previous page?
https://community.whmcs.com/showthread.php?106891-Display-Credit-Balance-In-Six-Template&p=448314#post448314

It is! Totally forgot I had this issue before and it seems that the custom.css file was overwritten since it was empty. This seems to be a common problem in the future.

From time to time, I usually replace ALL files under WHMCS to make sure I am not using outdated files and to have a sense of  a clean system. Isn't  there a way to add this in some sort of a hook that will never change?

Many thanks and sorry to bring it back again. It is a great add-on.

Share this post


Link to post
Share on other sites
4 minutes ago, sitesme said:

It is! Totally forgot I had this issue before and it seems that the custom.css file was overwritten since it was empty. This seems to be a common problem in the future.

custom.css gets overwritten by the auto-updater whether it's empty or not... it's crazy... there is talk of this not occurring in the future, let's wait and see on that one... alternatively, just update manually and learn not to overwrite the file. :idea:

5 minutes ago, sitesme said:

Isn't  there a way to add this in some sort of a hook that will never change?

you could - but that's sort of over-engineering the problem in my eyes... besides which, if you're replacing all files under WHMCS periodically, wouldn't that also erase any hook solution too ??

Share this post


Link to post
Share on other sites
2 minutes ago, brian! said:

if you're replacing all files under WHMCS periodically, wouldn't that also erase any hook solution too ??

I didn't explain well, sorry.

I usually do manual upgrades and I overwrite all existing files. Hooks are usually new files so they are never overwritten. This custom.css seems to be part of the theme itself so it will get overwritten.

Quote

alternatively, just update manually and learn not to overwrite the file. :idea:

Are you serious? There are too many things to remember, even if it is a single file. With the hectic day life, I will never remember to not replace file A or file B. There were a few modules where I had to do this, guess what... I quit and I don't use any. This is not only on WHMCS by the way but for many other scripts. I even tried to separate a folder with customizations to be replaced every time there is an update but I I will totally forget about this in 3-6 months. It is my nature and it sucks... but well... what to do?

I will keep a text note to update this file and I will clone a custom-backup.css file now so at least I have it there all the time.

Thanks for your help as usual :)

Share this post


Link to post
Share on other sites
14 minutes ago, sitesme said:

This custom.css seems to be part of the theme itself so it will get overwritten.

ironically, the auto-updater would give you a warning about that file when updating, e.g back it up before updating.

15 minutes ago, sitesme said:

Are you serious?

actually, I was - but then again, I can recall even the most trivial things easily... like your question already being answered previously... it's a curse! :twisted:

18 minutes ago, sitesme said:

but well... what to do?

get WHMCS not to include custom.css in their update files - if it's empty, it doesn't need to be there. :)

you could write a simple hook to link to an external css file (located outside of WHMCS if necessary), but whether that's really necessarily I don't know... there's only about a half dozen updates a year, so it's not like there's a weekly need for an update.

Share this post


Link to post
Share on other sites

@sitesme if you need it as a hook file here it is

<?php

# Fix Six Template's Content Area
add_hook("ClientAreaHeadOutput", 1, function($vars){
	return '<style type="text/css">.main-content {min-height: 600px;}</style>';
});

create new php file inside /includes/hooks/ directory called "FixSixTemplateContentArea.php" or anything else as you prefer and place the previous code inside it, now you can forget about fixing this issue again

Share this post


Link to post
Share on other sites
11 minutes ago, brian! said:
36 minutes ago, sitesme said:

This custom.css seems to be part of the theme itself so it will get overwritten.

ironically, the auto-updater would give you a warning about that file when updating, e.g back it up before updating.

Hmmm... I do take backups, but my point is that I don't want to restore files manually every time there is an update. The file will get overwritten no matter what, right? I don't see what the backup has to do with it.

 

10 minutes ago, sentq said:

create new php file inside /includes/hooks/ directory called "FixSixTemplateContentArea.php" or anything else as you prefer and place the previous code inside it, now you can forget about fixing this issue again

Ok! Now we are talking :) Thank you @sentq

I was just about to create a new file inside the hooks directory but... I realised that there was already the file "WHMCS_SixTemplateCreditBalance.php" and I just added your code at the end of this file. It seems to work!

I am now wondering why this code wasn't added since the beginning since it seems a common problem reported by some others as well.
In an attempt to help, here is my final file with the last code added: https://gist.github.com/anonymous/e5a36f9db07440e260df1c0493931f83

Thank you all once again.

Share this post


Link to post
Share on other sites
2 hours ago, sitesme said:

I am now wondering why this code wasn't added since the beginning since it seems a common problem reported by some others as well.

I could include it before, but as not every website affected by this I thought pointing to the fix would be enough

Share this post


Link to post
Share on other sites
3 hours ago, sitesme said:

Hmmm... I do take backups, but my point is that I don't want to restore files manually every time there is an update. The file will get overwritten no matter what, right? I don't see what the backup has to do with it.

I was merely pointing out the irony that the automatic updater would warn you about overwriting these css files - manually, you wouldn't get such a specific warning.

3 hours ago, sitesme said:

Ok! Now we are talking :) Thank you

I told you it was a simple hook. :idea:

3 hours ago, sitesme said:

I am now wondering why this code wasn't added since the beginning since it seems a common problem reported by some others as well.

I think it's only a "common" problem if you have a lot, or lengthy, sidebars - ultimately, i'd agree with @sentq on this to leave it out of the core code... in reality, this is really a bug in the cart design that should have been fixed a long time ago by WHMCS.

3 hours ago, sitesme said:

In an attempt to help, here is my final file with the last code added.

thanks for posting your flavour of the hook - it will handy to point to for others who hit the layout problem.

Share this post


Link to post
Share on other sites
8 hours ago, sentq said:

I could include it before, but as not every website affected by this I thought pointing to the fix would be enough

It makes a lot of sense. I thought this was happening to all users using Six theme. Thank you so much for this tweak @sentq. It will certainly not get overwritten now :) 

7 hours ago, brian! said:

I told you it was a simple hook. :idea:

Well... since I am not a programmer, I would need the hook itself but it is all sorted out.

Thank you all

Share this post


Link to post
Share on other sites
5 hours ago, sitesme said:

It will certainly not get overwritten now.

i'd still be tempted to disable the css tweak after a major update, e.g v7.5 and 8 - just to see if the WHMCS default css does something different to now.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By WevrLabs
      AutoCredit for WHMCS is an addon that allows the automatic credit use setting to be optional per specific service/domain renewal invoices.
      By default, the setting in WHMCS is universal, if it is enabled, then all invoices generated upon cron job will have credit applied to them automatically from client's balance. The opposite when disabled, no credit will be applied when invoices are generated via cron.
      With AutoCredit addon, clients are able to selectively enable automatic credit use on renewal invoices of specific services/domains only.
      Version 2 Released:
      We are pleased to announce the release of version 2, which adds support for domains invoices (previous versions supported general product/service invoices only).

      https://dash.wevrlabs.net/cart.php?gid=6
      Addon Features:
      Allow clients to enable automatic credit usage on renewal invoices of specific services/domains only. Notify client when the credit applied to invoice is not enough to pay it. Display auto-credit status in services details page. Admin section to display clients list and the "Separate Invoices" option status for each client. Ability for admin to enable "Separate Invoices" option for new clients by default. Ability for admin to enable "Separate Invoices" option for all clients by one-click. Better track activities, by logging actions to activity log. Translation ready.  
    • By shanejen
      Hi 
       
      Could someone help me with the sidebar removal during  checkout/configuration and domain search ECT. I've managed to remove them with hooks and CSS, but I want the remaining content to fill the page and not be set to the right. There's too many out of date posts regarding this on here, and the WHMCS documentation is too vague. I'm using twenty-one template.
       
      TIA
    • By Dsbush
      So,I have an issue where some of my product groups in my sidebar are doubling up. I want to get rid of the doubles. What would be the best course of action that is not too complicated. 
    • By Tycho
      Hello,
      https://gyazo.com/ae7b45883641d2bbd26482f3233e7af2
      I want everything on the left side bar gone. What's the best way to do that without an empty spot? So I want to have the panels in the middle.
      I've looked at google a lot but couldn't get out anyway.
    • By stevelack
      I am trying to remove the sidebar menu "Actions" from the My Products and Services page.  I have created the following hook:
      ```
      <?php
      use WHMCS\View\Menu\Item as MenuItem;
      add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
      {
         if (!is_null($primarySidebar->getChild('My Services Actions'))) {
                  $primarySidebar->removeChild('My Services Actions');
         }    
      });
      ```
      But it is not removing the sidebar from the page /clientarea.php?action=services
      What am I doing wrong?
      Thanks,
      Steve
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated