Page 1 of 1

google site map

Posted: Sun Mar 08, 2015 5:17 am
by chulcha
google_sitemap.php

Code: Select all

foreach ($products as $product) {
				if ($product['image']) {
The code should look like this:

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>';
			}

Re: google site map

Posted: Wed Mar 11, 2015 6:41 pm
by Venkko
Just to start conversation for this topic as the topic affects something I find intresting...
Why should it look like that?

Ps. You know you can write little argument for your posts, they may help us all (= those who are not coders or developers)

Re: google site map

Posted: Wed Mar 11, 2015 7:07 pm
by chulcha
The product may not have the image? Is not it?

In the source code of the product does not included into the site map if you do not have to be the main image.
Indexing images is not a mandatory part of SEO.
Indexing images is an optional part of SEO.