Jump to content

Validate Items in the cart before checkout


Lithix

Recommended Posts

I am integrating some ad removal features into WHMCS and I need to be able to validate some data when they add an item to the cart.

 

 

For example...when they click "ad removal" I have a custom drop down that populates with the domain names I serve. Then I have a text box where they can enter thier site name, which is thier subdomain. I need to validate this before they purchase, otherwise they are likely to enter something wrong or put in a site that doesn't exists, then I have to manually fix it.

 

Is there a way to validate the data on an item placed in the cart when they hit the "Add to Cart" button? I see the PreShoppingCartCheckout application hook but the documentation is seriously lacking on when this function is called and what data I have access to.

 

Can anyone help out as to how I can access those custom fields, and send an error message back?

 

Thanks,

JT

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