Schönen guten Tag, ich habe ein Problem was ich momentan nicht lösen kann. Vielleicht kann mir hier jemand helfen. Es geht um die Session['cart']. Ich bräuchte die Attribute zum Artikel ab checkout_shipping.php. Leider finde ich momentan keine Lösung wie ich an die Attribute ran komme von den Artikeln. Zwar komm ich mit $_SESSION['cart']->get_products(), an die Produkte, aber nicht an die Attribute. Mir würde auch die Komplette Artikelnummer mit zusammen der Attribute Art-Nr reichen. Hätte da jemand eine Lösung oder eine Info dazu?
Doch, klar. Array, das von get_products() geliefert wird: Code: Array ( [1] => Array ( [id] => 3{1}1{2}3 [name] => Attributartikel [checkout_information] => [model] => ATTR [image] => brot.jpg [price] => 26 [vpe] => [quantity] => 1 [weight] => 0.3500 [shipping_time] => ca. 3-4 Tage oder so [final_price] => 26 [tax_class_id] => 1 [quantity_unit_id] => [unit_name] => [attributes] => Array ( [1] => 1 [2] => 3 ) [product_type] => 1 ) ) Da sind die Attribute gleich mehrfach drin. Einmal explizit in dem attributes-Array und einmal in der id, jeweils als Abbildung von options_id auf option_values_id.
Also wenn ich ein Artikel in den Warenkorb lege mit 3 verschiedenen Eigenschaft bekomme ich folgendes Array zurück. Code: array(1) { [0]=> array(16) { ["id"]=> string(6) "81x740" ["name"]=> string(13) "Fitnesswochen" ["checkout_information"]=> string(0) "" ["model"]=> string(14) "025_000G" ["image"]=> string(11) "fwochen.png" ["price"]=> float(41.9) ["vpe"]=> NULL ["quantity"]=> int(1) ["weight"]=> string(6) "0.0000" ["shipping_time"]=> NULL ["final_price"]=> float(41.9) ["tax_class_id"]=> string(1) "1" ["quantity_unit_id"]=> NULL ["unit_name"]=> NULL ["attributes"]=> NULL ["product_type"]=> string(1) "1" } } attributes sind hier dann leer Artikel im Warenkorb : Einzelpreis: 41,90 EUR Gutscheinart: Druck-PDF Wochen: 1 Woche Option: Fitness
Ist auch logisch, wenn du Eigenschaften verwendest und nicht Attribute, wie du eingangs geschrieben hattest. An die Eigenschaften kommst du aber auch über die ID ran, „81x740“ bedeutet „products_id 81 und products_properties_combis_id 740“.
Ah super Vielen Dank . Mein Fehler, Dachte erst, das beide Variante das selbe im shop wären. Denn allgemeine Attribute finde ich nicht.