setSurcharge example

$data = array_merge($data$translation);

        $payment->setId($data['__payment_id']);
        $payment->setName($data['__payment_name']);
        $payment->setDescription($data['__payment_description']);
        $payment->setTemplate($data['__payment_template']);
        $payment->setClass($data['__payment_class']);
        $payment->setTable($data['__payment_table']);
        $payment->setHide($data['__payment_hide']);
        $payment->setAdditionalDescription(isset($data['__payment_additionalDescription']) ? $data['__payment_additionalDescription'] : $data['__payment_additionaldescription']);
        $payment->setDebitPercent($data['__payment_debit_percent']);
        $payment->setSurcharge($data['__payment_surcharge']);
        $payment->setSurchargeString($data['__payment_surchargestring']);
        $payment->setPosition($data['__payment_position']);
        $payment->setActive($data['__payment_active']);
        $payment->setEsdActive($data['__payment_esdactive']);
        $payment->setEmbediframe($data['__payment_embediframe']);
        $payment->setHideProspect($data['__payment_hideprospect']);
        $payment->setAction($data['__payment_action']);
        $payment->setPluginID($data['__payment_pluginID']);
        $payment->setSource($data['__payment_source']);
        $payment->setMobileInactive($data['__payment_mobile_inactive']);

        
$customerGroup->setDisplayGrossPrices((bool) $data['__customerGroup_tax']);

        $customerGroup->setInsertedGrossPrices((bool) $data['__customerGroup_taxinput']);

        $customerGroup->setKey($data['__customerGroup_groupkey']);

        $customerGroup->setMinimumOrderValue((float) $data['__customerGroup_minimumorder']);

        $customerGroup->setPercentageDiscount((float) $data['__customerGroup_discount']);

        $customerGroup->setSurcharge((float) $data['__customerGroup_minimumordersurcharge']);

        $customerGroup->setUseDiscount((bool) $data['__customerGroup_mode']);

        if (!empty($data['__customerGroupAttribute_id'])) {
            $this->attributeHydrator->addAttribute($customerGroup$data, 'customerGroupAttribute');
        }

        return $customerGroup;
    }
}
Home | Imprint | This part of the site doesn't use cookies.