N
N
Nikita2018-11-19 16:46:13
Search Engine Optimization
Nikita, 2018-11-19 16:46:13

How to add last modified to OpenCart 1.5 sitemap?

Hello! I saw that there is no lastmod tag in the google_sitemap.php sitemap. How can it be added there? I didn’t find any plugins, the advice to add a date that is formed when creating a sitemap is not suitable:

$output .= '<lastmod>' . date('c',time()) . '</lastmod>';

In this form, what's the point of adding it. You need exactly the date of the last change of the product and category. So that search engines scan first of all exactly those links that have recently been updated. If anyone has solved this issue, please share. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2018-11-20
@MrNix21

Products and categories have a date_modified column.
They should be available in a loop:

$product['date_modified'] // в цикле вывода товаров
$result['date_modified'] // в цикле вывода категорий

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question