Jump to content

brian!

GearHead
  • Content count

    10,541
  • Joined

  • Last visited

  • Days Won

    291

Everything posted by brian!

  1. it doesn't store the card number locally - only the type, last 4 digit etc. <div class="form-group"> <div class="col-sm-8 col-sm-offset-4"> <div class="radio"> <label> <input type="radio" name="ccinfo" value="new" onclick="showNewCardInputFields()"{if $ccinfo eq "new" || !$cardOnFile} checked{/if} /> {$LANG.creditcardenternewcard}</label> </label> </div> <div class="radio"> <label> <input type="radio" name="ccinfo" value="useexisting" onclick="hideNewCardInputFields()" {if $cardOnFile && $ccinfo neq "new"}checked{elseif !$cardOnFile}disabled{/if} /> {$LANG.creditcarduseexisting}{if $cardOnFile} ({$existingCardType}-{$existingCardLastFour}){/if} </label> </div> </div> </div> becomes... <div class="form-group"> <div class="col-sm-8 col-sm-offset-4"> <div class="radio"> <label> <input type="radio" name="ccinfo" value="new" onclick="showNewCardInputFields()" checked /> {$LANG.creditcardenternewcard} </label> </div> </div> </div> i'm assuming there is an error on that creditcard.tpl template as there are an odd number of label tags - not your fault, it's WHMCS. the best you could do with a cc hook would be to disable the second radio option, but I gather that you don't want to show it at all... so easier to edit the template... possibly you could hide that second radio button with css, but try editing the template and see if that fixes it.
  2. generally, I would say that the cart process works as it always has and you can't start changing the steps (e.g move this here, move that there) - it's never been flexible enough to accommodate that. you could add links to products on the checkout page, that's just a <a href> that links them back to the ordering of that product.... daresay, you could do that with a hook or in the template... product addons at that stage would be difficult as there could be multiple products in the cart and no simple way of allocating an addon to which product. MC product addons are shown at the view cart stage and can be added to the cart - though not removed from there directly.
  3. if all you want to do is hide the 4-digits, you could just remove the part below from the template... that way, they'll see they have a card stored, but not that detail. -{$existingCardLastFour} even if you didn't want to edit the template, you could probably null the variable with a ClientAreaPageCreditCard hook... similarly, if you wanted to give the impression that the card wasn't being stored, you could null the $cardOnFile variable and it should default to forcing the client to enter a new cc each time.
  4. brian!

    Register on an external page

    I think you would need to add the code below to your form for it to try to submit the registration... <input type="hidden" name="register" value="true"/> but i'd go along with Steven in that you're biggest problems are likely to be the required fields... firstname & lastname you can make optional fields in the setup -> general settings -> other tab.... but you may need to enter the password twice (e.g two separate fields) and then it's just a case of working through any other required fields on your WHMCS registration page and perhaps passing those values as hidden fields in your form.
  5. Hi Richard yes. wrong. you can order addons multiple times - even if you already have them actively assigned to a service... then once you've added the new page etc, you can change the addon's status to "Completed" and it would be shown as "Completed" on their product addon page... you don't need to do this, but would probably look better from a housekeeping point of view (if the client views their existing addons to this service). so at any stage, regardless if you've marked them completed or whatever, they can order additional pages by ordering the addon again and again if they wish to. 🙂
  6. but it looks like she's trying to install on Windows - and WHMCS don't support doing that. https://docs.whmcs.com/System_Requirements
  7. nothing springs to mind - though it would effectively only need a ShoppingCartValidateCheckout hook to check whether the current user already has product X when ordering product Y and if not, show an error message.... granted, if there are multiple x & y then it could get more complicated. 🙂 is there any reason why this "add a new page" can't be a product addon ? it sounds the most logical way to do it... the feature already exists in WHMCS and is designed to accommodate the validation that you're trying to do.... it seems a little like reinventing the wheel, doing this with products, if it's more suitable to have them as addons.
  8. brian!

    Invalid Domain Name Provided

    in setup -> general settings -> ordering.... do you have Block Existing Domains ticked ? https://docs.whmcs.com/Ordering_Tab#Block_Existing_Domains if you untick that box, then the above error will not be shown and the client will be able to add hosting/service to an existing domain.
  9. if it's going to be along the top (in the language/login etc part), then that's a edit in the header.tpl template and you can add your code as above there; if it's in the footer, then that's either an edit to footer.tpl (code as above), or you could use a footer output hook to do the same. one other thought - are you using a hook that forces everyone to login to view any page, e.g cart/kb/announcements etc ?? if so, it's affecting contact.php too, so you'll have to alter that after you add a link to the contact page.
  10. brian!

    Redemption fee in Domain Price Metrix

    there are two answers to this... firstly, there is a little known separate domain pricing page that was introduced in an earlier v7 release... it only received a passing mention by one of the WHMCS guys during a beta period, and AFAIK, it isn't officially documented... but if you go to /domain/pricing you should be able to find the page on your site - actual URL might be different depending on your Friendly URLs settings though... but that shows grace/redemption periods and fees by default. secondly, the other way would be to modify the domainregister.tpl template to show grace/redemption periods & fees - all the information is already in the array, so it's just a case of editing the template to show whatever you want to show. on a practical level, you may not be able to show grace periods as, unlike the separate pricing page, the cart will show sidebars by default and that limits the amount of space available for additional columns in the table... if it helps, i've attached a modified version of the v7.7.1 standard_cart domainregister.tpl template that shows the above output as a starting point for any changes you want to make. one other thing, again rarely mentioned in the documentation, but you can add the pricing table to the transfer page, if you want to show the user how much transfers will be per TLD.... you just need to copy the table code from domainregister.tpl to domaintransfer.tpl - probably little point in showing the featured TLDs or the categories (they wouldn't work by default as the JS is missing from the template) - but i've added the table & JS to the template and attached if others want to use it. domainregister.tpl domaintransfer.tpl
  11. then I think you've answered your own question! 🙂
  12. no - even from the admin area, you can only select cycles that have been priced. you could use a billable item for this if you prefer that over making a custom product.
  13. if the client already has the product, then just change the billing cycle, price and next due date from the admin area profile... next time invoice is generated, it will use those values. if the client doesn't have the product, then perhaps duplicate the annual product, change the duplicate to monthly only, hide it (and/or enable stock control and set it to zero after order)... order as usual.
  14. out of the box, WHMCS shouldn't do that. any chance your 'Lagom' template is outdated, or not the applicable release for your WHMCS installed version ? does the same thing occur if you use Six ?? that would give you a clue if it's a template causing this, or something in the background.
  15. while you're waiting for support, maybe the page below will help.... https://smyl.es/whmcs-upgrade-failure-unable-to-complete-incremental-updates/
  16. brian!

    How to block free domain name extensions like .tk?

    that implies the hook isn't working, because if it was, the field would be emptied. almost certainly, resellerclub and Namespinning (which is eNom) won't sell these free TLDs, so WHMCS will revert to using the whois server entries for these TLD checks... there is an entry for .tk, but not for the others... I did consider suggesting removing .tk from the whois list, but it's not a foolproof solution. the fact it gives that error is a long-standing bug... WHMCS has for years often shown the wrong error messages in the cart... e.g the error message bears no relation to the actual error. 🙄
  17. after that first try, you should have enabled errors and that would have given you more details as to the specific error - it might have been something very minor and easy to fix! 🙂 https://docs.whmcs.com/Enabling_Error_Reporting did you restore the old database too ?
  18. brian!

    Accounting Software

    are you syncing WHMCS with Xero using one of the addons available in Marketplace ?
  19. brian!

    Adding element(s) to price-area

    HI Trent, i'm not sure it was a good idea to add a new column to an existing table - not least because $products is a complex array and it's not just generated from a simple query of the tblproducts table by WHMCS internally. I think the better way might have been to use a new table (perhaps with pid & pricedetails as columns) and used a hook to add it to the products array.... however, we are where we are... first thought would be to double check that the new variable doesn't exist in the array (logically it shouldn't, and your lack of output seems to confirm that - but confirmation is always good to have!) 🙂 you can do that by adding {debug} to the end of the products.tpl template, refreshing the page in the browser and you should get a popup window of all (actually it's only some) the available Smarty arrays & variables to the template... I suspect the values won't be there... don't forget to remove {debug} from the template when you've finished. if it is missing, then you can add it simply by using a hook - if you had used a separate table, it would have made the database query slightly more complicated than it is, but not by much. <?php # Add Price Details To Products Array Hook # @author brian! use WHMCS\Database\Capsule; function add_price_details_to_products_array_hook($vars) { if ($vars['templatefile'] == "products") { $products = $vars['products']; foreach ($products as $key => $product) { $pricedetails = Capsule::table('tblproducts')->where('id',$product['pid'])->value('priceDetails'); $products[$key]['priceDetails'] = $pricedetails; } return array("products" => $products); } } add_hook("ClientAreaPageCart", 1, "add_price_details_to_products_array_hook"); if it works (it will work with another field, but I haven't got a pricedetails field in my tblproducts table!), then you should a) see the {product.priceDetails} output on the page and b) it should also be present in the $products array when looking at the popup window. 🙂
  20. brian!

    What just happen to WHMCS

    you can - it's just up to them whether they decide to take your advice or not. at this point, I literally have no idea if anyone of any importance in the company is even listening to us... i'm long past caring.
  21. that should work, I don't remember a lot of complaints here about it not working... see below. you'll be delighted to hear that the official solution to this is to setup an email filter and to check them out occasionally for errors. as to the rest, e.g php errors, sounds like it might require a reupload of the update... there were a few file location changes that may be affecting you (depending on what you upgraded from).
  22. brian!

    Facebook Pixel

  23. a screenshot of your site, showing where this link should be, would be helpful - depending on where you want to do it, it might need a hook or a template edit... if you could, it would defeat the need to buy unbranded licenses! 😲
  24. brian!

    Login problem for client

    don't forget, once you have a valid license, you can contact WHMCS support for help. 🙂 if you get your license directly from WHMCS - https://www.whmcs.com/support/ if you get your license from a reseller / host - https://www.whmcs.com/reseller-support/
×

Important Information

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