Jump to content

[SOLVED] how to add New button in header "checkout"


Recommended Posts

Hi there !

 

I need to add a button in the header, next to the Cart Button, that says: "Checkout", and when the client click that button it send him to the checkout process.

 

This is because some ppl dont know that they have to move the mouse over the Cart Button and it opens, or make a click over it.

 

Any suggestions will be aprecciate.

 

Thanks !!!!!

Link to comment
Share on other sites

You can try something like this, of course where you want o add it depends on the theme you use:

<a href="{$link->getPageLink("$order_process", true)}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Checkout' mod='blockcart'}" rel="nofollow"><span></span>{l s='Checkout' mod='blockcart'}</a>

Change the mod='name of the module' to the module you add this to. Probably to be blockuserinfo!

Link to comment
Share on other sites

Hello.

 

The link for the store is:

 

http://www.chaschas.es/comprar/te

 

The button is "Comprar Ahora" that means "Buy Now". This is because we made some tests and there are people that doesnt know they have to go to the Cart Button and click there, so its easier for them to click the see a "Buy Now" button after they´ve selected all the products.

 

The button is in the blockuserinfo.tpl file, but maybe it can be added to the blockcart.tpl if easier. Or has to be in the php files ? 

 

I only need to move that button next to the "Cart" one.

 

Also as the "Comprar Ahora" word doesnt exist in Prestashop, it also appears this way in the other languages. I think is not really easy to add a new word.

 

 Thanks !!!!

Link to comment
Share on other sites

to code that Nemo provided add this:

 

id="comprarahora"

 

then with css styles you can change its position:

 

#coprarahora {

position:absolute;

top:50px;

left:20px;

}

 

you will be able to manipulate position with left / top code values (increase/decrease)

Link to comment
Share on other sites

  • 1 month later...

You can try something like this, of course where you want o add it depends on the theme you use:

<a href="{$link->getPageLink("$order_process", true)}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Checkout' mod='blockcart'}" rel="nofollow"><span></span>{l s='Checkout' mod='blockcart'}</a>

Change the mod='name of the module' to the module you add this to. Probably to be blockuserinfo!

Hi

what is mod name so that i can go to checkout process. 

i want put checkout button in product-list page. so that two buttons available 1. add to cart and checkout

Link to comment
Share on other sites

instead of $order_process use just order

{if ($product.allow_oosp || $product.quantity > 0)}
                    {if isset($static_token)}
                        <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", true)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
						<a href="{$link->getPageLink("$order", true)}" id="button_order_cart" class="exclusive{if $order == 'order-opc'}_large{/if}" title="{l s='Checkout' mod='blockcart'}" rel="nofollow"><span></span>{l s='Checkout' mod='blockcart'}</a>
                    {else}
                        <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", true)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
						<a href="{$link->getPageLink("$order", true)}" id="button_order_cart" class="exclusive{if $order == 'order-opc'}_large{/if}" title="{l s='Checkout' mod='blockcart'}" rel="nofollow"><span></span>{l s='Checkout' mod='blockcart'}</a>
                    {/if}                       
                {else}
                    <span class="exclusive"><span></span>{l s='Add to cart'}</span><br />
                {/if}

Hi  I have added the code here , checkout button appears in every product on productlist of evry category.

But  checkout button is redirecting to home page . its not going to order process page 

 

_

Edited by rambabuy (see edit history)
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...