Community Forums

Discuss, share and get help from our community of friendly WHMCS users

Close
Login to Your Account
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2017
    Posts
    4

    Smile Force user to go to Domain Configuration page before checkout

    Hi there,
    I am new to WMHCS and trying to modify it so that it force user to domain configuration before checkout. Normally if someone add a domain to cart and view cart it does not direct him to domain configuration. Or I would like to know the code I can use in viewcart.tpl that can check the domain either it has Registrant Name: or not. If not and clicking on checkout it will direct him to domain configuration page.

    can someone help me on this.

    thanks in advance

  2. #2
    Join Date
    Feb 2013
    Location
    UK
    Posts
    7,170

    Default Re: Force user to go to Domain Configuration page before checkout

    I don't think you should need to force it - with v7.2, you can add a domain to the cart, then press checkout and if the domain required configuration, it will take you to the domain configuration page.

    https://www.screencast.com/t/UY4gpJJ1vsi

    I can recall with earlier versions it might take you straight to view cart, but it sounds like you might be adding to cart and then pressing viewcart directly... we'd have to see a link or video of your site to explain exactly what you're seeing.

  3. #3
    Join Date
    Jul 2017
    Posts
    4

    Default Re: Force user to go to Domain Configuration page before checkout

    Hi Brian, Thanks for replying back, yes if i click on checkout from domain search page it takes to domain configuration. But, if i click on view cart after just adding the domain to cart from cart page it does not redirect to domain configuration page.

    I want it a way that if a user view his cart and click on checkout if domain configuration Registrant Name name is blank it will redirect user to domain configuration page. I also tried fetching {$domainfield} data but couldn't find which code will show up the data.

    Thanks again.

    Quote Originally Posted by brian! View Post
    I don't think you should need to force it - with v7.2, you can add a domain to the cart, then press checkout and if the domain required configuration, it will take you to the domain configuration page.

    https://www.screencast.com/t/UY4gpJJ1vsi

    I can recall with earlier versions it might take you straight to view cart, but it sounds like you might be adding to cart and then pressing viewcart directly... we'd have to see a link or video of your site to explain exactly what you're seeing.

  4. #4
    Join Date
    Jul 2017
    Posts
    4

    Default Re: Force user to go to Domain Configuration page before checkout

    Hi Brian thank you for reply back. Actually what i am trying to implement is when the user add domain to cart and view his cart page (viewcart.tpl) and click on checkout from cart page than if Registrant Name from domain configuration is empty for any of the domain user will get redirect to domain configuration page again.

    I also tried to fetch data using {$domainfield} but couldn't get it work on viewcart.tpl page.

    Sorry I couldn't attach a video but I attached screenshot below:
    http://i63.tinypic.com/2ltg3lz.jpg



    thanks again.





    Quote Originally Posted by brian! View Post
    I don't think you should need to force it - with v7.2, you can add a domain to the cart, then press checkout and if the domain required configuration, it will take you to the domain configuration page.

    https://www.screencast.com/t/UY4gpJJ1vsi

    I can recall with earlier versions it might take you straight to view cart, but it sounds like you might be adding to cart and then pressing viewcart directly... we'd have to see a link or video of your site to explain exactly what you're seeing.

  5. #5
    Join Date
    Feb 2013
    Location
    UK
    Posts
    7,170

    Default Re: Force user to go to Domain Configuration page before checkout

    Quote Originally Posted by bigbro View Post
    Hi Brian thank you for reply back. Actually what i am trying to implement is when the user add domain to cart and view his cart page (viewcart.tpl) and click on checkout from cart page than if Registrant Name from domain configuration is empty for any of the domain user will get redirect to domain configuration page again.

    I also tried to fetch data using {$domainfield} but couldn't get it work on viewcart.tpl page.
    that wouldn't work as viewcart wouldn't necessarily have the information available to it to know.

    I suspect the problem is being caused by your modifications in the templates - you have to be very careful with the cart process not to jump out in the middle of it... the cart is coded to follow a fixed path of steps and once you start bailing out in the middle, you're creating a lot of work for yourself down the road.

    for example, in domainregister.tpl, you've added a direct link to viewcart that isn't included in the original template code...

    PHP Code:
    <section id="header" class="HeaderAdjust">  <a style="text-align:center; background-color:#6AAF08; margin-left:40%; padding-top:7px; padding-left:10px; padding-right:10px; padding-bottom:7px; color:#fff;" href="http://cheaphoswhmcs.cheaphostinganddomains.com/cart.php?a=view" class="quick-nav"><class="fa fa-shopping-cart"></i> <span class="hidden-xs">Go to Shopping Cart</span></a></section
    the quick fix for that might be to just change the link to use the domains configuration page instead...

    PHP Code:
    <section id="header" class="HeaderAdjust">  <a  style="text-align:center; background-color:#6AAF08; margin-left:40%;  padding-top:7px; padding-left:10px; padding-right:10px;  padding-bottom:7px; color:#fff;"  href="http://cheaphoswhmcs.cheaphostinganddomains.com/cart.php?a=confdomains"  class="quick-nav"><class="fa fa-shopping-cart"></i>  <span class="hidden-xs">Go to Shopping  Cart</span></a></section
    you might also want to consider using Language Overrides for the "Go To Shopping Cart" text - otherwise all users will see it in English.

    one other error I spotted is on viewcart itself - there should be an edit button there to allow the user to go back to the domain configuration page if they've bypassed it - on your site, it's there... but the link is white and virtually invisible to the user.



  6. #6
    Join Date
    Jul 2017
    Posts
    4

    Default Re: Force user to go to Domain Configuration page before checkout

    Thanks once again Brain for all your help. I really appreciate it and understand the problem that if there is no data there will be no query.

    Is it possible that if user configuration his domain and enter his registrar name the edit button will appear normally but if its not entered or blank there will be a message that you need to configuration your domain information or something like that. The message will only show to the user didn't enter his domain confirmation informations else only the Edit button will show.

    Quote Originally Posted by brian! View Post
    that wouldn't work as viewcart wouldn't necessarily have the information available to it to know.

    I suspect the problem is being caused by your modifications in the templates - you have to be very careful with the cart process not to jump out in the middle of it... the cart is coded to follow a fixed path of steps and once you start bailing out in the middle, you're creating a lot of work for yourself down the road.

    for example, in domainregister.tpl, you've added a direct link to viewcart that isn't included in the original template code...

    PHP Code:
    <section id="header" class="HeaderAdjust">  <a style="text-align:center; background-color:#6AAF08; margin-left:40%; padding-top:7px; padding-left:10px; padding-right:10px; padding-bottom:7px; color:#fff;" href="http://cheaphoswhmcs.cheaphostinganddomains.com/cart.php?a=view" class="quick-nav"><class="fa fa-shopping-cart"></i> <span class="hidden-xs">Go to Shopping Cart</span></a></section
    the quick fix for that might be to just change the link to use the domains configuration page instead...

    PHP Code:
    <section id="header" class="HeaderAdjust">  <a  style="text-align:center; background-color:#6AAF08; margin-left:40%;  padding-top:7px; padding-left:10px; padding-right:10px;  padding-bottom:7px; color:#fff;"  href="http://cheaphoswhmcs.cheaphostinganddomains.com/cart.php?a=confdomains"  class="quick-nav"><class="fa fa-shopping-cart"></i>  <span class="hidden-xs">Go to Shopping  Cart</span></a></section
    you might also want to consider using Language Overrides for the "Go To Shopping Cart" text - otherwise all users will see it in English.

    one other error I spotted is on viewcart itself - there should be an edit button there to allow the user to go back to the domain configuration page if they've bypassed it - on your site, it's there... but the link is white and virtually invisible to the user.



Similar Threads

  1. How to force package by configuration?
    By CedricArnouldEM6 in forum Using WHMCS
    Replies: 2
    Last Post: 05-03-16, 05:16 AM
  2. Skip Domain Configuration page
    By JackRabbit in forum Using WHMCS
    Replies: 5
    Last Post: 01-07-15, 02:59 PM
  3. Replies: 2
    Last Post: 11-05-12, 02:11 PM
  4. Replies: 0
    Last Post: 04-21-08, 10:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •