Jump to content

Remove Billing Cycle Dropdown after submitting domain options


JackRabbit

Recommended Posts

I want to remove the billing cycle dropdown after submitting the domain options on the configure product domain page. &skipconfig=1 is not working.

 

Once I select the registration period from the light box and submit the form, a billing cycle section drops down with an order summary which once submitted will take us to the next page, the domain configuration.

 

Rather, when I select the registration and hit submit from the lightbox, I want to go directly to the domain configuration skipping the billing cycle and order summary drop down completely.

 

I've tried adding an &skipconfig=1 to the urls but either I'm not putting it in the right spot or it's just not working correctly.

 

Here is the page I want to modify: http://www.jackrabbit.host/high-speed-hosting/whmcsportal/cart.php/?a=add&pid=1

Link to comment
Share on other sites

you can't really use skipconfig in this context as you aren't really skipping a config stage, you just want to tweak one of the existing stages.

 

quickest way would be to modify configureproduct.tpl and remove the {if $pricing.type eq "recurring"} block of code ~line19 (this displays the billing cycle)... and also the order summary block at line 127...

 

<h3>{$LANG.ordersummary}</h3>
<div class="ordersummary" id="producttotal"></div>

as you only have one billing cycle setup for the product, this should work without any further changes...

Link to comment
Share on other sites

Hi there Brian

 

I've removed both blocks and after submitting the domainoptions form, the form slides up and fades out and I'm left on the configureproductdomain page without going to the config page.

 

Yeah, I realized the skipconfig skipped the domain configuration page after I posted here last night. So I've removed it from the URL.

 

How can I get to the domain config page after submitting the domain options?

Link to comment
Share on other sites

Hi,

 

the problem is that you're using a customised version of the 'slider' template... if you were using the default version of slider, this would work! :idea:

 

I think there is something wrong with your changes to the configureproductdomain.tpl template - I suspect that if you replaced it with the original version of slider/configureproductdomain.tpl, then the order process would work correctly - it may not look how you want it to, but it should work!

 

if it does, then you can slowly start to make your modifications to the file to match your site design.

Link to comment
Share on other sites

Okay Brian, the slider folder has been completely restored from the original whmcs zip and it's still having the same issue.

 

I've removed the following blocks:

 

{if $pricing.type eq "recurring"}
<h3>{$LANG.cartchoosecycle}</h3>
<div class="billingcycle">
<table width="100%" cellspacing="0" cellpadding="0" class="configtable">
{if $pricing.monthly}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle1" value="monthly"{if $billingcycle eq "monthly"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle1">{$pricing.monthly}</label></td></tr>{/if}
{if $pricing.quarterly}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle2" value="quarterly"{if $billingcycle eq "quarterly"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle2">{$pricing.quarterly}</label></td></tr>{/if}
{if $pricing.semiannually}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle3" value="semiannually"{if $billingcycle eq "semiannually"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle3">{$pricing.semiannually}</label></td></tr>{/if}
{if $pricing.annually}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle4" value="annually"{if $billingcycle eq "annually"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle4">{$pricing.annually}</label></td></tr>{/if}
{if $pricing.biennially}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle5" value="biennially"{if $billingcycle eq "biennially"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle5">{$pricing.biennially}</label></td></tr>{/if}
{if $pricing.triennially}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle6" value="triennially"{if $billingcycle eq "triennially"} checked{/if} onclick="recalctotals()" /></td><td class="fieldarea"><label for="cycle6">{$pricing.triennially}</label></td></tr>{/if}
</table>
</div>
{/if}

<div class="prodconfigcol2">

<h3>{$LANG.ordersummary}</h3>
<div class="ordersummary" id="producttotal"></div>

<div class="checkoutbuttons">
<input type="button" value="{$LANG.checkout} »" class="checkout" onclick="addtocart();" /><br />
<input type="button" value="{$LANG.continueshopping}" onclick="addtocart('{$productinfo.gid}');" /><br />
<input type="button" value="{$LANG.viewcart}" onclick="window.location='cart.php?a=view'" />
</div>

</div>

 

and because I have a custom field which I'll use on the next page, I've also removed:

 

{if $customfields}
<h3>{$LANG.orderadditionalrequiredinfo}</h3>
<div class="customfields">
<table width="100%" cellspacing="0" cellpadding="0" class="configtable">
{foreach key=num item=customfield from=$customfields}
<tr><td class="fieldlabel">{$customfield.name}</td><td class="fieldarea">{$customfield.input} {$customfield.description}</td></tr>
{/foreach}
</table>
</div>
{/if}

 

here's the url to the page again:

http://www.jackrabbit.host/high-speed-hosting/whmcsportal/cart.php/?a=add&pid=1

 

I'm using the WPMU wordpress integration plugin but that isn't the issue. I can duplicate the problem from the original whmcs link:

https://www.jackrabbit.host/whmcs/cart.php?a=add&pid=1

Link to comment
Share on other sites

Hi,

 

I think it works fine - but it looks like you've removed so much from the template that there is nothing left for whmcs to show... e.g, that next page only has 3 sections (billing cycle, custom field and order summary) - you've removed BC and OS, CF will be replaced by your hard coded custom field...

 

also, you've removed too much of the order summary code - you only needed to remove the two lines I mentioned previously, but you've also removed the buttons... so the order can't progress any further! :)

 

so if you put the code for the 3 buttons back in, you should at least see them.... then if you add your hard-coded custom field code to configuredomains.tpl, you should start to see that too.

 

I can tell you that your template works fine here for me - except for the missing buttons and lack of custom field (which my test products wouldn't use)... when I tried your earlier template, it works (sortof), but the step after ordering the domain, it loads the header and footer again. :?:

 

also, and this is probably not related, Chrome gives an error..

 

Failed to load resource: the server responded with a status of 404 (Not Found) - https://www.jackrabbit.host/whmcs/wp-integration.php

 

I've deleted the custom fields from the whmcs product/services settings and now it's working but it's going straight to the checkout page.

 

I need the custom fields and I need to go to the configdomains page after submitting the domain options

go back to the default slider template and only change one thing at a time and then test... then change another, test again - that way, you should find where the issue lies.

Link to comment
Share on other sites

Rather, when I select the registration and hit submit from the lightbox, I want to go directly to the domain configuration skipping the billing cycle and order summary drop down completely.

just to clarify, the removal of the code I originally mentioned would leave just the custom field box on that page (if the product has cf) along with the three buttons, which would then lead on to the domain configuration page.

Link to comment
Share on other sites

Ok, I see. When I uncheck the 'show on order form' under the custom fields, the billing cycle drop down no longer shows up and I've still got the custom fields set up which is good. But after clicking the domainoptions button, rather than going to the domain config page, it goes directly to the view cart. I haven't used the skipconfig, why is it skipping the config page? I'd like to have the dns option along with the custom fields on the domain config page so I don't want to skip it.

 

Is there something I can add to the domainoptions button to load &a=configdomains ?

 

Thanks for your help Brian, you're awesome.

Link to comment
Share on other sites

Ok, I see. When I uncheck the 'show on order form' under the custom fields, the billing cycle drop down no longer shows up and I've still got the custom fields set up which is good. But after clicking the domainoptions button, rather than going to the domain config page, it goes directly to the view cart. I haven't used the skipconfig, why is it skipping the config page?

it might be because if you only have one billing cycle and no customfields, there is nothing to choose on that page - I know you have hard-coded customfields, but the cart might not detect them as such (difficult to tell from the outside).

 

I'd like to have the dns option along with the custom fields on the domain config page so I don't want to skip it.

the problem is that customfields variables are available on the billing cycle page, but they're not on the domains config page, even though your hard coding them for some reason, I don't think you can add them on the page you want.. it's easier to leave them where they are on the billing cycle page.

 

if I use your slider template (the one I have from a few hours ago), this is what I see using a test product... i've added a customfield with 4 options, not hard-coded but generated normally by whmcs.

 

weirdly, I had to link to main.js from the default slider folder in order for the checkout button to work.

 

erc6pmx.png

Link to comment
Share on other sites

Ok Brian, I see what it does when I fix it like you mentioned. I've got it set up.

 

The problem for me is the custom fields get burried down the page below the domain box and the design is not so professional between the two different styles and sizes of forms on the configureproductdomain page. It looks terrible in my opinion.

 

It would make sense have all the options in one spot on the next page. It doesn't only look better but the visitor doesn't have to submit twice and the options are all together.

 

Is there any possible way to put the custom fields on the configuredomains.tpl? Should I start a new thread in case others want to put custom fields in other templates? I've already searched and didn't find anything.

 

Thanks Brian! You're super!

Link to comment
Share on other sites

Ok Brian, I see what it does when I fix it like you mentioned. I've got it set up.

 

The problem for me is the custom fields get burried down the page below the domain box and the design is not so professional between the two different styles and sizes of forms on the configureproductdomain page. It looks terrible in my opinion.

 

It would make sense have all the options in one spot on the next page. It doesn't only look better but the visitor doesn't have to submit twice and the options are all together.

with the order form templates, only certain variables are available at each stage - these are defined in the encrypted code... I recall one of the whmcs guys (prob 2013 - can't find the thread) saying the cart process can't be changed... you can modify the content of each step, and under certain circumstances you can bypass some with skipconfig, but you can't really add or remove steps...

 

two things that you might want to consider...

 

1. switching to using Ajaxcart... that has more of a flow to it on one page and feels less like separate pages...

2. wait for v6 to be released... there is supposedly a new client theme being added it to - perhaps they will add new or updated order-form templates too?

 

all the existing order forms are old now - I think it's been a few years since new templates have been added.. certainly none in my time in the forums.

 

Is there any possible way to put the custom fields on the configuredomains.tpl? Should I start a new thread in case others want to put custom fields in other templates? I've already searched and didn't find anything.

you could get the custom fields by querying the db, but whether the cart would accept them would be another matter... perhaps somehow you could call the customfieldfunction file, but I doubt if even that would work... and even if it did, there's nothing to say that v6 wouldn't break the solution!

Edited by brian!
Link to comment
Share on other sites

Ah ok. When is V6 going to be released? I'm only seeing news about the release on the blog but not a date. I'm going to play with ajax in the meantime.

I don't think whmcs have announced any dates publically, but they have said it will go to beta first - I would still expect to see a beta this year with a full release next - but I have no inside info on this, so it's just an opinion. :)

 

personally, I hope they don't release any v6 betas this year, i'd prefer them to be focussing on the EU VAT issue which has a deadline (1st Jan), v6 can wait a few more weeks.

Link to comment
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.

  • 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