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 - 17: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 - 16: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

  • Ich brauche dringen Hilfe zu Updates oder ggf. wwie geht Composer?
  • Rolle erstellen nicht zu finden
  • Medien und andere Daten mit Feeds von Drupal 7 auf Drupal 10 migrieren
  • für drupal11 ein Slider Modul
  • [gelöst] W3CSS Paragraphs Views
  • Drupal 11 neu aufsetzen und Bereiche aus 10 importieren
  • Wie erlaubt man neuen Benutzern auf die Resetseite zugreifen zu dürfen.
  • [gelöst] Anzeigeformat Text mit Bild in einem Artikel, Drupal 11
  • Social Media Buttons um Insteragram erweitern
  • Nach Installation der neuesten D10-Version kein Zugriff auf Website
  • Composer nach Umzug
  • [gelöst] Taxonomie Begriffe zeigt nicht alle Nodes an
Weiter

Neue Kommentare

  • Keiner der mir weiterhelfen
    vor 5 Stunden 14 Minuten
  • Rollen
    vor 6 Tagen 8 Stunden
  • Inzwischen sind wir bei
    vor 2 Wochen 3 Tagen
  • Migrieren von D7 auf D8/ D10/ D11
    vor 2 Wochen 3 Tagen
  • melde mich mal wieder, da ich
    vor 10 Wochen 21 Stunden
  • Hey danke
    vor 10 Wochen 1 Tag
  • Update: jetzt gibt's ein
    vor 10 Wochen 2 Tagen
  • Hallo, im Prinzip habe ich
    vor 10 Wochen 6 Tagen
  • Da scheint die Terminologie
    vor 10 Wochen 6 Tagen
  • Kannst doch auch alles direkt
    vor 11 Wochen 4 Tagen

Statistik

Beiträge im Forum: 250239
Registrierte User: 20467

Neue User:

  • StevenEness
  • ocvk2810
  • marouane.blel

» Alle User anzeigen

User nach Punkten sortiert:
wla9461
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3857
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 82 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