phantomdentist Posted August 4, 2010 Share Posted August 4, 2010 Hi I would like to know how I can skip the cart view page and go straight to checkout. Ive seen this done on a few sites. When I link to a product I'm using the standard code https://mysite.com/billing/cart.php?a=add&pid=2 Which then takes me to the following url https://mysite.com/billing/cart.php?a=view with the product added. I would like to go straight to https://mysite.com/billing/cart.php?a=checkout With the product added, skipping the view cart altogether. Thanks 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 (edited) Try: https://mysite.com/billing/cart.php?a=add&pid=2&a=checkout It also depend on your settings. If domain is enabled then i don't think it's possible. Edited August 4, 2010 by b.ahmed 0 Quote Link to comment Share on other sites More sharing options...
phantomdentist Posted August 4, 2010 Author Share Posted August 4, 2010 Yeah I gave that a shot before, no dice. Thanks for the try. It also depend on your settings. If domain is enabled then i don't think it's possible. I assume you mean if the client has to pick a domain name? This is disabled for these packages as they are web design packages. Any other thoughts? Thanks 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 4, 2010 Share Posted August 4, 2010 You might be able to setup a mod_rewrite rule to rewrite the URL to a=checkout rather than a=view. 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 I think there is another easier way but let me test it first.... 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 ok one quick way to do this is to add following code in <head> </head> tags in your header.tpl {if $filename eq "cart" && $smarty.get.a eq "view"} <meta HTTP-EQUIV="REFRESH" content="0; url=http://yourwebsite.com/cart.php?a=checkout"> {/if} Second method is more neat. Open viewcart.tpl Find: {if $checkout} and comment it out. Now Find: {else} (It will be above "your detail" box code) and comment it out as well. the above mentioned {else} will be near above <h3>{$LANG.yourdetails}</h3> Now at the end of file you will find: {/if} again comment it out...... I have tested it and both methods worked fine, But you should test with different settings before making your website live. 0 Quote Link to comment Share on other sites More sharing options...
phantomdentist Posted August 5, 2010 Author Share Posted August 5, 2010 Awesome stuff, thank you very much 0 Quote Link to comment Share on other sites More sharing options...
phantomdentist Posted August 5, 2010 Author Share Posted August 5, 2010 Ah afriad neither of those worked for me. The first method does take me to the checkout page but stops the product being added. The second doesn't seem to do anything. 0 Quote Link to comment Share on other sites More sharing options...
Seiya Posted August 16, 2010 Share Posted August 16, 2010 Ah afriad neither of those worked for me. The first method does take me to the checkout page but stops the product being added. The second doesn't seem to do anything. Did you ever get this working? 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 16, 2010 Share Posted August 16, 2010 The method i mentioned works.... 0 Quote Link to comment Share on other sites More sharing options...
nickia Posted June 22, 2011 Share Posted June 22, 2011 Did you ever get this working? Slum Host's method works. At first I thought it didn't then I realized I was using cart.php?a=add&pid=5&a=checkout instead of the plain cart.php?a=add&pid=5 Works like a charm. Thanks Slum Host:D 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.