Atwist Posted January 3, 2023 Share Posted January 3, 2023 (edited) Hallo zusammen, Weis jemand wie man die Versandkosten nur 1 mal berechnet bei PS 8, einstellt oder Datei anpasst, jetzt wird die Versandkosten in Warenkorb für jeden Artikel addiert statt nur 1 mal der Versand vom schwerste Artikel zu nehmen. Hab diese Tread gefunden die funktioniert nicht für PS 8. Link Ich danke im Voraus Edited January 3, 2023 by Atwist (see edit history) 1 Link to comment Share on other sites More sharing options...
Atwist Posted January 3, 2023 Author Share Posted January 3, 2023 Es hat doch funktioniert ab seile 3907 3 mal SELECT SUM andern in SELECT MAX if (Combination::isFeatureActive()) { $weight_product_with_attribute = Db::getInstance()->getValue(' SELECT MAX((p.`weight` + pa.`weight`) * cp.`quantity`) as nb FROM `' . _DB_PREFIX_ . 'cart_product` cp LEFT JOIN `' . _DB_PREFIX_ . 'product` p ON (cp.`id_product` = p.`id_product`) LEFT JOIN `' . _DB_PREFIX_ . 'product_attribute` pa ON (cp.`id_product_attribute` = pa.`id_product_attribute`) WHERE (cp.`id_product_attribute` IS NOT NULL AND cp.`id_product_attribute` != 0) AND cp.`id_cart` = ' . $productId); } else { $weight_product_with_attribute = 0; } $weight_product_without_attribute = Db::getInstance()->getValue(' SELECT MAX(p.`weight` * cp.`quantity`) as nb FROM `' . _DB_PREFIX_ . 'cart_product` cp LEFT JOIN `' . _DB_PREFIX_ . 'product` p ON (cp.`id_product` = p.`id_product`) WHERE (cp.`id_product_attribute` IS NULL OR cp.`id_product_attribute` = 0) AND cp.`id_cart` = ' . $productId); $weight_cart_customizations = Db::getInstance()->getValue(' SELECT MAX(cd.`weight` * c.`quantity`) FROM `' . _DB_PREFIX_ . 'customization` c LEFT JOIN `' . _DB_PREFIX_ . 'customized_data` cd ON (c.`id_customization` = cd.`id_customization`) WHERE c.`in_cart` = 1 AND c.`id_cart` = ' . $productId); Link to comment Share on other sites More sharing options...
Nickz Posted January 3, 2023 Share Posted January 3, 2023 Dann setze mal ein Solved am Anfang des Fadens. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now