How can I position a script below the add to cart button on product pages?

Hello,

I need help to place a script below the add to cart button of the product pages. Below I will paste the script and a screenshot to make it more clear where I want the script to be placed.

Frete grátis


Comprando dentro das próximas 2 h 57 min

7 dias para trocas e devoluções


Garantia de 30 dias diretamente em nossa loja

Hi @matteo_p ,

Please go to Customize > Products > Default product > Add block > Liquid.

You can add the code here and move it below button.

Hope it helps!

Hi there,

Thank you for the reply. I followed your instructions and managed to add the script, however I need to add a title to the block in order for the script to appear. I would like for the script to work without me having to add a title to the block. Ideally, I would like the script to be placed in the same block as the add to cart button (just below the button), but I’m ok with it being in a separate block as long as I don’t need to add a title. Do you know any solution to this?

1 Like

Hi @matteo_p ,

Please go to main-product.liquid file, find ‘/product-form’ and add code here:

it will display fine

Hello,

I searched for /product-form in the main-product.liquid file but my theme doesn’t seem to have this code. My store runs on the warehouse theme.

Hi @matteo_p ,

Please go to product-buy-buttons.liquid file and add code here:

It worked! However the text is too close to the add to cart button. Is it possible for me to move it a bit lower to be proportionally distant from the add to cart button to the bottom of the block?

Hi @matteo_p ,

Please send your site and if your site is password protected, please send me the password. I will check it.

With the previous answer: If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

Hi @matteo_p ,

Please change code here:

Code:


=>