Post by chulcha » Sun Mar 08, 2015 5:17 am

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

Active Member

Posts

Joined
Fri Jul 18, 2014 4:39 pm

Post by Venkko » Wed Mar 11, 2015 6:41 pm

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)

http://www.pikkukoala.fi


Active Member

Posts

Joined
Mon Mar 05, 2012 8:32 pm

Post by chulcha » Wed Mar 11, 2015 7:07 pm

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.

Active Member

Posts

Joined
Fri Jul 18, 2014 4:39 pm
Who is online

Users browsing this forum: No registered users and 10 guests