Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2019
    Location
    Los Angeles
    Posts
    12
    Plugin Contributions
    0

    Default Editing generated product and category meta tags

    I'm trying to find where I can edit the generated title and description meta tags for products and categories so I can tweak it a bit.

    Is the only way to do this by editing includes/modules/meta_tags.php?

    If that's the only way, how would I be able to add top category name and define my own string to replace keywords here?

    define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . zen_clean_html($category_metatags->fields['categories_name']) . SECONDARY_SECTION . KEYWORDS));

  2. #2
    Join Date
    Jul 2012
    Posts
    14,576
    Plugin Contributions
    17

    Default Re: Editing generated product and category meta tags

    See includes/languages/english/meta_tags.php for help on how to setup a similar file in includes/languages/YOUR_LANGUAGE/YOUR_TEMPLATE/meta_tags.php

    The idea is that you place a copy of the original file in a template override directory so that it can be easier to perform upgrades in the future as the template being used does not get touched by the core files that get updated.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3
    Join Date
    Sep 2019
    Location
    Los Angeles
    Posts
    12
    Plugin Contributions
    0

    Default Re: Editing generated product and category meta tags

    Quote Originally Posted by mc12345678 View Post
    See includes/languages/english/meta_tags.php for help on how to setup a similar file in includes/languages/YOUR_LANGUAGE/YOUR_TEMPLATE/meta_tags.php

    The idea is that you place a copy of the original file in a template override directory so that it can be easier to perform upgrades in the future as the template being used does not get touched by the core files that get updated.
    I'm looking to do something similar to this: https://www.zen-cart.com/showthread....ory)-Meta-Tags

    Changing around how category titles and descrptions are generated.

    I don't really know how to make it use top category name or add my own string of text (containing numbers and special characters) so it could look like this:
    define('META_TAG_DESCRIPTION', str_replace('"','',Buy . TOP_CATEGORY_NAME . METATAGS_DIVIDER . zen_clean_html($category_metatags->fields['categories_name']) . METATAGS_DIVIDER . CUSTOM_STRING));

    I'm only trying to change how it's generated for categories and products, not sitewide or home page.
    If I manually set meta tags for 100 categories following a template, that's a huge amount of work if I want to change even 1 word after.

 

 

Similar Threads

  1. v151 Customized Product (and Category) Meta Tags
    By bobmeetin in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 13 Feb 2013, 06:52 PM
  2. v138a Bulk Editing Product Meta Tags
    By Psykryph in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 Mar 2012, 07:31 AM
  3. Meta Tags on Generated Pages
    By Kryspen in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Apr 2010, 11:13 AM
  4. Replies: 1
    Last Post: 27 Nov 2008, 02:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR