Jump to content

Is there a way for me to use a webhook to check if a product is available?


ukndoit

Recommended Posts

I want to program a custom product page, because no way for me to create it with WHMCS right now.

 

What I want to do is show a layout that has 1 product for each space available. I want to be able to dynamically check each space to see if there is quantity of 1, available for it. If so, I want to build a buy button to put on it, so they can click it to add that product directly to the checkout to order it.

 

is there a way to have my custom PHP programming, run a webhook or api check to see if a product is available and if so, get the ID to build the link for the add to cart button?

 

If so, can you point me in the direction where I can see that?

 

Thank you,

Richard

Link to comment
Share on other sites

Hi Richard,

 

not sure whether you're (ideally) wanting to do this externally of WHMCS or as a products page within it?

 

if it was as a products page, then it should be a simple {if} statement in the template will do it - the quantity value for each product should be available to the page... similar to the thread below, except that hides out of stock items, whereas you'd want to check if the quantity was 1 (or more?).

 

http://forum.whmcs.com/showthread.php?109219-Hide-out-of-stock&p=447063#post447063

 

if it was on an external site, then a hook would be an option; data feeds might be another option - both should be able to get the quantity value.

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.

×
×
  • 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