Jump to content

New Ajax Order Form


ExsysHost

Recommended Posts

  • Replies 124
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

From the "Product / Services -->Edit Product / Service --> Links Tab" you can get the direct link to use the new Ajax order form as well as other options.

 

Regards,

 

Fernando

 

:roll:

Thx, did not notice the Links tab.

 

Good stuff. Hi to all.

Edited by vasil
Link to comment
Share on other sites

Hello all,

 

I also discovered that the custom field does not pass data when using the ajax form. But it does work when you use the non ajax forms. I think this is a but and I hope it gets fixed soon.

 

For the time being I will have to use the more conventional form.

 

Regards,

 

Sher

Link to comment
Share on other sites

Hello all,

 

I also discovered that the custom field does not pass data when using the ajax form. But it does work when you use the non ajax forms. I think this is a but and I hope it gets fixed soon.

 

For the time being I will have to use the more conventional form.

 

Regards,

 

Sher

 

Read post #100 on this thread, nice solution he posted there!

Link to comment
Share on other sites

Read post #100 on this thread, nice solution he posted there!

 

I already tried this. I amended the "whmcs/order/templates/ordering.js" files by inserting an extra line (immediately after line 134) checkoutvalidate() function so that it reads:

 

function checkoutvalidate() {

recalctotals();

$("#checkoutbtn").hide();

$("#checkoutloading").show();.....

 

instead of:

 

function checkoutvalidate() {

$("#checkoutbtn").hide();

$("#checkoutloading").show();.....

 

 

My javascript knowledge is not so good so maybe there is something else that I need to do but I am not sure. Can anyone please help?

 

Thanks

Link to comment
Share on other sites

function checkoutvalidate() {

recalctotals();

$("#checkoutbtn").hide();

$("#checkoutloading").show();.....

 

That is what I did to fix the problem, of the blank custom field data when ordering as a current customer. This problem should not happen to new customers.

 

Are you still having a problem with the custom fields? If so, try to describe step by step so we can see if we can recreate the same thing. Oh ya are you sure that after you made the change to the ordering.js that you cleared your browser cache before attempting to order again?

Edited by aclark
Link to comment
Share on other sites

That is what I did to fix the problem, of the blank custom field data when ordering as a current customer. This problem should not happen to new customers.

 

Are you still having a problem with the custom fields? If so, try to describe step by step so we can see if we can recreate the same thing. Oh ya are you sure that after you made the change to the ordering.js that you cleared your browser cache before attempting to order again?

 

What he wants to do is pass a custom field through URL into the Ajax form... Not having the customer fill a custom field in the Ajax form. :? :?

Link to comment
Share on other sites

What he wants to do is pass a custom field through URL into the Ajax form... Not having the customer fill a custom field in the Ajax form. :? :?

 

 

That's correct. I have hidden the custom field from my client and is used for internal admin use only. However what I can do is reintroduce the custom field to the client but pre-populate it with the custom field value using php. That might fix the problem I am having. I'll let you know how I get on.

 

By the way I did clear the browser cache but still no luck.

Link to comment
Share on other sites

That's correct. I have hidden the custom field from my client and is used for internal admin use only. However what I can do is reintroduce the custom field to the client but pre-populate it with the custom field value using php. That might fix the problem I am having. I'll let you know how I get on.

 

By the way I did clear the browser cache but still no luck.

 

post #100 was in reference to another issue.

 

To allow overriding the custom fields with querystring you could add to this to "order/index.php" under the line:

$customfield = $_REQUEST['customfield'];

 

if(isset($_GET['customfield'])){
$_SESSION['customfields'] = $_GET['customfield'];
}
if(isset($_SESSION['customfields'])){
$customfield = $_SESSION['customfields'];
}

Link to comment
Share on other sites

post #100 was in reference to another issue.

 

To allow overriding the custom fields with querystring you could add to this to "order/index.php" under the line:

$customfield = $_REQUEST['customfield'];

 

if(isset($_GET['customfield'])){
$_SESSION['customfields'] = $_GET['customfield'];
}
if(isset($_SESSION['customfields'])){
$customfield = $_SESSION['customfields'];
}

 

Thanks aclark, I tried this but it didn't work. I think this is because WHMCS assigns a unique id to each custom field created. So the custom field is accessed using something like "customfield[1]", "customfield[2]" and etc. You can find the id of a custom field by looking at the whmcs table called "tblcustomfields"

 

In my case I set up 5 customfields, so I modified your code to display the following:

 

 

if(isset($_GET['customfield']))
{
$customfield[] = $_get["customfield"];
if(isset($customfield[1])){
	$_SESSION['customfields'] = $customfield[1];
	if(isset($_SESSION['customfields'])){
		$customfield[1] = $_SESSION['customfields'];
	}  
}
	if(isset($customfield[2])){
	$_SESSION['customfields'] = $customfield[2];
		if(isset($_SESSION['customfields'])){
			$customfield[2] = $_SESSION['customfields'];
		}  
}
	if(isset($customfield[3])){
	$_SESSION['customfields'] = $customfield[3];
		if(isset($_SESSION['customfields'])){
			$customfield[3] = $_SESSION['customfields'];
		}  
}
	if(isset($customfield[4])){
	$_SESSION['customfields'] = $customfield[4];
		if(isset($_SESSION['customfields'])){
			$customfield[4] = $_SESSION['customfields'];
		}  
}
	if(isset($customfield[5])){
	$_SESSION['customfields'] = $customfield[5];
		if(isset($_SESSION['customfields'])){
			$customfield[5] = $_SESSION['customfields'];
		}  
}
}

 

However I cannot get this modified code to work either. Any ideas where I am going wrong?

Link to comment
Share on other sites

So far so good with our dev install of the ajax order form, we hope to go live with it over the weekend sometime.

 

The only thing as others have mentioned is the lack of ability to order ONLY a domain name registration or transfer, without a related hosting product.

 

On the old order form this was done by selecting domain registration as the product, but the domain registration isnt shown as a product on the new ajax product list in the first step?

Link to comment
Share on other sites

I share many of the frustrations that are posted here. So to get a head start since this is a open source release of the ajax form I spent the weekend to try to enhance it as needed. Take a look here: https://my.enotch.com/order to see what has been done.

 

I decided that it was worthwhile to keep the ajax div from scrolling. To do so I removed the $("#cartsummary").makeFloat({x:"current",y:"current"}); tag from the master.tpl posted right before the </literal> tag.

 

...

 

 

Fixed some small issues with the layout here. Hope this revision will help.

 

Revisions:

*product description now followed by line break. was causing next product to display on same line

 

*Added in clause to only display an extra break on description being set, neater radio list for none descriptive products (for example you are linking directly to the product group from another page.

 

* last product had increased indentation. Causing it to display out of line with the rest of the products.

 

*Added in some styling of the font Bold product names and emphasised descriptions

 

*arranged the div and table structure correctly

 

whmcs/order/templates/product.tpl

<br />
<table width="90%" cellspacing="0" cellpadding="0" align="center">
<tr>
	<div class="orderbox">
		<td>
			{foreach from=$products item=product key=num}
				<input type="radio" name="pid" value="{$product.pid}" id="pid{$product.pid}" onclick="loadproductconfig('{$product.pid}')"{if $product.qty eq "0"} disabled{/if} class="buttongo" /> <label for="pid{$product.pid}"><b>{$product.name}</b></label>
				{if $product.qty!=""}<em>({$product.qty} {$LANG.orderavailable})</em>{/if}<br>
				{if $product.description}<em>{$product.description}</em><br>{/if}
				{if $num % 2}</td></tr><tr><td>{/if}
			{/foreach}
		</td>
	</div>
</tr>
</table>

 

it could probably be inproved still so feel free to bring your own slant onto it

Link to comment
Share on other sites

@ibumu

 

master.tpl

jQuery("#cartsummary").makeFloat({x:"current",y:"current"})

 

Also I highly recommend getting rid of the client menu on the right hand side and just having your cart box be there... your current design is going to lose a lot of customers...

 

the box will not show to people on 1024x768 monitors which account for 60% of web traffic

 

besides you are adding more stuff for them to get confused on.

Link to comment
Share on other sites

  • 4 months later...
I think that would be {$product.price} i may be wrong though,

 

Almost right ...

   {$product.pricing.type}
   {$product.pricing.monthly}
   {$product.pricing.quarterly}
   {$product.pricing.semiannually}
   {$product.pricing.annually}
   {$product.pricing.biennially}
   {$product.pricing.triennially}

   {$product.pricing.rawpricing.msetupfee}
   {$product.pricing.rawpricing.qsetupfee}
   {$product.pricing.rawpricing.ssetupfee}
   {$product.pricing.rawpricing.asetupfee}
   {$product.pricing.rawpricing.bsetupfee}
   {$product.pricing.rawpricing.tsetupfee}
   {$product.pricing.rawpricing.monthly}
   {$product.pricing.rawpricing.quarterly}
   {$product.pricing.rawpricing.semiannually}
   {$product.pricing.rawpricing.annually}
   {$product.pricing.rawpricing.biennially}
   {$product.pricing.rawpricing.triennially}

 

The product.pricing.monthly, quarterly, annually, etc. will only be defined if you have that pricing set up for the package.

 

The product.pricing.rawpricing.xxxx will be defined no matter what.

Link to comment
Share on other sites

  • WHMCS CEO
Anyone know if there is a fix coming for the lack of EPP code?

 

The EPP code is already supported through the ajax order form. You just need to change line 78 in productconfig.tpl if you don't have any domain addons enabled to make it show, from:

 

{if $domaindnsmanagement || $domainemailforwarding || $domainidprotection || $domainadditionalfields}

 

to:

 

{if $domaineppcodereq || $domaindnsmanagement || $domainemailforwarding || $domainidprotection || $domainadditionalfields}

 

Matt

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