Miniwheels-online_com Posted January 14, 2014 Share Posted January 14, 2014 Hi, I hope someone can help me with this because I am trying to get the reference data added to the meta description field in the head of the product-page. Now: <head><title>Railballast 500 gram Berka</title><meta name="description" content="Railballast 500 gram Berka" /> Wanted: <head><title>BE7011 Railballast 500 gram Berka</title><meta name="description" content="BE7011 Railballast 500 gram Berka" /> How can I get this? Thanks in advance! Using PS 1.5.4.1 multi language and multi store. Link to comment Share on other sites More sharing options...
NemoPS Posted January 15, 2014 Share Posted January 15, 2014 You must edit the Meta class. start by having a look at getProductMetas($id_product, $id_lang, $page_name) You can add the reference field there, then modify CompleteMetaTags() Link to comment Share on other sites More sharing options...
vekia Posted January 15, 2014 Share Posted January 15, 2014 just wondering why not to edit just header.tpl file add there code: {if $product}{$product->reference}{/if} something like: <title>{if $product}{$product->reference}{/if}{$meta_title|escape:'htmlall':'UTF-8'}</title> {if isset($meta_description) AND $meta_description} <meta name="description" content="{if $product}{$product->reference}{/if} {$meta_description|escape:html:'UTF-8'}" /> {/if} will work, im using it in several shops 1 Link to comment Share on other sites More sharing options...
Siku73 Posted August 11, 2014 Share Posted August 11, 2014 Top! It works, thank you both for your input. Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2014 Share Posted August 11, 2014 it's worth to check also if reference field exists {if $product}{if $product->reference}{$product->reference}{/if}{/if} 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