Post by i2Paq » Mon Jun 14, 2010 8:16 pm

Support for IE6 by Microsoft has stopped, so we did to.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by gergovprint » Mon Jun 14, 2010 9:16 pm

i2Paq wrote:Support for IE6 by Microsoft has stopped, so we did to.
.. Yes, but there is some people with old browsers, ........but there are people still using IE6

метални табели отпечатване на флаери отпечатване на винил отпечатване на плакати


New member

Posts

Joined
Wed Apr 28, 2010 10:03 pm


Post by ichko » Wed Dec 15, 2010 3:33 am

Qphoria wrote:Yes, the google sitemap is a bug and I just fixed it for the next version.

To Fix now:
1. EDIT: catalog/controller/feed/google_sitemap.php

2. SELECT ALL AND DELETE

3. PASTE THIS INSTEAD:

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">';
			
			$this->load->model('tool/seo_url');
			
			$this->load->model('catalog/product');
			
			$products = $this->model_catalog_product->getProducts();
			
			foreach ($products as $product) {
				$output .= '<url>';
				$output .= '<loc>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id'])) . '</loc>';
				$output .= '<changefreq>weekly</changefreq>';
				$output .= '<priority>1.0</priority>';
				$output .= '</url>';	
			}
			
			$this->load->model('catalog/category');
			
			$categories = $this->model_catalog_category->getCategories();
			
			$output .= $this->getCategories(0);
			
			$this->load->model('catalog/manufacturer');
			
			$manufacturers = $this->model_catalog_manufacturer->getManufacturers();
			
			foreach ($manufacturers as $manufacturer) {
				$output .= '<url>';
				$output .= '<loc>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $manufacturer['manufacturer_id'])) . '</loc>';
				$output .= '<changefreq>weekly</changefreq>';
				$output .= '<priority>0.7</priority>';
				$output .= '</url>';	
				
				$products = $this->model_catalog_product->getProductsByManufacturerId($manufacturer['manufacturer_id']);
				
				foreach ($products as $product) {
					$output .= '<url>';
					$output .= '<loc>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=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>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/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>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $new_path)) . '</loc>';
			$output .= '<changefreq>weekly</changefreq>';
			$output .= '<priority>0.7</priority>';
			$output .= '</url>';			

			$products = $this->model_catalog_product->getProductsByCategoryId($result['category_id']);
			
			foreach ($products as $product) {
				$output .= '<url>';
				$output .= '<loc>' . str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=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;
	}		
}
?>
How are you Qphoria!
sorry to disturb you but i'm having the same problem with OC 1.4.9.1 http://forum.opencart.com/viewtopic.php?f=20&t=23608 I've tried your method but google still giving me the parsing error.
Any help will be appreciate!

New member

Posts

Joined
Tue Nov 30, 2010 4:27 am

Post by fortheperfectyou » Fri Nov 22, 2013 2:08 pm

i2Paq wrote:
ufoss wrote: When i try to delete original shop give error.
Warning: This Store cannot be deleted as it is currently assigned to 9 orders!
This is normal behavior.


i am having the same issue but i have the latest open cart, any help thanks

User avatar

Posts

Joined
Fri Nov 22, 2013 10:25 am


Post by i2Paq » Fri Nov 22, 2013 6:16 pm

fortheperfectyou wrote:
i2Paq wrote:
ufoss wrote: When i try to delete original shop give error.
Warning: This Store cannot be deleted as it is currently assigned to 9 orders!
This is normal behavior.
i am having the same issue but i have the latest open cart, any help thanks
Have you read what I write?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands
Who is online

Users browsing this forum: No registered users and 23 guests