Startseite
  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche
Startseite › Forum › Drupalcenter.de › Module ›

uc_google_base erweiterung für uebercart liefert 403 forbidden

Eingetragen von flomotion (1)
am 13.01.2010 - 18:52 Uhr in
  • Module
  • Drupal 5.x oder neuer

Hi Leute,

in meinen uebercart-shop habe ich die Erweiterung uc_google_base integriert um die Produkte auch an Google Base übermitteln zu können.
Solange ich eingeloggt bin, erhalte ich über den Pfad http://www.meine-seite.de/products/google_base.xml einen gut funktionierenden Feed.
Sobald ich aber ausgeloggt bin, dann erhalte ich beim aufruf ein 403 Forbidden für diese Seite.

Hat jemand ne Idee was ich da einstellen muss? In den Userrollen finde ich kein Feld um uc_google_base zu aktivieren.

Hier habe ich mal den Erweiterungscode:

<?php

/**
* Implementation of hook_menu().
*/
function uc_google_base_menu($may_cache) {
 
$items = array();

  if (
$may_cache) {
       
$items[] = array(
     
'path' => 'admin/store/settings/google_base',
     
'title' => t('Google Base Feed'),
     
'callback' => 'drupal_get_form',
     
'callback arguments' => array('uc_google_base_settings_form'),
     
'access' => user_access('administer store'),
           
'description' => t('Configure the google base feed settings')
    );
   
$items[] = array(
     
'path' => 'products/google_base.xml',
     
'title' => t('Google Base RSS Feed'),
     
'description' => t('Export of products in RSS for Google Base'),
     
'callback' => 'uc_google_base',
     
'type' => MENU_CALLBACK,
    );
  }

  return
$items;
}

/**
* Define the admin settings form
*/
function uc_google_base_settings_form() {
   
$form['google_base_feed_title'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Title'),
       
'#default_value' => variable_get('google_base_feed_title', 'My Google Base RSS Feed'),
    );
   
$form['google_base_feed_description'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Description'),
       
'#default_value' => variable_get('google_base_feed_description', 'My Google Base RSS Feed Description'),
    );
   
$form['google_base_feed_link'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Link'),
       
'#default_value' => variable_get('google_base_feed_link', $GLOBALS['base_url']),
    );
    return
system_settings_form($form);
}


/**
* Create the google base feed
*/
function uc_google_base() {
 
$output = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
\n";
  $output .= "\n";
  $output .= "<rss version =\"2.0\" xmlns:g=\"http://base.google.com/ns/1.0\">\n";
  $output .= "\n";
  $output .= "<channel>\n";
  $output .= "\t<title>" . variable_get('google_base_feed_title', 'My Google Base RSS Feed') . "</title>\n";
  $output .= "\t<description>" . variable_get('google_base_feed_description', 'My Google Base RSS Feed Description') . "</description>\n";
  $output .= "\t<link>" . variable_get('google_base_feed_link', $GLOBALS['base_url']) . "</link>\n";
  $output .= "\n";

// Get active products
  $result = db_query("select node.nid from {uc_products} inner join {node} on uc_products.vid = node.vid where node.status = 1");
  while ($node = db_fetch_object($result)){
    $product = node_load($node->nid);
// Grab terms for products
    $terms = array();
    foreach ($product->taxonomy as $term) {
     $ancestors = taxonomy_get_parents_all($term->tid);
     foreach ($ancestors as $ancestor) {
       $terms[] = $ancestor->name;
     }
    }

// Build google base rss
$output .= "<item>\n";
    $output .= "<title>" . check_plain($product->title) . "</title>\n";
    $output .= "<g:department>" . check_plain(implode(', ', $terms)) . "</g:department>\n";
    $output .= "<description>" . check_plain($product->body) . "</description>\n";
    $output .= "<guid>" . htmlentities($product->model) . "</guid>\n";
    if (isset($product->field_image_cache) && file_exists($product->field_image_cache[0]['filepath'])){
      $output .= "<g:image_link>" . $GLOBALS['base_url'] .'/'. ($product->field_image_cache[0]['filepath']) . "</g:image_link>\n";
    }
    $output .= "<link>" . $GLOBALS['base_url'] . '/' . $product->path . "</link>\n";
    $output .= "<g:price>" . $product->sell_price . "</g:price>\n";
    $output .= "<g:product_type>" . check_plain(implode(',', $terms)) . "</g:product_type>\n";
    $output .= "<g:mpn>" . htmlentities($product->model) . "</g:mpn>\n";
    $output .= "<g:upc>000000000000</g:upc>\n";
    $output .= "</item>\n";
$output .= "\n";
  }

  $output .= "</channel>\n";
  $output .= "</rss>";
 
  drupal_set_header('Content-Type: application/xml');
  print($output);
  module_invoke_all('exit');
}

‹ Nervige Links entfernen [gelöst] Tutorial zu User Profil Panel gesucht ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

Hallo flomotion Der Fehler

Eingetragen von 1kubik (903)
am 14.01.2010 - 17:44 Uhr

Hallo flomotion

Der Fehler 403 ein Serverfehler
und wird zb von einer falsch konfigurierte htaccess Datei erzeugt
zb wegen falscher Pfade

hast du Zugriff auf die Error Log von Deinem Server?

  • Anmelden oder Registrieren um Kommentare zu schreiben

Benutzeranmeldung

  • Registrieren
  • Neues Passwort anfordern

Aktive Forenthemen

  • Seite auf Xamp wird nicht geladen
  • [simplenews_stats] [D10] Keine Öffnungen/Ansichten der Newsletter werden gezählt
  • Theme Olivero - Rand entfernen?
  • Olivero veraendern
  • Upgrade Drupal 9 auf 10
  • Matomo(?) in Seite, aber Deinstalliert!
  • Upgrade Drupal 7 auf Drupal 9 / Inhalt erstellen zeigt nur Fehler an
  • Fehlermeldung nach Update auf Drupal 10
  • Wie Button erstellen?
  • footnotes bei D10 und CKE5
  • ckeditor Bilder skalieren
  • Bild in welcher Form die Beschriftung!
Weiter

Neue Kommentare

  • Wie plötzlich passierte
    vor 15 Stunden 15 Minuten
  • Sowas geht immer mit
    vor 2 Tagen 14 Stunden
  • vielen Dank fuer Deine Tipps.
    vor 2 Tagen 20 Stunden
  • Routinefrage: Kann es ein
    vor 3 Tagen 15 Stunden
  • @onkel Bob,Erst mal
    vor 1 Woche 3 Tagen
  • Prinzipiell geht das schon.
    vor 1 Woche 3 Tagen
  • Rubi_2021 schriebWie genau
    vor 2 Wochen 2 Tagen
  • Ok, war ein Versuch. ;-) Kann
    vor 2 Wochen 2 Tagen
  • Danke
    vor 2 Wochen 2 Tagen
  • Redest Du von dem
    vor 2 Wochen 2 Tagen

Statistik

Beiträge im Forum: 248803
Registrierte User: 19834

Neue User:

  • elkb
  • J. Berten
  • vohome

» Alle User anzeigen

User nach Punkten sortiert:
wla9333
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3845
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 7 Gäste online.

Hauptmenü

  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche

Quicklinks I

  • Infos
  • Drupal Showcase
  • Installation
  • Update
  • Forum
  • Team
  • Verhaltensregeln

Quicklinks II

  • Drupal Jobs
  • FAQ
  • Drupal-Kochbuch
  • Best Practice - Drupal Sites - Guidelines
  • Drupal How To's

Quicklinks III

  • Tipps & Tricks
  • Drupal Theme System
  • Theme Handbuch
  • Leitfaden zur Entwicklung von Modulen

RSS & Twitter

  • Drupal Planet deutsch
  • RSS Feed News
  • RSS Feed Planet
  • Twitter Drupalcenter
Drupalcenter Team | Impressum & Datenschutz | Kontakt
Angetrieben von Drupal | Drupal is a registered trademark of Dries Buytaert.
Drupal Initiative - Drupal Association