nassim01 Posted August 9, 2024 Share Posted August 9, 2024 I'm working on a website which has 3 languages and the client wants to put 2 languages on the product name but they want each language to be on a separate line is there a solution for this? Link to comment Share on other sites More sharing options...
juanrojas Posted August 9, 2024 Share Posted August 9, 2024 Why do this and not just use the Prestashop multi-language option? On the other hand, if you manage to do it, it won't make much sense from an SEO perspective Link to comment Share on other sites More sharing options...
nassim01 Posted August 9, 2024 Author Share Posted August 9, 2024 (edited) yes I know but tell that to the client!!😅 I'm already working with the milti-langauge option for EN, FR and Ar but they want on the AR version to wright the name of the products in AR and EN so....🙄 Edited August 9, 2024 by nassim01 (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 12, 2024 Share Posted August 12, 2024 Disaster in term of SEO 😞 Link to comment Share on other sites More sharing options...
nassim01 Posted August 13, 2024 Author Share Posted August 13, 2024 any help with the topic is there a way to put <br> in a code or something to make the title 2 lines? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 13, 2024 Share Posted August 13, 2024 No way, impossible to add html code in product title, it's filtered in core. But if your idea is to put the product name in 2 languages, you can add a separator like | or $ or § and between each title, and with smarty code explode title in templates 😉 Link to comment Share on other sites More sharing options...
nassim01 Posted August 13, 2024 Author Share Posted August 13, 2024 please can you explain more? I'm not an expert in this Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 13, 2024 Share Posted August 13, 2024 il y a 21 minutes, nassim01 a dit : please can you explain more? I'm not an expert in this Look at Smarty documentation assign variable, explode php function... It's no longer support, it's free training 😉 Link to comment Share on other sites More sharing options...
nassim01 Posted August 13, 2024 Author Share Posted August 13, 2024 thank you a lot Link to comment Share on other sites More sharing options...
Mediacom87 Posted August 14, 2024 Share Posted August 14, 2024 Hi, In the /themes/classic/templates/catalog/product.tpl {block name='page_header_container'} {block name='page_header'} <h1 class="h1">{block name='page_title'}{$product.name}{/block}</h1> <div class="h2">{Product::getProductName($product.id, null, 1)}</div> {/block} {/block} The value 1 corresponds to the language ID to be displayed. 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