Jump to content

(Solved) Nur einmal Versand bei PS 8


Atwist

Recommended Posts

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 by Atwist (see edit history)
  • Like 1
Link to comment
Share on other sites

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

  • Atwist changed the title to (Gelöst) Nur einmal Versand bei PS 8
  • Atwist changed the title to (Solved) Nur einmal Versand bei PS 8

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...