google site map
Posted: Sun Mar 08, 2015 5:17 am
google_sitemap.php
The code should look like this:
Code: Select all
foreach ($products as $product) {
if ($product['image']) {
Code: Select all
foreach ($products as $product) {
$output .= '<url>';
$output .= '<loc>' . $this->url->link('product/product', 'product_id=' . $product['product_id']) . '</loc>';
$output .= '<changefreq>weekly</changefreq>';
$output .= '<priority>1.0</priority>';
if ($product['image']) {
$output .= '<image:image>';
$output .= '<image:loc>' . $this->model_tool_image->resize($product['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')) . '</image:loc>';
$output .= '<image:caption>' . $product['name'] . '</image:caption>';
$output .= '<image:title>' . $product['name'] . '</image:title>';
$output .= '</image:image>';
}
$output .= '</url>';
}