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

  • 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
  • Drupal 11 + Experience Builder (Canvas) + Layout Builder
  • Welche KI verwendet ihr?
  • Update Manger läst sich nicht Installieren
Weiter

Neue Kommentare

  • melde mich mal wieder, da ich
    vor 1 Woche 3 Tagen
  • Hey danke
    vor 1 Woche 3 Tagen
  • Update: jetzt gibt's ein
    vor 1 Woche 4 Tagen
  • Hallo, im Prinzip habe ich
    vor 2 Wochen 2 Tagen
  • Da scheint die Terminologie
    vor 2 Wochen 2 Tagen
  • Kannst doch auch alles direkt
    vor 2 Wochen 6 Tagen
  • In der entsprechenden View
    vor 2 Wochen 6 Tagen
  • Dazu müsstest Du vermutlich
    vor 2 Wochen 6 Tagen
  • gelöst
    vor 5 Wochen 2 Tagen
  • Ja natürlich. Dass ist etwas,
    vor 5 Wochen 3 Tagen

Statistik

Beiträge im Forum: 250233
Registrierte User: 20450

Neue User:

  • Mroppoofpaync
  • 4aficiona2
  • AppBuilder

» 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 16 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