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

  • Drupal-Entwickler:in (m/w/d) – freiberuflich oder in Festanstellung, remote möglich
  • gepatchte PHP Version 7.4 für Windows
  • Canvas Palette: Eine fertige Komponentenbibliothek für Drupal Canvas
  • Hilfe zu Updates oder Composer
  • Vergleich Drupal und Contao
  • [geloest] Blocks in Bootstrap nebeneinander darstellen und nicht untereinander
  • DrupalCamp Frankfurt 27-28 November 2026
  • Bitte mein Bentzerkonto löschen
  • Beim Aufruf einiger Inhalte erhalte ich folgende Fehlermeldung
  • Neuinstallation: vermutlich ein rewrite-Problem
  • Drupal CMS installieren
  • [erledigt]MP3 in Drupal 10 einbinden
Weiter

Neue Kommentare

  • Muss ja nicht genau php 8.3 sein
    vor 4 Wochen 4 Tagen
  • Guten morgen und Danke
    vor 4 Wochen 4 Tagen
  • Evtl. versuchen auf PHP 8 zu wechseln
    vor 4 Wochen 4 Tagen
  • Danke Schmittrich. Die Frage
    vor 4 Wochen 6 Tagen
  • Keine Antwort auf die Frage nach dem Woher
    vor 4 Wochen 6 Tagen
  • Danke ich werde mir die
    vor 10 Wochen 4 Tagen
  • Vielen Dank für Ihren
    vor 10 Wochen 6 Tagen
  • Composer ist sehr ratsam
    vor 11 Wochen 1 Tag
  • Vielen Dank für den
    vor 11 Wochen 4 Tagen
  • Die alten CMS Vergleiche von contentmanager.de
    vor 11 Wochen 4 Tagen

Statistik

Beiträge im Forum: 250324
Registrierte User: 20579

Neue User:

  • Rogerloppy
  • markussolf
  • alxshell

» Alle User anzeigen

User nach Punkten sortiert:
wla9466
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3857
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