Party-Kollektion-de Posted March 20, 2012 Report Share Posted March 20, 2012 In der Anbindung zu Afterbuy über das afterbuy.php gibt es folgendes Problem: Ein Kunde Bestellt den Artikel mit der product_id 11507 (Artikelnummer 119412). mysql> select products_id, products_model from products where products_id = 11507; +-------------+----------------+ | products_id | products_model | +-------------+----------------+ | 11507 | 119412 | +-------------+----------------+ 1 row in set (0.00 sec) Dieser Artikel liegt in drei Größen vor mit den Artikelnummern 11941241 11941245 und 11941237: mysql> select * from products_attributes where products_id = 11507; +------------------------+-------------+------------+-------------------+----------------------+--------------+------------------+------------------+-----------------------+---------------+-----------+ | products_attributes_id | products_id | options_id | options_values_id | options_values_price | price_prefix | attributes_model | attributes_stock | options_values_weight | weight_prefix | sortorder | +------------------------+-------------+------------+-------------------+----------------------+--------------+------------------+------------------+-----------------------+---------------+-----------+ | 470 | 11507 | 1 | 28 | 0.0000 | + | 11941241 | -63 | 0.0000 | + | 2 | | 469 | 11507 | 1 | 29 | 0.0000 | + | 11941245 | -28 | 0.0000 | + | 3 | | 471 | 11507 | 1 | 27 | 0.0000 | + | 11941237 | -48 | 0.0000 | + | 1 | +------------------------+-------------+------------+-------------------+----------------------+--------------+------------------+------------------+-----------------------+---------------+-----------+ 3 rows in set (0.00 sec) Das Afterby Teil guckt in diese Tabellen aber nicht rein sondern nur in die orders_products und und orders_products_attributes da steht nur die Hauptartikelnummer drin. Dementsprechend finden sich im URL Aufruf an Afteruy nur die Artikelnummern 11507. Egal um welche Größe es sich handelt. Kundenerkennung=1 Action=new PartnerID=xxxxxxx PartnerPass=xxxxxx UserID=xxxxxxx Kbenutzername=xxxxxxxxx Kanrede=Frau KFirma=xxxxxxxxxxxxx KVorname=xxxxxxx KNachname=xxxxx KStrasse=xxxxxxxx KStrasse2= KPLZ=xxxxxxxxxx KOrt=xxxxxxxxxxxx KTelefonxxxxxxxxxxxxxxxxxx Kfax= Kemail=xxxxxxxxxxxxxxx KLand=DE KLFirma=xxxxxxxxxxxxxx KLVorname=xxxxxxxxxxxx KLNachname=xxxxxxxxxxxxxx KLStrasse=xxxxxxxxxxxxxxxx KLStrasse2= KLPLZ=xxxxxxxxxxxx KLOrt=Coburg KLLand=DE UsStID= VID=3724 CheckVID=1 Haendler=0 Lieferanschrift=0 Artikelerkennung=1 Artikelnr_1=119412 ArtikelStammID_1=119412 Artikelname_1=Biene%20Kostüm%20Bienchen%20Karneval%20Fasching ArtikelEPreis_1=24,99 ArtikelMwst_1=19,0000 ArtikelMenge_1=1 ArtikelLink_1=http://www.party-kollektion.de/product_info.php?products_id=11507 Attribute_1=Größe:40/42 Artikelnr_2=119412 ArtikelStammID_2=119412 Artikelname_2=Biene%20Kostüm%20Bienchen%20Karneval%20Fasching ArtikelEPreis_2=24,99 ArtikelMwst_2=19,0000 ArtikelMenge_2=1 ArtikelLink_2=http://www.party-kollektion.de/product_info.php?products_id=11507 Attribute_2=Größe:36/38 PosAnz=2 Versandkosten=4,5 kommentar= Versandart=Versandkosten%20nach%20Zonen%20 NoVersandCalc=1 Zahlart=Vorkasse/Überweisung NoFeedback=0 mysql> select * from orders_products where products_id=11507; +--------------------+-----------+-------------+----------------+------------------------------------------+----------------+------------------------+------------------------+-------------+--------------+-------------------+-----------+ | orders_products_id | orders_id | products_id | products_model | products_name | products_price | products_discount_made | products_shipping_time | final_price | products_tax | products_quantity | allow_tax | +--------------------+-----------+-------------+----------------+------------------------------------------+----------------+------------------------+------------------------+-------------+--------------+-------------------+-----------+ | 6292 | 3704 | 11507 | 119412 | Biene Kostüm Bienchen Karneval Fasching | 24.9900 | 0.00 | 2-3 Tage | 24.9900 | 19.0000 | 1 | 1 | | 6309 | 3714 | 11507 | 119412 | Biene Kostüm Bienchen Karneval Fasching | 24.9900 | 0.00 | 2-3 Tage | 24.9900 | 19.0000 | 1 | 1 | | 6310 | 3714 | 11507 | 119412 | Biene Kostüm Bienchen Karneval Fasching | 24.9900 | 0.00 | 2-3 Tage | 24.9900 | 19.0000 | 1 | 1 | | 6326 | 3724 | 11507 | 119412 | Biene Kostüm Bienchen Karneval Fasching | 24.9900 | 0.00 | 2-3 Tage | 24.9900 | 19.0000 | 1 | 1 | | 6327 | 3724 | 11507 | 119412 | Biene Kostüm Bienchen Karneval Fasching | 24.9900 | 0.00 | 2-3 Tage | 24.9900 | 19.0000 | 1 | 1 | +--------------------+-----------+-------------+----------------+------------------------------------------+----------------+------------------------+------------------------+-------------+--------------+-------------------+-----------+ 119 rows in set (0.00 sec) mysql> select * from orders_products_attributes where orders_id=3724; +-------------------------------+-----------+--------------------+------------------+-------------------------+----------------------+--------------+ | orders_products_attributes_id | orders_id | orders_products_id | products_options | products_options_values | options_values_price | price_prefix | +-------------------------------+-----------+--------------------+------------------+-------------------------+----------------------+--------------+ | 491 | 3724 | 6326 | Größe | 40/42 | 0.0000 | + | | 492 | 3724 | 6327 | Größe | 36/38 | 0.0000 | + | +-------------------------------+-----------+--------------------+------------------+-------------------------+----------------------+--------------+ 2 rows in set (0.00 sec) Gibt es für das Problem eine Lösung. Ansetzen muss man da wohl bei den Shop prozeduren die eine Bestellung in die Orders Tabellen ablegen. Link to comment Share on other sites More sharing options...
Jens Max Posted April 10, 2013 Report Share Posted April 10, 2013 Ich habe es in etwa so gelöst $a_query = xtc_db_query("SELECT * FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." WHERE orders_id='".$oID."' AND orders_products_id='".$pDATA['orders_products_id']."'"); while ($aDATA = xtc_db_fetch_array($a_query)) { $attribute_model = xtc_get_attributes_model($pDATA['products_id'], $aDATA['products_options_values'], $aDATA['products_options']); if ((int)$attribute_model >0) $artnr = $attribute_model; } $DATAstring .= "Artikelnr_".$nr."=".$artnr."&"; [/PHP] Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.