Zurück   xt:Commerce Webshop Shop Support > xt:Commerce Shopsoftware Community Area > Installation und Konfiguration

Antwort
 
LinkBack Themen-Optionen Ansicht
  #1 (permalink)  
Alt 31.10.2006, 03:13
xt:C Sponsor
 
Registriert seit: 25.10.2006
Beiträge: 28
Standard Hersteller anzeigen in der product_listing.html

Hallo,

ich habe mich hier bereits durch einige Beiträge gekämpft, aber leider habe ich es bisher nicht hingekriegt: Ich möchte auf der product_listing.html einfach zu jedem Produkt den entsprechenden Hersteller anzeigen lassen. Wie schaffe ich das?

Danke für Eure Hilfe!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 31.10.2006, 19:41
xt:Commerce Support Kunde
 
Registriert seit: 24.09.2005
Beiträge: 1.596
Standard

Hi cv278,

da musst Du in der /includes/classes/product.php (V3.04 SP2.1) die Funktion "buildDataArray" um den Eintrag für den Hersteller ergänzen.

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 01.11.2006, 08:30
Erfahrener Benutzer
 
Registriert seit: 13.09.2006
Ort: Berlin
Beiträge: 744
Standard

Um Fragen wie "wie dann" zu vermeiden!:

products.php im function BuildDataArray folgendes einfügen

$manufacturers_id = $array['manufacturers_id'];
$manufacturers_query = xtc_db_query("select manufacturers_name from ".TABLE_MANUFACTURERS." where manufacturers_id = '".$manufacturers_id."'");
$manufacturers_array = xtc_db_fetch_array($manufacturers_query);

$module_content[] = array ('PRODUCTS_NAME' => $listing['products_name'],

........


'MANUFACTURERS_NAME' => $manufacturers_array['manufacturers_name'],

----------------------------------------------------

Ich weiß, dass es sicherlich bessere Abfrage Methoden gibt (Join etc.) aber...

T
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 01.11.2006, 17:19
xt:C Sponsor
 
Registriert seit: 25.10.2006
Beiträge: 28
Standard

Danke Euch beiden schin einmal. Aber sorry, ich glaube, da überschätzt ihr meine PHP-Kenntnisse

Also, ich habe in folgendes gemacht:

PHP-Code:
    function buildDataArray(&$array,$image='thumbnail') {
        global 
$xtPrice,$main;

            
$tax_rate $xtPrice->TAX[$array['products_tax_class_id']];

            
$products_price $xtPrice->xtcGetPrice($array['products_id'], $format true1$array['products_tax_class_id'], $array['products_price'], 1);

            if (
$_SESSION['customers_status']['customers_status_show_price'] != '0') {
            if (
$_SESSION['customers_status']['customers_fsk18'] == '1') {
                if (
$array['products_fsk18'] == '0')
                    
$buy_now $this->getBuyNowButton($array['products_id'], $array['products_name']);
            
            } else {
                
$buy_now $this->getBuyNowButton($array['products_id'], $array['products_name']);
            }
            }
            

        
            
$shipping_status_name $main->getShippingStatusName($array['products_shippingtime']);
            
$shipping_status_image $main->getShippingStatusImage($array['products_shippingtime']);


        
$manufacturers_id $array['manufacturers_id'];
$manufacturers_query xtc_db_query("select manufacturers_name from ".TABLE_MANUFACTURERS." where manufacturers_id = '".$manufacturers_id."'");
$manufacturers_array xtc_db_fetch_array($manufacturers_query);

$module_content[] = array ('PRODUCTS_NAME' => $listing['products_name'], 
        



        return array (
'PRODUCTS_NAME' => $array['products_name'], 
                
'COUNT'=>$array['ID'],
                
'PRODUCTS_ID'=>$array['products_id'],
                
'PRODUCTS_VPE' => $this->getVPEtext($array$products_price['plain']), 
                
'PRODUCTS_IMAGE' => $this->productImage($array['products_image'], $image), 
                
'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFOxtc_product_link($array['products_id'], $array['products_name'])), 
                
'PRODUCTS_PRICE' => $products_price['formated'], 
                
'PRODUCTS_TAX_INFO' => $main->getTaxInfo($tax_rate), 
                
'PRODUCTS_SHIPPING_LINK' => $main->getShippingLink(), 
                
'PRODUCTS_BUTTON_BUY_NOW' => $buy_now,
                
'PRODUCTS_SHIPPING_NAME'=>$shipping_status_name,
                
'PRODUCTS_SHIPPING_IMAGE'=>$shipping_status_image
                
'PRODUCTS_DESCRIPTION' => $array['products_description'],
                
'PRODUCTS_EXPIRES' => $array['expires_date'],
                
'PRODUCTS_CATEGORY_URL'=>$array['cat_url'],
                
'PRODUCTS_SHORT_DESCRIPTION' => $array['products_short_description'], 
                
'PRODUCTS_FSK18' => $array['products_fsk18']),

'MANUFACTURERS_NAME' => $manufacturers_array['manufacturers_name'];        
                

    } 
Da bekomme ich leider folgende Fehlermeldung:

Parse error: syntax error, unexpected T_RETURN, expecting ')' in /www/htdocs/w00764a7/limitees/includes/classes/product.php on line 400


Was habe ich falsch gemacht? Nochmal zum Verständnis: Ich rufe den Herstellernamen dann in meiner product_listing.html einfach über den MANUFACTURERS_NAME auf, richtig?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 01.11.2006, 19:20
Benutzerbild von techway
Erfahrener Benutzer
 
Registriert seit: 06.12.2003
Beiträge: 800
Standard

diese zeile ist zuviel:
PHP-Code:
$module_content[] = array ('PRODUCTS_NAME' => $listing['products_name'], 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 03.11.2006, 17:31
xt:C Sponsor
 
Registriert seit: 25.10.2006
Beiträge: 28
Standard

Nein, klappt leider immer noch nicht, der selbe PHP-Fehler...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 03.11.2006, 17:53
Erfahrener Benutzer
 
Registriert seit: 13.09.2006
Ort: Berlin
Beiträge: 744
Standard

basic stuff here:

Falsch

'PRODUCTS_SHORT_DESCRIPTION' => $array['products_short_description'],
'PRODUCTS_FSK18' => $array['products_fsk18']),

'MANUFACTURERS_NAME' => $manufacturers_array['manufacturers_name'];

Richtig:

'PRODUCTS_SHORT_DESCRIPTION' => $array['products_short_description'],
'PRODUCTS_FSK18' => $array['products_fsk18'],

'MANUFACTURERS_NAME' => $manufacturers_array['manufacturers_name']),
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 03.11.2006, 18:00
xt:C Sponsor
 
Registriert seit: 05.04.2006
Beiträge: 166
Standard

Am Ende war das noch Zeile 400 wo ein ")" erwartet wurde ;-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 03.11.2006, 18:03
xt:C Sponsor
 
Registriert seit: 05.04.2006
Beiträge: 166
Standard

Der Vollständigkeit halber



'PRODUCTS_SHORT_DESCRIPTION' => $array['products_short_description'],
'PRODUCTS_FSK18' => $array['products_fsk18'],

'MANUFACTURERS_NAME' => $manufacturers_array['manufacturers_name']); <-------- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 03.11.2006, 18:57
xt:C Sponsor
 
Registriert seit: 25.10.2006
Beiträge: 28
Standard

Wahnsinn, hat geklappt!!
Vielen Dank Euch allen für den klasse Support!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
anzeigen, hersteller, productlistinghtml

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 10:51 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand