Ucuzu.com için feed oluşturdum Kategori gösteremiyorum

mahoni

OpenCart-TR
Katılım
2 Eyl 2010
Mesajlar
39
Tepkime puanı
0
Puanları
0
arkadaslar Latest Product rss modülü nün kod dosyasını düzenleyerek
http://forum.opencart-tr.com/thread-4149.html

http://www.medikalmarket.net/index.php?route=feed/latest_products_rss

bunu elde ettim ancak iki sorun var
1-Kategori ekleyemedim (kategoriyi dolduramadım)
2-Marka kısmını doldurmadım

open car 1.4.9.4 kullanıyorum. bir ürüne markayı nerden ekliyoruz?

bu 2 durumu doldurursam ucuzu.com için ürün beslemesi elde etmiş olacağım
 

eren.erduran

OpenCart-TR
Katılım
11 Ağu 2011
Mesajlar
169
Tepkime puanı
0
Puanları
0
Yaş
29
Konum
Tiran
Web sitesi
erenerduran.com
normalde ürünler > bağlantılardan marka ve kategori eklenebiliyor ama rss feedler php olarak yazıldığı için kodlamada hata olabilir. eğer rss nin php dosyasını yüklerseniz yardımcı olmaya çalışayım
 

mahoni

OpenCart-TR
Katılım
2 Eyl 2010
Mesajlar
39
Tepkime puanı
0
Puanları
0
kod cok uzun oolmadııgı için mesaj olarak yazayım dedim. düzenlediğim dosya bu. geri kalan "Latest Product rss modülü" nün aynısı.

PHP:
<?php

class ControllerFeedLatestProductsRSS extends Controller {

    public function index() {
	if ($this->config->get('latest_products_rss_status')) {

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

	    $limit = $this->config->get('latest_products_rss_limit') ? $this->config->get('latest_products_rss_limit') : 100;
	    $show_price = $this->config->get('latest_products_rss_show_price');
	    $show_date = $this->config->get('latest_products_rss_show_date');
	    $show_image = $this->config->get('latest_products_rss_show_image');
	    
	    if ($show_image) {
		$image_width = $this->config->get('latest_products_rss_image_width') ? $this->config->get('latest_products_rss_image_width') : 100;
		$image_height = $this->config->get('latest_products_rss_image_height') ? $this->config->get('latest_products_rss_image_height') : 100;
	    }

	    $products = $this->model_catalog_product->getLatestProducts($limit);

	    if (isset($this->request->get['currency'])) {
		$currency = $this->request->get['currency'];
	    } else {
		$currency = $this->currency->getCode();
	    }

	    $output = '<?xml version="1.0" encoding="UTF-8" ?>';
	    $output .= '<urunler>';
		// $output .= '<rss version="2.0">';
	    // $output .= '<channel>';
	    // $output .= '<title>' . $this->config->get('config_name') . '</title>';
	    // $output .= '<description>' . $this->config->get('config_meta_description') . '</description>';
	    // $output .= '<link>' . HTTP_SERVER . '</link>';

	    foreach ($products as $product) {
		if (true) {
			$output .= '<urun>';
		$output .= '<urun_kodu>'.$product['product_id'].'</urun_kodu>';
			$link = str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id']));
		$output .= '<url>'.$link.'</url>';
			$special = $this->model_catalog_product->getProductSpecial($product['product_id']);
			if ($special) {
			    $price = $this->currency->format($this->tax->calculate($special, $product['tax_class_id']), $currency, FALSE, TRUE);
			} else {
			    $price = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id']), $currency, FALSE, TRUE);
			}
		$output .= '<fiyat>'.$price.'</fiyat>';
		$output .= '<kategori>'.'</kategori>';
		$output .= '<resim>'.$image_url = $this->model_tool_image->resize($product['image'], $image_width, $image_height).'</resim>';
		$output .= '<isim>'.$product['name'].'</isim>';
		$output .= '<marka></marka>';
		$output .= '<tanim>'.'</tanim>';
		$output .= '<action_text></action_text>';
		$output .= '</urun>';    
		}
	    }
	    $output .= '</urunler>';
	    $this->response->addHeader('Content-Type: text/xml');
	    $this->response->setOutput($output, 0);
	}
    }

}

?>
 

TECHNOLOG

OpenCart-TR
Katılım
4 May 2010
Mesajlar
641
Tepkime puanı
0
Puanları
0
Yaş
37
Konum
Peygamberler Şehri
Web sitesi
www.edessaweb.com
bende bir zamanlar çok uğraşmıştım sizinki ile aynı olarak kategoriyi göstertememiştim. ama geçen forumda bi konu geçmişti bakalım onu uygulayacam inşallah olur.

bu arada size de kolay gelsin.
 

eren.erduran

OpenCart-TR
Katılım
11 Ağu 2011
Mesajlar
169
Tepkime puanı
0
Puanları
0
Yaş
29
Konum
Tiran
Web sitesi
erenerduran.com
Output ta kategori, tanım, marka ve actiontext boş.

sizin istediğiniz gibi kategori ve tanımı doldurdum. inş çalışır

hepsini silmeyin sadece

burayı

PHP:
$output .= '<fiyat>'.$price.'</fiyat>';
		$output .= '<kategori>'.'</kategori>';
		$output .= '<resim>'.$image_url = $this->model_tool_image->resize($product['image'], $image_width, $image_height).'</resim>';
		$output .= '<isim>'.$product['name'].'</isim>';
		$output .= '<marka></marka>';
		$output .= '<tanim>'.'</tanim>';
		$output .= '<action_text></action_text>';
		$output .= '</urun>';

bunun ile değiştirin

PHP:
<?php 
		$output .= '<fiyat>'.$price.'</fiyat>';
		$bul1 = mysql_query("select * from product_to_category where product_id='$product[product_id]'");
		$goster1 = mysql_fetch_array($bul1);
		$bul2  = mysql_query("select * from category_description where category_id='$goster1[category_id]'");
		$goster2 = mysql_fetch_array($bul2);
		$output .= '<kategori>'$goster2["name"].'</kategori>';
		$output .= '<resim>'.$image_url = $this->model_tool_image->resize($product['image'], $image_width, $image_height).'</resim>';
		$output .= '<isim>'.$product['name'].'</isim>';
		$output .= '<marka></marka>';
.		$bul = mysql_query("select * from product_description where product_id='$product[product_id]'");
		$goster = mysql_fetch_array($bul);
		$output .= '<tanim>'.$goster["description"].'</tanim>';
		$output .= '<action_text></action_text>';
		$output .= '</urun>'; 
		
	?>
 

mahoni

OpenCart-TR
Katılım
2 Eyl 2010
Mesajlar
39
Tepkime puanı
0
Puanları
0
teşekkür ederim aynı mantık ile de marka alannı doldururum sagolun
 

omertamer

OpenCart-TR
Katılım
18 Tem 2011
Mesajlar
6
Tepkime puanı
0
Puanları
0
Kod:
<?php

class ControllerFeedLatestProductsRSS extends Controller {

    public function index() {
	if ($this->config->get('latest_products_rss_status')) {

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

	    $limit = $this->config->get('latest_products_rss_limit') ? $this->config->get('latest_products_rss_limit') : 100;
	    $show_price = $this->config->get('latest_products_rss_show_price');
	    $show_date = $this->config->get('latest_products_rss_show_date');
	    $show_image = $this->config->get('latest_products_rss_show_image');
	    
	    if ($show_image) {
		$image_width = $this->config->get('latest_products_rss_image_width') ? $this->config->get('latest_products_rss_image_width') : 100;
		$image_height = $this->config->get('latest_products_rss_image_height') ? $this->config->get('latest_products_rss_image_height') : 100;
	    }

	    $products = $this->model_catalog_product->getLatestProducts($limit);

	    if (isset($this->request->get['currency'])) {
		$currency = $this->request->get['currency'];
	    } else {
		$currency = $this->currency->getCode();
	    }

	    $output = '<?xml version="1.0" encoding="UTF-8" ?>';
	    $output .= '<urunler>';
		// $output .= '<rss version="2.0">';
	    // $output .= '<channel>';
	    // $output .= '<title>' . $this->config->get('config_name') . '</title>';
	    // $output .= '<description>' . $this->config->get('config_meta_description') . '</description>';
	    // $output .= '<link>' . HTTP_SERVER . '</link>';

	    foreach ($products as $product) {
		if (true) {
			$output .= '<urun>';
		$output .= '<urun_kodu>'.$product['product_id'].'</urun_kodu>';
			$link = str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id']));
		$output .= '<url>'.$link.'</url>';
			$special = $this->model_catalog_product->getProductSpecial($product['product_id']);
			if ($special) {
			    $price = $this->currency->format($this->tax->calculate($special, $product['tax_class_id']), $currency, FALSE, TRUE);
			} else {
			    $price = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id']), $currency, FALSE, TRUE);
			}
		$output .= '<fiyat>'.$price.'</fiyat>';
		$bul1 = mysql_query("select * from product_to_category where product_id='$product[product_id]'");
		$goster1 = mysql_fetch_array($bul1);
		$bul2  = mysql_query("select * from category_description where category_id='$goster1[category_id]'");
		$goster2 = mysql_fetch_array($bul2);
		$output .= '<resim>'.$image_url = $this->model_tool_image->resize($product['image'], $image_width, $image_height).'</resim>';
		$output .= '<isim>'.$product['name'].'</isim>';
		$output .= '<marka></marka>';
.		$bul = mysql_query("select * from product_description where product_id='$product[product_id]'");
		$goster = mysql_fetch_array($bul);
		$output .= '<tanim>'.$goster["description"].'</tanim>';
		$output .= '<action_text></action_text>';
		$output .= '</urun>'; 
   
		}
	    }
	    $output .= '</urunler>';
	    $this->response->addHeader('Content-Type: text/xml');
	    $this->response->setOutput($output, 0);
	}
    }

}

?>

bende sizin dediğiniz şekilde yaptım ama 56 .satırda hata verdi kategori marka ve tanımı nasıl dolduyrabilirim bana yardımcı olacak bi arkadaş varmı acil lazım bu bana simdiiden teşekkür ederim [/php]

omertamer' Alıntı:
PHP:
<?php

class ControllerFeedLatestProductsRSS extends Controller {

    public function index() {
	if ($this->config->get('latest_products_rss_status')) {

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

	    $limit = $this->config->get('latest_products_rss_limit') ? $this->config->get('latest_products_rss_limit') : 100;
	    $show_price = $this->config->get('latest_products_rss_show_price');
	    $show_date = $this->config->get('latest_products_rss_show_date');
	    $show_image = $this->config->get('latest_products_rss_show_image');
	    
	    if ($show_image) {
		$image_width = $this->config->get('latest_products_rss_image_width') ? $this->config->get('latest_products_rss_image_width') : 100;
		$image_height = $this->config->get('latest_products_rss_image_height') ? $this->config->get('latest_products_rss_image_height') : 100;
	    }

	    $products = $this->model_catalog_product->getLatestProducts($limit);

	    if (isset($this->request->get['currency'])) {
		$currency = $this->request->get['currency'];
	    } else {
		$currency = $this->currency->getCode();
	    }

	    $output = '<?xml version="1.0" encoding="UTF-8" ?>';
	    $output .= '<urunler>';
		// $output .= '<rss version="2.0">';
	    // $output .= '<channel>';
	    // $output .= '<title>' . $this->config->get('config_name') . '</title>';
	    // $output .= '<description>' . $this->config->get('config_meta_description') . '</description>';
	    // $output .= '<link>' . HTTP_SERVER . '</link>';

	    foreach ($products as $product) {
		if (true) {
			$output .= '<urun>';
		$output .= '<urun_kodu>'.$product['product_id'].'</urun_kodu>';
			$link = str_replace('&', '&', $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id']));
		$output .= '<url>'.$link.'</url>';
			$special = $this->model_catalog_product->getProductSpecial($product['product_id']);
			if ($special) {
			    $price = $this->currency->format($this->tax->calculate($special, $product['tax_class_id']), $currency, FALSE, TRUE);
			} else {
			    $price = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id']), $currency, FALSE, TRUE);
			}
		$output .= '<fiyat>'.$price.'</fiyat>';
		$bul1 = mysql_query("select * from product_to_category where product_id='$product[product_id]'");
		$goster1 = mysql_fetch_array($bul1);
		$bul2  = mysql_query("select * from category_description where category_id='$goster1[category_id]'");
		$goster2 = mysql_fetch_array($bul2);
		$output .= '<resim>'.$image_url = $this->model_tool_image->resize($product['image'], $image_width, $image_height).'</resim>';
		$output .= '<isim>'.$product['name'].'</isim>';
		$output .= '<marka></marka>';
.		$bul = mysql_query("select * from product_description where product_id='$product[product_id]'");
		$goster = mysql_fetch_array($bul);
		$output .= '<tanim>'.$goster["description"].'</tanim>';
		$output .= '<action_text></action_text>';
		$output .= '</urun>'; 
   
		}
	    }
	    $output .= '</urunler>';
	    $this->response->addHeader('Content-Type: text/xml');
	    $this->response->setOutput($output, 0);
	}
    }

}

?>

bende sizin dediğiniz şekilde yaptım ama hata verdi kategori marka ve tanımı nasıl dolduyrabilirim bana yardımcı olacak bi arkadaş varmı acil lazım bu bana simdiiden teşekkür ederim
 

TECHNOLOG

OpenCart-TR
Katılım
4 May 2010
Mesajlar
641
Tepkime puanı
0
Puanları
0
Yaş
37
Konum
Peygamberler Şehri
Web sitesi
www.edessaweb.com
opencart 15x versiyonları için geçen hafta yapmıştım. bi de 149x e uyarlamak kaldı.
iletişime geçerek ucuzu.com besleme modülünü sahip olabilirsiniz.
 
Üst