wtd000 Posted March 8, 2023 Share Posted March 8, 2023 "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." Link to comment Share on other sites More sharing options...
WebDesk Solution Posted March 9, 2023 Share Posted March 9, 2023 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. 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: Front-end: I hope this solution will work for you. Thanks. Link to comment Share on other sites More sharing options...
endriu107 Posted March 9, 2023 Share Posted March 9, 2023 You can change it text by using translate option in BO, go to International > Translate > Theme translate. Link to comment Share on other sites More sharing options...
wtd000 Posted March 10, 2023 Author Share Posted March 10, 2023 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. 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: Interfaz: 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 More sharing options...
wtd000 Posted March 10, 2023 Author Share Posted March 10, 2023 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now