Post by CharmersVine99 » Sun Aug 30, 2015 3:11 am

I am using google feeds for sitemap generation. It makes a full sitemap, however it only uses "httpS:// for images, but not product links (uses http://). Therefore google webmaster tools does not have my product pages in its index.

Example:

Code: Select all

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>
http://www.mystorename.com/index.php?route=product/product&product_id=433
</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
<image:image>
<image:loc>
https://www.mystorename.com/image/cache/catalog/Jeans/Styles_Med_Wave_BKFL_N_fr-400x400.jpg
</image:loc>
<image:caption>Styles Medium Wave Back Flap</image:caption>
<image:title>Styles Medium Wave Back Flap</image:title>
</image:image>
</url>
<url>
<loc>
http://www.mystorename.com/index.php?route=product/product&product_id=417
</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
<image:image>
<image:loc>
https://www.mystorename.com/image/cache/catalog/Jeans/3_button_DK_wash_F-400x400.jpg
</image:loc>
<image:caption>Styles 3 Button Dark Wash Jean</image:caption>
<image:title>Styles 3 Button Dark Wash Jean</image:title>
</image:image>
</url>
<url>
<loc>
http://www.mystorename.com/index.php?route=product/product&product_id=416
</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
<image:image>
<image:loc>
https://www.mystorename.com/image/cache/catalog/Jeans/3_button_LT_wash_F-400x400.jpg
</image:loc>
<image:caption>Styles 3 Button Light Wash Jean</image:caption>
<image:title>Styles 3 Button Light Wash Jean</image:title>
</image:image>
</url>
I have "use SSL" enabled in store settings.

Note, also true for Google Base.

Please help!


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by deepvision » Sun Aug 30, 2015 12:27 pm

You can try to change HTTPS_SERVER to https:// in the root config.php

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by CharmersVine99 » Sun Sep 13, 2015 10:42 pm

That was already set:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.domain.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.domain.com/');

// DIR
define('DIR_APPLICATION', '/var/www/domain.com/public_html/catalog/');
define('DIR_SYSTEM', '/var/www/domain.com/public_html/system/');
define('DIR_LANGUAGE', '/var/www/domain.com/public_html/catalog/language/');
define('DIR_TEMPLATE', '/var/www/domain.com/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/var/www/domain.com/public_html/system/config/');
define('DIR_IMAGE', '/var/www/domain.com/public_html/image/');
define('DIR_CACHE', '/var/www/domain.com/public_html/system/cache/');
define('DIR_DOWNLOAD', '/var/www/domain.com/public_html/system/download/');
define('DIR_UPLOAD', '/var/www/domain.com/public_html/system/upload/');
define('DIR_MODIFICATION', '/var/www/domain.com/public_html/system/modification/');
define('DIR_LOGS', '/var/www/domain.com/public_html/system/logs/');
Any other ideas?


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by deepvision » Mon Sep 14, 2015 1:20 pm

There is probably a hardcoded HTTP_SERVER in the feeds controller.

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by CharmersVine99 » Tue Sep 15, 2015 8:00 am

Nothing in the /catalog/controller/feeds/google_sitemap.php:

Code: Select all

<?php
class ControllerFeedGoogleSitemap extends Controller {
	public function index() {
		if ($this->config->get('google_sitemap_status')) {
			$output  = '<?xml version="1.0" encoding="UTF-8"?>';
			$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';

			$this->load->model('catalog/product');
			$this->load->model('tool/image');

			$products = $this->model_catalog_product->getProducts();

			foreach ($products as $product) {
				if ($product['image']) {
					$output .= '<url>';
					$output .= '<loc>' . $this->url->link('product/product', 'product_id=' . $product['product_id']) . '</loc>';
					$output .= '<changefreq>weekly</changefreq>';
					$output .= '<priority>1.0</priority>';
					$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>';
				}
			}

			$this->load->model('catalog/category');

			$output .= $this->getCategories(0);

			$this->load->model('catalog/manufacturer');

			$manufacturers = $this->model_catalog_manufacturer->getManufacturers();

			foreach ($manufacturers as $manufacturer) {
				$output .= '<url>';
				$output .= '<loc>' . $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $manufacturer['manufacturer_id']) . '</loc>';
				$output .= '<changefreq>weekly</changefreq>';
				$output .= '<priority>0.7</priority>';
				$output .= '</url>';

				$products = $this->model_catalog_product->getProducts(array('filter_manufacturer_id' => $manufacturer['manufacturer_id']));

				foreach ($products as $product) {
					$output .= '<url>';
					$output .= '<loc>' . $this->url->link('product/product', 'manufacturer_id=' . $manufacturer['manufacturer_id'] . '&product_id=' . $product['product_id']) . '</loc>';
					$output .= '<changefreq>weekly</changefreq>';
					$output .= '<priority>1.0</priority>';
					$output .= '</url>';
				}
			}

			$this->load->model('catalog/information');

			$informations = $this->model_catalog_information->getInformations();

			foreach ($informations as $information) {
				$output .= '<url>';
				$output .= '<loc>' . $this->url->link('information/information', 'information_id=' . $information['information_id']) . '</loc>';
				$output .= '<changefreq>weekly</changefreq>';
				$output .= '<priority>0.5</priority>';
				$output .= '</url>';
			}

			$output .= '</urlset>';

			$this->response->addHeader('Content-Type: application/xml');
			$this->response->setOutput($output);
		}
	}

	protected function getCategories($parent_id, $current_path = '') {
		$output = '';

		$results = $this->model_catalog_category->getCategories($parent_id);

		foreach ($results as $result) {
			if (!$current_path) {
				$new_path = $result['category_id'];
			} else {
				$new_path = $current_path . '_' . $result['category_id'];
			}

			$output .= '<url>';
			$output .= '<loc>' . $this->url->link('product/category', 'path=' . $new_path) . '</loc>';
			$output .= '<changefreq>weekly</changefreq>';
			$output .= '<priority>0.7</priority>';
			$output .= '</url>';

			$products = $this->model_catalog_product->getProducts(array('filter_category_id' => $result['category_id']));

			foreach ($products as $product) {
				$output .= '<url>';
				$output .= '<loc>' . $this->url->link('product/product', 'path=' . $new_path . '&product_id=' . $product['product_id']) . '</loc>';
				$output .= '<changefreq>weekly</changefreq>';
				$output .= '<priority>1.0</priority>';
				$output .= '</url>';
			}

			$output .= $this->getCategories($result['category_id'], $new_path);
		}

		return $output;
	}
}
Hmmm, any other ideas? Or some other way to create a sitemap?
I want to use Google Webmaster tools data highlighter, but the product pages say they are not indexed in google.


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by balaji_svm » Tue Sep 15, 2015 11:57 am

Same. Feeds are sent to Google. sync status success. But do not see any Products. Any one has an answer?

Newbie

Posts

Joined
Tue Sep 15, 2015 11:27 am

Post by deepvision » Wed Sep 16, 2015 11:42 am

You can try to change it

Code: Select all

define('HTTP_SERVER', 'https://www.domain.com/');
[quote="CharmersVine99"]That was already set:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.domain.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.domain.com/');

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by CharmersVine99 » Fri Sep 18, 2015 4:07 am

Thank you deepvision!!!

I tried that once before, and it didn't seem to work. I tried it again, but this time I disabled google feeds and then re-enabled it, and it 'refreshed' the sitemap w/ https urls.

Thanks!


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by emadw » Sat Jun 10, 2017 9:59 am

Hello

i Just faced the same issue on a new launched site.
Sitemap where showing the Non https link for the catalog link while https for all other items like images.

The solution was simple,
1- Open your Config.xml
2- Make sure the HTTP_SERVER and HTTPs_SERVER both using httpS
example:
// HTTP
define('HTTP_SERVER', 'https://yoursite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://yoursite.com/');

do that and check your sitemap.xml.

Emad M.Alwari
DSTeck

Newbie

Posts

Joined
Mon Apr 29, 2013 4:26 am
Who is online

Users browsing this forum: No registered users and 5 guests