wirenine Posted October 12, 2019 Share Posted October 12, 2019 Is it possible to add code on the cart checkout page with ajax to modify the product billing cycle? I want to do this so I can skip the unnecessary step of cart.php?a=confproduct just to select the billing cycle. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 12, 2019 Share Posted October 12, 2019 8 hours ago, wirenine said: Is it possible to add code on the cart checkout page with ajax to modify the product billing cycle? I want to do this so I can skip the unnecessary step of cart.php?a=confproduct just to select the billing cycle. Thanks! if you know what the cycle is you want to pass, then it might be easier to do it earlier - so if we take your "Personal" hosting plan.... cart.php?a=add&pid=82 let's say we want to add it with an annual billing cycle (I know you already do this on your site)... cart.php?a=add&pid=82&billingcycle=annually let's say you want to go one stage further and add it with an quarterly cycle, but select the Amsterdam data center... cart.php?a=add&pid=82&configoption[12]=23&billingcycle=quarterly note the config options are listed before the billing cycle - weirdly, I don't think it works the other way around... so now, we have automatically chosen the billing cycle, assigned the data center location... but the user still has to press Continue to carry on... this is when you can add skipconfig into the URL.. cart.php?a=add&pid=82&configoption[12]=23&billingcycle=quarterly&skipconfig=1 using this, they will skip the configuration stage and go straight from choosing a domain to checking out. 🎉 but note that using skipconfig in the URL only works if there are no more configuration changes needed... e.g if you had a product that had 2 separate configurable options, but you only passed a value for only one in the URL (along with skipconfig), then the user would still be directed to the configuration page to complete the second option selection. for practical purposes, you could use these URL in your links on the main site if you wanted to assign a specific cycle, configurable option selections to the order... you could even modify the products template in the cart to assign default cycles/options to multiple products - but let's not go down that road unless we have to. 🙂 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.