DagCardella Posted November 18, 2020 Share Posted November 18, 2020 Hello, i'm using a management software to export all of my products before I can upload them to Prestashop: since the title are getting wiped out at every upload (I know I can just ignore the title column, but I work for a pharmacy and products are constatly changing, so I add a lot of them every time) I'm using the meta tag. The product names from the management are ugly as hell (it's a kind of conventional code of abbreviation for pharmacies, where, for instance, "pills" are "PLL"): is there a way to let the customers display the meta title in place of the ugly product name? I attached a screenshot with highlighted ugly title and meta title (as under <head>) I already got the "meta title" written in its location, I just need prestashop frontend to display that instead of the product name... but when I analyzed the product page I found that there are two <title> tag, one in the head section (that's the meta title, which is what I want my customers to see) and the other one in the body section (the ugly one, but that I can't get rid of because it's automatically imported each time I run the cvs upload) Link to comment Share on other sites More sharing options...
DagCardella Posted November 18, 2020 Author Share Posted November 18, 2020 (edited) I edited in themes/"my theme"/templates/catalog/ the product.tpl file: at line 81 I changed <h1 class="h1 namne_details" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1> to <h1 class="h1 namne_details" itemprop="name">{block name='page_title'}{$page.meta.title}{/block}</h1> This worked for all the titles! Do you have any ideas about where to put my hands on for product names in search and related/same category boxes? Edited November 18, 2020 by DagCardella added screenshots (see edit history) 1 Link to comment Share on other sites More sharing options...
DagCardella Posted November 19, 2020 Author Share Posted November 19, 2020 I found in dbprefix_product_lang the two columns that I think need for this: they're "name" and "meta_title": but I can't find where to say to prestashop that it has to take the information from "meta_title" and not from "name" in those instances. Can someone just pointing me where to look at? I searched in a lot ot tpl and php files to no avail... 1 Link to comment Share on other sites More sharing options...
DagCardella Posted December 1, 2020 Author Share Posted December 1, 2020 EDIT: I managed to change every title aside from the ones found in search box with this mod in public_html/themes/mytheme/templates/catalog/_partials/miniatures/product.tpl: I went from: {block name='product_name'} <h4><a href="{$product.url}" title="{$product.name}" itemprop="name" class="product_name">{$product.name}</a></h4> {/block} to {block name='product_name'} <h4><a href="{$product.url}" title="{$product.meta_title}" itemprop="name" class="product_name">{$product.meta_title}</a></h4> {/block} My question yet is still the same: Where do I look for search box titles? 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