Jump to content
sathish

How to multiple product order added to cart page

Recommended Posts

I want to build,  cart page(/cart.php?a=add) add multiple products on view cart page(/cart.php?a=view).  I use this method :

http://demo.whmcs.com/cart.php?a=add&pid=1&sld=google&tld=.com

I call the above link in hooks( PreCalculateCartTotals). but products should not add and after refresh page then it will add. one more thing products domain not showing.

Share this post


Link to post
Share on other sites
On 17/01/2019 at 08:23, sathish said:

I want to build,  cart page(/cart.php?a=add) add multiple products on view cart page(/cart.php?a=view). 

wouldn't it be easier to use Product Bundles and tick the "Show In Product Group" checkbox ?

Quote

Product Bundles are a very powerful tool in WHMCS, allowing you to not only setup order form links that will automatically take the user through the process of adding 2 or more products in a single ordering process, but also provide a way to link to the order form from the pages of your site with specific configurations pre-selected by default.

Share this post


Link to post
Share on other sites

Thank you very much for the notes. But I want to build like attached files.

     In Custom product page, add the product to cart page (cart.php?a=add), I will add now another two more product(SSL certificate, site lock) in the cart page.

I will select now domain, Hosting package and SSL certificate, click continue in the cart page but it will not show SSL certificate in the next page of continue page. It will show only Domain and product came but after refresh the page it will show the chosen product(SSL Certificate) but not showing the domain name.

For your reference, I have attached the screenshot.

 

dev1.PNG

dev2.PNG

dev3.PNG

dev4.PNG

dev5.PNG

Share this post


Link to post
Share on other sites
On 19/01/2019 at 05:38, sathish said:

In Custom product page, add the product to cart page (cart.php?a=add), I will add now another two more product(SSL certificate, site lock) in the cart page.

are they products or product addons ?

On 19/01/2019 at 05:38, sathish said:

I will select now domain, Hosting package and SSL certificate, click continue in the cart page but it will not show SSL certificate in the next page of continue page. It will show only Domain and product came but after refresh the page it will show the chosen product(SSL Certificate) but not showing the domain name.

this isn't really a configuration question, because the cart can't be configured (from settings) to do what you want it to do.

WHMCS orderform carts have always all worked in the same way (and it's why nearly all custom cart orderform templates are basically just css styling changes)...

  1. choose product
  2. optionally choose domain
  3. configure product
  4. configure domain
  5. cart summary
  6. checkout

now you can (and seem to be) using skipconfig to bypass some of those optional configuration steps, but what you can't do from settings is merge those steps or change their order, e.g you can't choose product addons at the same time as searching for domains - the cart simply isn't expecting you to do that.

ultimately, I think you only have two options - don't use skipconfig and let the user go through the cart process in the order that WHMCS prescribes above; or create a truly custom order form using the API and all the development work that that entails.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated