Jump to content

Skip cart.php?a=view


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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