Jump to content

How to use hook to collect custom field from html and pass it to WHMCS order pages?


astralliquid

Recommended Posts

Hi

 

I actually had another thread but I couldn't edit the title to make it clearer. I really need this fix please bear with me.

 

---------------------------------------------------------------------------

 

I am trying to collect custom field information on an html order form and pass it through WHMCS bundled order process (which has "continue/next" button in each product orderinf steps)

 

 

it works if the order is a direct product

http://www.xxxxx.com/cart.php?a=add&pid=132&customfield[184]=11111111

 

but is this product is part of a bundle, the customfield is not captured

http://www.xxxxx.com/cart.php?a=add&bid=12&customfield[184]=11111111

 

 

I have submitted a ticket and the response from WHMCS was:

************************************************** ********

Unfortunately with Bundles, this type of linking will not work.

 

However, what you could do, is use a hook and pass some jQuery to input the data in the field as the page is loaded after the redirect.

 

A good hook to use for this would be the ShoppingCartValidateProductUpdate hook.

 

http://docs.whmcs.com/Hooks:Shopping...eProductUpdate

 

This will run as the product configuration is being completed and will return product custom fields which you could then input the data you are needing manually.

************************************************** ********

 

 

I am not good at programming and do not know how to use hooks. Can someone please help me with some exact code samples/locations/file/guide?

 

 

Thank you very much

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