Jump to content

Buy now


1skora

Recommended Posts

Sorry if post is not in good category.

Can somebody help me write a button Buy Now to prestashop 8.01. 
I download module Buybuttonlite and create direct link to my button but that is not working. The path is incorrect.

If you can repair it or gave me some advice how to do it i will be realy glad.
 

 {$link->getModuleLink('ps_buybuttonlite', 'RedirectManager')|'#&id_lang=[0-9]{1,2}$#':''}?id_product=

      {$product.id}&action=2{if $product.id product attribute}&id product attribute = {$product.id product attribute}{/if}

Thank you for help.

Link to comment
Share on other sites

Hi,

The code you provided seems to have a formatting issue, and it's not clear whether you are using it within a Smarty template or somewhere else.

Assuming you are working with a Smarty template, you can create a "Buy Now" button like this:

<a href="{$link->getModuleLink('ps_buybuttonlite', 'RedirectManager')}?id_product={$product.id}&action=2{if $product.id_product_attribute}&id_product_attribute={$product.id_product_attribute}{/if}" class="btn btn-buy-now">Buy Now</a>

Fixed the syntax for checking if $product.id_product_attribute exists. It was missing an underscore.

Corrected the href attribute to include the proper parameters for the BuyButtonLite module.

Kindly let me know if it helps.

Thanks!

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