Jump to content

Add a product to be a quote/quotation only


Recommended Posts

Hi again,

Hope everyone is doing well. 

Is there any way for me to add a custom product  on WHMCS that only serves the purpose of sending a quote request to me? 

In essence. I want specific products to be requested only through a quotation request. It shouldn't be a full fledged order. 

Thank you for any advice and assistance. 

Enjoy your day 🙂

Link to comment
Share on other sites

4 hours ago, SpaceIgniter said:

Is there any way for me to add a custom product  on WHMCS that only serves the purpose of sending a quote request to me? 

not from settings.

4 hours ago, SpaceIgniter said:

In essence. I want specific products to be requested only through a quotation request. It shouldn't be a full fledged order. 

I did it years ago where specific products didn't add to cart, but went to a support dept to open a ticket.. off-hand, I can't find the code, though it would almost certainly have been a template edit back then.... you should be able to do it with a hook though.

Link to comment
Share on other sites

Hi Brian, 

Thanks for the reply.

I'm not a coder/dev in the true sense. I'm able to read it and make changes as instructed, but I don't know how to do it from scratch. 

If you possibly have the time, could you please post an example of a hook that might work. 

Thanks again. Enjoy your day. 

Link to comment
Share on other sites

4 hours ago, SpaceIgniter said:

If you possibly have the time, could you please post an example of a hook that might work. 

the only think I could remember about the original thread was that I used the phrase POA in it...

though in your situation, you don't need to make a dummy product in the template as I did back then (what was I thinking ?!?) - just make a product as normal, and then code it to react differently.

if this product was assigned to it's own product group, then that would make the coding simpler - you could either assign a custom modified orderform template to it, or use the default template and change the button URL via a hook.

which orderform template are you using - standard_cart ?

Link to comment
Share on other sites

23 hours ago, SpaceIgniter said:

As I've said too, I'm not good at writing anything code

I know - but I didn't want to waste time coding something for standard_cart, only for you to tell me that you were using Lagom or another third-party orderform template! 🙂

so for the sake of argument, let's say that this product is in it's own product group (#23), in products.tpl you could change...

<a href="{$WEB_ROOT}/cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}" class="btn btn-success btn-sm" id="product{$product@iteration}-order-button">
	<i class="fas fa-shopping-cart"></i> {$LANG.ordernowbutton}</a>

to...

{if $gid == 23}
	<a href="{$WEB_ROOT}/submitticket.php?step=2&deptid=2&subject={$product.name}" class="btn btn-info btn-sm" id="product{$product@iteration}-order-button">
      <i class="fas fa-envelope"></i> {$LANG.contactus}</a>
{else}
	<a href="{$WEB_ROOT}/cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}" class="btn btn-success btn-sm" id="product{$product@iteration}-order-button">
      <i class="fas fa-shopping-cart"></i> {$LANG.ordernowbutton}</a>
{/if}

S2hkzj1.png

clicking on the blue button will now open a support ticket, with the product name as the subject title of the ticket - you will probably need to change the deptid=2 to whichever support department you wanted to use for this issue.

if the custom product was in a group with other "normal" products, then you can adaprt the code to allow this....

{if $product.pid|in_array:array(137,45)}
	<a href="{$WEB_ROOT}/submitticket.php?step=2&deptid=2&subject={$product.name}" class="btn btn-info btn-sm" id="product{$product@iteration}-order-button">
      <i class="fas fa-envelope"></i>  {$LANG.contactus}</a>
{else}
	<a href="{$WEB_ROOT}/cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}" class="btn btn-success btn-sm" id="product{$product@iteration}-order-button">
      <i class="fas fa-shopping-cart"></i>  {$LANG.ordernowbutton}</a>
{/if}

tMZcvPG.png

in the above example, i'm defining two products (IDs 137 & 45) to behave as your custom products - they will both show the blue button; other products will work as normal with the green button.

ultimately, you might be able to do this as a hook - certainly if these products are in their own group (potentially very messy if they're not)... with a template change as per above, it's slightly more flexible.

Link to comment
Share on other sites

Hi Brian,

Thanks so much for your time and effort. I got it working using the Group ID as you coded.
How would I add more than one GID to the code however?

I didn't specify it originally and I apologise for that.
I would need to apply this to a few groups that require Contact.

Thank you again. I really appreciate all your help.
Have a great weekend ahead 🙂

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