Jump to content

[Solved] Adding a 'go to checkout' button at top of page


Recommended Posts

Hi,

 

I keep getting errors with the Ajax cart, so I'm just turning it off as there doesn't seem to be a solution. However, with that off, the 'go to checkout' button also disappears.

 

Is it possible to add it in the top right (like in the picture)?

 

I'm using PS 1.4.7.3 with the new presta theme.

 

Any help would be great, thanks!

post-360503-0-67114000-1336948052_thumb.jpg

Edited by xhaling (see edit history)
Link to comment
Share on other sites

Yes you will need to edit one of the .tpl files and add the code there. As an example you can paste the code below into your header.tpl file just below <div id="header_right">

 

 

 

 

<div align="right"><a href="{$link->getPageLink("$order_process.php", true)}{if $order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Go To Check out' mod='blockcart'}</a></div>

  • Like 1
Link to comment
Share on other sites

I did a little playing around and something else that may work for you is to enable the payment logo in the right column.

You will find this in the back office under modules/ front office features/ block payment logo.

After you have that enabled, use the positions to move it to the top of the right column.

Then go to modules/ blockpaymentlogo and edit the blockpaymentlogo.tpl and add the following just below

 

<div id="paiement_logo_block_left" class="paiement_logo_block">

 

 

 

<div align="center"><a href="{$link->getPageLink("$order_process.php", true)}{if $order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Go To Check out' mod='blockcart'}</a></div>

</br></br>

Edited by tdr170 (see edit history)
  • Like 1
Link to comment
Share on other sites

Hey TDR,

 

The code that you made totally worked, just got to put it neatly in and it's perfect. Thank you so much for helping me once again!

 

Just to let you know, the reason I was trying to do this was because I somehow messed up the ajax cart and had that common terminal error...just can't get rid of it so had to turn ajax off. The main problem then was that to get to the cart, you have to click exactly on the words 'cart' and it just wasn't practical. So basically, I've made the whole block clickable by going to: blockuserinfo.tpl and on line 29 adding the line <a href="{$link->getPageLink("$order_process.php", true)}" title="{l s='Your Shopping Cart' mod='blockuserinfo'}"> before <ul id="header_nav"> and it works.

 

I'm not a programmer by far but this worked as well as your great add to cart button.

 

Hopefully some other amateurs like me can find this useful too :) Thanks again!

Link to comment
Share on other sites

Have you tried replacing all the the cart files such as the module blockcart, the files like cartcontroller.php, cart.php, blockcart.css.

I have seen others with issues and after replacing these files all worked ok.

You are using an alt theme so you would need to upload theme from the theme file.

I obviously can't see the issue without the cart enabled so can't help much more then this.

 

Is this the same http://infinitybas.com/ site I took a look and could not see a go to checkout button.

Edited by tdr170 (see edit history)
Link to comment
Share on other sites

Yes it's the same site mate. I'm going to do a bit more updating then find a nice place for the go to checkout button once it's all done.

 

Yeah I tried reupping all the files you said and nothing solved it. I spent about 3-4 days scrawling through all of the error reports and possible solutions but nothing worked for me. The way we've got to now is fine though, I'm very happy with it :)

Link to comment
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
×
×
  • Create New...