Jump to content

Edit css and html code


wtd000

Recommended Posts

"Hello everyone. I am new to the world of Prestashop and I would like to edit the text of the add to cart button in the product view. I have searched many .TPL files but I can't find where the code for that button is located. Could you help me? Greetings and thank you."

Captura4.PNG

Link to comment
Share on other sites

Hello @wtd000

 

To change the Add to cart button text, please try the following solution.

 

Step 1: Goto this path in your project directory themes\{{your theme}}\templates\catalog\_partials, and you will find the product-add-to-cart.tpl file in this directory.

 

Step 2: Now Open the product-add-to-cart.tpl file and change the add-to-cart button text near line 61. please see the screenshot for your reference.

image.png.35de1fe8016448efa23a89cb6cb3f9ef.png

 

After changing this button text, save the file and clear the cache from PrestaShop BO. Your updated text will be displayed on the frontend product page.

Please see the screenshot for your reference: 

Code:

image.png.190f38d8c210ec9fe715ead780a220dc.png

Front-end:

image.thumb.png.100f33b003650c429cc00c245cd03f28.png

 

I hope this solution will work for you.

Thanks.

 

Link to comment
Share on other sites

On 9/3/2023 at 7:50, WebDesk Solution said:

Hola@wtd000

 

Para cambiar el texto del botón Agregar al carrito, pruebe la siguiente solución.

 

Paso 1: vaya a esta ruta en el directorio de su proyecto themes\{{su tema}}\templates\catalog\_partials y encontrará el archivo product-add-to-cart.tpl en este directorio.

 

Paso 2: ahora abra el archivo product-add-to-cart.tpl y cambie el texto del botón Agregar al carrito cerca de la línea 61. Consulte la captura de pantalla para su referencia.

imagen.png.35de1fe8016448efa23a89cb6cb3f9ef.png

 

Después de cambiar el texto de este botón, guarde el archivo y borre el caché de PrestaShop BO . Su texto actualizado se mostrará en la página del producto frontend.

Por favor, vea la captura de pantalla para su referencia: 

Código:

imagen.png.190f38d8c210ec9fe715ead780a220dc.png

Interfaz:

imagen.thumb.png.100f33b003650c429cc00c245cd03f28.png

 

Espero que esta solución funcione para usted.

Gracias.

 

Thank you very much for taking the time to help me. I did it and it worked perfectly.

 

Saludos,

Link to comment
Share on other sites

On 9/3/2023 at 9:46, endriu107 said:

Puede cambiar el texto usando la opción de traducción en BO, vaya a Internacional> Traducir> Traducir tema.

Thank you very much for your help. I couldn't translate the button because I didn't find where it is located. But I translated a lot of other things.

  • Like 1
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...