Skip to content

Magento 2 Multi Fees Manual

Multi Fees Cover

Introduction

Multi Fees extension allows you easily to create additional fees for extra services (e.g. Rush Delivery, Gift Wrap, etc.) that your customers may want to choose.

The extension provides the possibility to add 4 types of extra fees: shopping cart fees, shipping fees, payment and product fees.

Requirements and Installation

Multi Fees extension supports Open source (Community), Commerce (Enterprise) and Commerce cloud edition of Magento. The current version of Magento installed on your website can be found in the lower right corner of any backend page.

Magento 2 Version

Multi Fees has 3 separate ways of installation:

1) Copy the code (ready-to-paste package);
2) Use MageWorx Repository;
3) Use local Composer.

Extension Configuration

The main extension’s settings can be found under STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Multi Fees

Multi Fees Configuration Multi Fees Configuration

  • Enable Fees - this setting enables/disables the fees functionality on the front-end.

  • Display Product Fees on Product Page - this setting allows you to display the product hidden fees directly on the product pages.

Multi Fees Configuration

  • Label - this setting allows you to change a label for the fees block, which is displayed on the product pages. Leave empty to hide the label.

  • Product Fees Position - this setting defines, where exactly the product hidden fees should be shown on the product pages.

  • Apply Fee on Click - this setting defines how the fees should be applied in the cart or during the checkout. If enabled, the fees will be automatically applied once they are selected. If disabled, the fees can be applied by clicking on the "Apply" button.

  • Calculation Settings - this setting defines whether the prices of the fees (in the back-end) include or exclude the taxes.

  • Display Prices in Additional Fees Block - This setting defines whether the fees in the 'Additional fees' block on the front-end should be displayed including, excluding taxes or including and excluding taxes.

  • Display Additional Fees Amount in Cart Total - This setting defines whether the fees in the 'Totals' block on the front-end should be displayed including, excluding taxes or including and excluding taxes.

If you select the Including and Excluding Tax, both prices will be shown like this:

  • Display Additional Fees Amount in Orders, Invoices, Credit Memos - This setting defines whether the fees in the 'Additional fees' block in the orders, invoices and credit memos should be displayed including, excluding taxes or including and excluding taxes.

  • Display Detailed Fees List in Orders, Invoices, Credit Memos - this setting defines whether the extension should display the detailed list of all applied fees or just 'Additional fees' row in the orders, invoices and credit memos. This setting displays the detailed fees in the order emails as well.

Multi Fees Management

The extension provides the possibility to add 3 types of extra charges: shopping cart, shipping and payment.

Shopping Cart Fees

Such fees allow showing the fees on the shopping cart:

Multi Fees Cart Page

To check or modify cart fees details, go to SALES ⟶ MageWorx Multi Fees ⟶ Manage Cart Fees.

Multi Fees Management

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new fee, click the Add New Cart Fee button.

New Multi Fee configuration consists of 5 tabs.

Main

Multi Fees Management Main Tab

This section provides the initial setup of the fee with the most basic information.

Name – the name of the fee. Will be displayed on the frontend

Description - fee description. It is shown below the fee itself.

Here, the "Gift Wrap" is the Name of the fee and "Specify the desired description for your fee here" is the Description.


Customer Groups feature provides the ability to select customer groups to apply the fees to.

If the Required option is enabled, the customers will have to select required fees to proceed to the checkout. The default values of required fees are added automatically to the order’s totals.

Status option enables/disables this fee.

Multi Fees Management Main Tab

Store View manages the store views where the fee should be visible.

Sort Order sets the sorting order of the fee among the other fees on the frontend.

Tax class assigns a separate tax class to each fee. In case of “None”, the default tax class of the order will be applied.

Multi Fees Management Main Tab

Enable Customer Message - if enabled, adds a comment field for every fee so that customers could write their messages.

Customer Message Title represents the title of the block for a customer message.

Enable Date Field if enabled, adds a new field of a date type. Customers will be able to select a preferable date.

Date Field Title represents the title of the date block.

The way how the Customer Mesage and the Date Field are shown on the frontend.



Manage Options

Multi Fees Manage Labels

Input Type specifies the desired design of the fee. You can choose radio buttons, drop down or checkbox (multiselect).

The way how all the input types are shown on the frontend.



Multi Fees Manage Labels

One-time specifies whether the fee should be the fixed value or not. If the store owners need to calculate the fee according to some conditions, they may put No.

In this case the extra settings appear: Apply Per and X Value.

  • Apply per. It is possible to select the fees to be applied based on the number of items (5 products A and 7 products B is 12 items), products (5 products A and 7 products B is 2 products), weight or spent amount.

  • X value. If needed, the store owner can fine-tune the previous setting so that the fee will be calculated per each X values, like 1 extra dollar per 10 items, 5 products etc.

Count Percent From can be either Whole Cart (if the percent is needed to be calculated regardless the particular products) or Product (this can be specified in the Product Conditions tab).

Apply Fee To applies fees to the subtotal, shipping & handing or tax. These settings are important in case the fee is calculated based on the percent.

Multi Fees Management Main Tab

Below these settings, there is ‘Options’ tab. Here you can add fee’s values with the correct name of each store view, price, type (fixed or percentage) and select the fee’s value, that will be selected on the front-end by default.


Conditions

All Magento conditions, available for creating shopping cart rules, could be applied to multi fees. You can combine different conditions to offer flexible fees.

Multi Fees Manage Conditions

This example allows to add the fee for the orders where the Gender attribute of the products in the cart has the Women value and the subtotal is greater than $50.

Product Conditions

This tab lets you apply the fees to certain products in the cart using their various attributes. By default, the extension uses the fees for the whole order. If you need to apply fees to some particular products in the order, you need to specify them here. The fees with the populated product conditions are counted for the modified price/weight/quantity.

Multi Fees Manage Conditions

In this example, only the products with XS size will be counted.

Manage Labels

Multi Fees Manage Labels

From here, you can specify correct translations of fees for each store view. This can be applied for the Fee Name, Fee Description, Customer Message Title and Date Field Title

Shipping Fees

Such fees allow showing on the checkout after selecting the desired shipping method:

Multi Fees Cart Page

To check or modify shipping fees details, go to SALES ⟶ MageWorx Multi Fees ⟶ Manage Shipping Fees.

Multi Fees Management

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new fee, click the Add New Shipping Fee button.

New Multi Fee configuration consists of 6 tabs.

Main

This section provides the initial setup of the fee with the most basic information.

Name – the name of the fee. Will be displayed on the frontend

Description - fee description. It is shown below the fee itself.

Customer Groups feature provides the ability to select customer groups to apply the fees to.

If the Required option is enabled, the customers will have to select required fees to proceed to the checkout. The default values of required fees are added automatically to the order’s totals.

Status option enables/disables this fee.

Multi Fees Management Main Tab

Store View manages the store views where the fee should be visible.

Sort Order sets the sorting order of the fee among the other fees on the frontend.

Tax class assigns a separate tax class to each fee. In case of “None”, the default tax class of the order will be applied.

Manage Options

Multi Fees Manage Labels

Input Type specifies the desired design of the fee. You can choose radio buttons, drop down or checkbox (multiselect).

The way how all the input types are shown on the frontend.



Multi Fees Manage Labels

One-time specifies whether the fee should be the fixed value or not. If the store owners need to calculate the fee according to some conditions, they may put No.

In this case the extra settings appear: Apply Per and X Value.

  • Apply per. It is possible to select the fees to be applied based on the number of items (5 products A and 7 products B is 12 items), products (5 products A and 7 products B is 2 products), weight or spent amount.

  • X value. If needed, the store owner can fine-tune the previous setting so that the fee will be calculated per each X values, like 1 extra dollar per 10 items, 5 products etc.

Count Percent From can be either Whole Cart (if the percent is needed to be calculated regardless the particular products) or Product (this can be specified in the Product Conditions tab).

Apply Fee To applies fees to the subtotal, shipping & handing or tax. These settings are important in case the fee is calculated based on the percent.

Multi Fees Management Main Tab

Below these settings, there is ‘Options’ tab. Here you can add fee’s values with the correct name of each store view, price, type (fixed or percentage) and select the fee’s value, that will be selected on the front-end by default.


Shipping methods

Multi Fees Management Main Tab

From here, the store owner can select the appropriate shipping method that should be selected for the fee to be shown.

Conditions

All Magento conditions, available for creating shopping cart rules, could be applied to multi fees. You can combine different conditions to offer flexible fees.

Multi Fees Manage Conditions

This example allows to add the fee for the orders where the Gender attribute of the products in the cart has the Women value and the subtotal is greater than $50.

Product Conditions

This tab lets you apply the fees to certain products in the cart using their various attributes. By default, the extension uses the fees for the whole order. If you need to apply fees to some particular products in the order, you need to specify them here. The fees with the populated product conditions are counted for the modified price/weight/quantity.

Multi Fees Manage Conditions

In this example, only the products with XS size will be counted.

Manage Labels

Multi Fees Manage Labels

From here, you can specify correct translations of fees for each store view. This can be applied for the Fee Name, Fee Description, Customer Message Title and Date Field Title

Payment Fees

Such fees are showing on the payment page:

Multi Fees Cart Page

To check or modify payment fees details, go to SALES ⟶ MageWorx Multi Fees ⟶ Manage Payment Fees.

Multi Fees Management

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new fee, click the Add New Payment Fee button.

New Multi Fee configuration consists of 6 tabs.

Main

Multi Fees Management Main Tab

This section provides the initial setup of the fee with the most basic information.

Name – the name of the fee. Will be displayed on the frontend

Description - fee description. It is shown below the fee itself.

Here, the "Gift Wrap" is the Name of the fee and "Specify the desired description for your fee here" is the Description.


Customer Groups feature provides the ability to select customer groups to apply the fees to.

If the Required option is enabled, the customers will have to select required fees to proceed to the checkout. The default values of required fees are added automatically to the order’s totals.

Status option enables/disables this fee.

Multi Fees Management Main Tab

Store View manages the store views where the fee should be visible.

Sort Order sets the sorting order of the fee among the other fees on the frontend.

Tax class assigns a separate tax class to each fee. In case of “None”, the default tax class of the order will be applied.

Manage Options

Multi Fees Manage Labels

Input Type specifies the desired design of the fee. You can choose radio buttons, drop down or checkbox (multiselect).

The way how all the input types are shown on the frontend.



Multi Fees Manage Labels

One-time specifies whether the fee should be the fixed value or not. If the store owners need to calculate the fee according to some conditions, they may put No.

In this case the extra settings appear: Apply Per and X Value.

  • Apply per. It is possible to select the fees to be applied based on the number of items (5 products A and 7 products B is 12 items), products (5 products A and 7 products B is 2 products), weight or spent amount.

  • X value. If needed, the store owner can fine-tune the previous setting so that the fee will be calculated per each X values, like 1 extra dollar per 10 items, 5 products etc.

Count Percent From can be either Whole Cart (if the percent is needed to be calculated regardless the particular products) or Product (this can be specified in the Product Conditions tab).

Apply Fee To applies fees to the subtotal, shipping & handing or tax. These settings are important in case the fee is calculated based on the percent.

Multi Fees Management Main Tab

Below these settings, there is ‘Options’ tab. Here you can add fee’s values with the correct name of each store view, price, type (fixed or percentage) and select the fee’s value, that will be selected on the front-end by default.


Payment methods

Multi Fees Management Main Tab

From here, the store owner can select the appropriate payment method that should be selected for the fee to be shown.

Conditions

All Magento conditions, available for creating shopping cart rules, could be applied to multi fees. You can combine different conditions to offer flexible fees.

Multi Fees Manage Conditions

This example allows to add the fee for the orders where the Gender attribute of the products in the cart has the Women value and the subtotal is greater than $50.

Product Conditions

This tab lets you apply the fees to certain products in the cart using their various attributes. By default, the extension uses the fees for the whole order. If you need to apply fees to some particular products in the order, you need to specify them here. The fees with the populated product conditions are counted for the modified price/weight/quantity.

Multi Fees Manage Conditions

In this example, only the products with XS size will be counted.

Manage Labels

Multi Fees Manage Labels

From here, you can specify correct translations of fees for each store view. This can be applied for the Fee Name, Fee Description, Customer Message Title and Date Field Title

Product Fees

This fee type can be shown on the cart page. It is possible to add different fees for different products. Each product in this case will have its own fees.

Multi Fees Cart Page

It is possible to display the product fees on the product pages. In this case the fees should be required and have the "hidden" type.

Multi Fees Cart Page

To check or modify product fees details, go to SALES ⟶ MageWorx Multi Fees ⟶ Manage Product Fees.

Multi Fees Management

To create a new fee, click the Add New Product Fee button.

New Multi Fee configuration consists of 4 tabs.

Main

Multi Fees Management Main Tab

This section provides the initial setup of the fee with the most basic information.

Name – the name of the fee. Will be displayed on the frontend

Description - fee description. It is shown below the fee itself.

Customer Groups feature provides the ability to select customer groups to apply the fees to.

If the Required option is enabled, the customers will have to select required fees to proceed to the checkout. The default values of required fees are added automatically to the order’s totals.

Status option enables/disables this fee.

Multi Fees Management Main Tab

Store View manages the store views where the fee should be visible.

Sort Order sets the sorting order of the fee among the other fees on the frontend.

Tax class assigns a separate tax class to each fee. In case of “None”, the default tax class of the order will be applied.

Manage Options

Multi Fees Manage Labels

Input Type specifies the desired design of the fee. You can choose radio buttons, drop down or checkbox (multiselect).

The Hidden fee is the obligatory fee that may be showed on the product page:

Multi Fees Configuration

One-time specifies whether the fee should be the fixed value or not. If the store owners need to calculate the fee according to some conditions, they may put No.

Below these settings, there is ‘Options’ tab. Here you can add fee’s values with the correct name of each store view, price, type (fixed or percentage) and select the fee’s value, that will be selected on the front-end by default.


Product Conditions

All Magento conditions, available for creating shopping cart rules, could be applied to multi fees. You can combine different conditions to offer flexible fees.

Multi Fees Manage Conditions

This example allows to add the fee for the orders where the Gender attribute of the products in the cart has the Women value and the subtotal is greater than $50.

Product Conditions

This tab lets you apply the fees to certain products in the cart using their various attributes. By default, the extension uses the fees for the whole order. If you need to apply fees to some particular products in the order, you need to specify them here. The fees with the populated product conditions are counted for the modified price/weight/quantity.

Multi Fees Manage Conditions

Manage Labels

Multi Fees Manage Labels

From here, you can specify correct translations of fees for each store view. This can be applied for the Fee Name, Fee Description, Customer Message Title and Date Field Title

Tax Management

The Multi Fees supports all standard Magento tax settings. To manage taxes, go to STORES ⟶ Configuration ⟶ SALES ⟶ Tax

Multi Fees Taxation

First of all, the store owner needs to setup the general tax configuration according to the requirements of the country where the store owner operates.

After that you can set up tax classes for products and customer groups, and create tax rules that combine product and customer classes, tax zones and rates. The general workflow consists of 2 operations: setting up the tax classes and defining tax rules based on these classes. These rules are a combination of a Product Class, a Customer Class and a Tax Zone and Rate.

View/Add Multi Fees in the Backend

All selected fees are displayed in the order’s view. The store owner can check any multi fee selected by the customer. Go to SALES ⟶ Orders and select the order with the multifee.

Multi Fees Taxation

All the fees are provided in the Additional Fees tab. Here, the Customer Message and Date field values are provided. They are shown on the order totals block as well.

You can select all types of extra fees while manually creating or editing orders from the back-end.

Multi Fees Taxation

Invoices and credit memos have additional fees in the order total block only.

If the Display Detailed Fees List setting was enabled in the extension's configuration, the several fees applied to one order will be shown separately:

Multi Fees Taxation

On the left screenshot, you can see the default fees display, on the right one, - with the detailed fees setting enabled.

Multi Fees in Customer's Account

Selected fees are also added to the order’s details visible to customers in the customers’ accounts and to the confirmation emails. Thus, customers will see all details about the selected fees in the order.

Multi Fees in Customer Account

If the Display Detailed Fees List setting was enabled in the extension's configuration, the several fees applied to one order will be shown separately:

Multi Fees Taxation

On the left screenshot, you can see the default fees display, on the right one, - with the detailed fees setting enabled.

Multi Fees in the PDFs and Customer Emails

The extension shows the fees in the Order PDFs and Customer Emails:

Multi Fees Taxation

If the Display Detailed Fees List setting was enabled in the extension's configuration, the several fees applied to one order will be shown separately.

Hyvä themes

The extension out of the box has the integrations with Hyvä theme:

Note

The free compatibility addons must be installed. See this link for more details.

REST API

Get fees from order

Mageworx Multi Fees extension adds the bunch of own resources to the default Magento 2 Order API.

The following list of our resources is taken from the sample request:

json { "mageworx_fee_amount": "24.4900", "base_mageworx_fee_amount": "24.4900", "mageworx_fee_tax_amount": "0.0000", "base_mageworx_fee_tax_amount": "0.0000", "mageworx_fee_details": "{\"10\":{\"options\":{\"20\":{\"title\":\"Payment fee\",\"percent\":\"10.0000\",\"price\":4.5,\"base_price\":4.5,\"tax\":0,\"base_tax\":0}},\"title\":\"Processing Fee\",\"date_title\":\"\",\"date\":\"\",\"message_title\":\"\",\"message\":\"\",\"applied_totals\":[\"subtotal\"],\"type\":\"2\",\"is_onetime\":\"1\",\"tax_class_id\":\"0\",\"base_price\":4.5,\"price\":4.5,\"base_tax\":0,\"tax\":0}}", "mageworx_fee_invoiced": "24.4900", "base_mageworx_fee_invoiced": "24.4900", "mageworx_fee_refunded": "", "base_mageworx_fee_refunded": "", }

Name Description
mageworx_fee_amount Fee value in the selected store currency.
base_mageworx_fee_amount Fee value in the base store currency.
mageworx_fee_tax_amount Tax for the fee value in the selected store currency.
base_mageworx_fee_tax_amount Tax for the fee value in the base store currency.
mageworx_fee_details The fee details data that provides the fee information.
mageworx_fee_invoiced If the order is invoiced, this field shows the fee value in the selected store currency.
base_mageworx_fee_invoiced The fee value after the Invoice was made in the base store currency
mageworx_fee_refunded If the Credit Memo for the order was made, this field shows the fee value in the selected store currency.
base_mageworx_fee_refunded If the Credit Memo for the order was made, this field shows the fee value in the base store currency.

Apply fees to order

The extension also allows you to apply the extra fees to the orders created using API. It might be helpful, if your customers place the order in some 3rd party store-front (like mobile app).

In order to apply a certain fee to an order, first you need to get a list of extra fees, applicable to this certain order. After adding items, shipping, and payment information to the quote you can get all available fees for the current quote (cart), i.e. to get all fees, which are applicable to the current cart:

Action Request
Get all available cart fees GET /V1/multifees/cartFees/:cartId
Get all available shipping fees GET /V1/multifees/shippingFees/:cartId
Get all available payment fees GET /V1/multifees/paymentFees/:cartId
Get all available product fees by quote items GET /V1/multifees/productFees/:cartId
Get all Required cart fees GET /V1/multifees/cartFees/required/:cartId
Get all Required shipping fees GET /V1/multifees/shippingFees/required/:cartId
Get all Required payment fees GET /V1/multifees/paymentFees/required/:cartId
Get all Required product fees by quote items GET /V1/multifees/productFees/required/:cartId

Once you have all applicable fees, you can add the certain fees to the order.

Action Request
Add cart fees to cart POST /V1/multifees/setCartFees/:cartId
Add shipping fees to cart POST /V1/multifees/setPaymentFees/:cartId
Add payment fees to cart POST /V1/multifees/setShippingFees/:cartId
Add product fees to cart POST /V1/multifees/setProductFees/:cartId

For adding cart, shipping and payment fees, the expected parameters are:
'fees' (array)
- id - fee id
- options - fee's option id

For product fee, you also need to add quote item id on which fee will be assigned.

Examples:

1) Add the cart fee to the order:

Request: yourstore/rest/default/V1/multifees/setCartFees/71 json { "feeData": { "id": 4, "options": 6 } } This request adds the cart fee with ID 6 with its value with ID 6 to the quote with ID 71.

2) Add the product fee to the order:

Request: yourstore/rest/default/V1/multifees/setCartFees/71 json { "feeData": { "id": 4, "options": 6, "itemId":100 } }

GraphQL API

The GraphQL API is added by the free MultiFeesGraphQl addon.

Add cart fees to the shopping cart

addMwCartFeesToCart mutation is used to add Cart Fees to the shopping cart.

Syntax
addMwCartFeesToCart(input: AddMwFeesToCartInput): AddMwFeesToCartOutput

The AddMwFeesToCartInput object may contain the following attributes: cart_id: String! @doc(description:"The unique ID that identifies the customer's cart") fee_data: [MwFeeDataInput!]!

The MwFeeDataInput object may contain the following attributes: fee_id: Int! @doc(description: "Fee ID") fee_option_ids: [Int!]! @doc(description: "An array of fee option IDs") message: String date: String

The AddMwFeesToCartOutput object contains the Cart object.

Request: mutation { addMwCartFeesToCart( input: { cart_id: "yoSUj6X411aAMMqALERGxnYQsY73iQvM" fee_data: [ { fee_id: 1 fee_option_ids: [1,2] }, { fee_id: 5 fee_option_ids: [6], message: "tt-test mes", date: "06/24/2023" } ] } ) { cart { mw_applied_quote_fees { id title type customer_message date price { value currency } tax { value currency } options { id title price { value currency } tax { value currency } } } } } }

Response: { "data": { "addMwCartFeesToCart": { "cart": { "mw_applied_quote_fees": [ { "id": 1, "title": "Cart Fee", "type": "CART", "customer_message": "", "date": "", "price": { "value": 90, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 1, "title": "option +10", "price": { "value": 30, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } }, { "id": 2, "title": "option +20", "price": { "value": 60, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 5, "title": "Cart Fee 2", "type": "CART", "customer_message": "tt-test mes", "date": "06/24/2023", "price": { "value": 10, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 6, "title": "op1", "price": { "value": 10, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] } } } }

Add shipping fees to the shopping cart

addMwShippingFeesToCart mutation is used to add Shipping Fees to the shopping cart.

Syntax
addMwShippingFeesToCart(input: AddMwFeesToCartInput): AddMwFeesToCartOutput

The requiest is similar to the mutation of addMwCartFeesToCart.

Add payment fees to the shopping cart.

addMwPaymentFeesToCart mutation is used to add Payment Fees to the shopping cart.

Syntax
addMwPaymentFeesToCart(input: AddMwFeesToCartInput): AddMwFeesToCartOutput

The requiest is similar to the mutation of addMwCartFeesToCart.

Add product fees to the shopping cart

addMwProductFeesToCart mutation is used to add Product Fees to the shopping cart.

Syntax
addMwProductFeesToCart(input: AddMwProductFeesToCartInput): AddMwFeesToCartOutput

The AddMwProductFeesToCartInput object may contain the following attributes: cart_id: String! @doc(description:"The unique ID that identifies the customer's cart") fee_data: [MwFeeDataInput!]! quote_item_id: Int! @doc(description: "Quote Item ID")

Request: mutation { addMwProductFeesToCart( input: { cart_id: "yoSUj6X411aAMMqALERGxnYQsY73iQvM" quote_item_id: 25 fee_data: [ { fee_id: 6 fee_option_ids: [8] } ] } ) { cart { mw_applied_product_fees { quote_item_id fees { id title type customer_message date price { value currency } tax { value currency } options { id title price { value currency } tax { value currency } } } } } } }

Response: { "data": { "addMwProductFeesToCart": { "cart": { "mw_applied_product_fees": [ { "quote_item_id": 25, "fees": [ { "id": 6, "title": "Product Fee 2", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 1, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 8, "title": "op1", "price": { "value": 1, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] } ] } } } }

Additional data in Cart object

The following attributes for Cart are added: mw_applied_quote_fees: [MwAppliedFee] @doc(description: "Applied Quote Fees") mw_applied_product_fees: [MwAppliedProductFee] @doc(description: "Applied Product Fees") mw_cart_fees: [MwFee] @doc(description: "Cart Fees") mw_shipping_fees: [MwFee] @doc(description: "Shipping Fees") mw_payment_fees: [MwFee] @doc(description: "Payment Fees") mw_product_fees: [MwProductFee] @doc(description: "Product Fees")

MwAppliedFee attributes: id: Int @doc(description: "Fee ID") title: String @doc(description: "Fee Title") type: MwFeeTypeEnum @doc(description: "Either CART, SHIPPING, PAYMENT or PRODUCT") customer_message: String @doc(description: "Customer Message") date: String @doc(description: "Date") price: Money tax: Money options: [MwAppliedFeeOption]

MwAppliedFeeOption attributes: id: Int @doc(description: "Option ID") title: String @doc(description: "Option Title") price: Money tax: Money

MwAppliedProductFee attributes: quote_item_id: Int @doc(description: "Quote Item ID") fees: [MwAppliedFee] @doc(description: "Product Fees")

MwFee attributes: id: Int @doc(description: "Fee ID") title: String @doc(description: "Fee Title") description: String @doc(description: "Fee Description") input_type: String @doc(description: "Fee Input Type") is_required: Boolean @doc(description: "Indicates whether the fee is required") is_enabled_customer_message: Boolean @doc(description: "Indicates whether the customer message field is enabled") customer_message_title: String @doc(description: "Customer Message Field Title") is_enabled_date_field: Boolean @doc(description: "Indicates whether the date field is enabled") date_field_title: String @doc(description: "Date Field Title") sort_order: Int @doc(description: "Fee Sort Order") options: [MwFeeOption] @doc(description: "An array of fee options")

MwFeeOption attributes: id: Int @doc(description: "Option ID") field_label: String @doc(description: "Option Field Label") is_default: Boolean @doc(description: "Indicates whether the given option is the default option") position: Int @doc(description: "Option Position") title: String @doc(description: "Option Title") price_type: String @doc(description: "Option Price Type") price: Float @doc(description: "Option Price")

MwProductFee attributes: quote_item_id: Int @doc(description: "Quote Item ID") fees: [MwFee] @doc(description: "Product Fees")

Request: { customerCart { items { id product { name sku } quantity } mw_applied_quote_fees { id title type customer_message date price { value currency } tax { value currency } options { id title price { value currency } tax { value currency } } } mw_applied_product_fees { quote_item_id fees { id title type customer_message date price { value currency } tax { value currency } options { id title price { value currency } tax { value currency } } } } mw_cart_fees { id title description input_type is_required is_enabled_customer_message customer_message_title is_enabled_date_field date_field_title sort_order options { id field_label is_default position title price_type price } } mw_shipping_fees { id title description input_type is_required is_enabled_customer_message customer_message_title is_enabled_date_field date_field_title sort_order options { id field_label is_default position title price_type price } } mw_payment_fees { id title description input_type is_required is_enabled_customer_message customer_message_title is_enabled_date_field date_field_title sort_order options { id field_label is_default position title price_type price } } mw_product_fees { quote_item_id fees { id title description input_type is_required is_enabled_customer_message customer_message_title is_enabled_date_field date_field_title sort_order options { id field_label is_default position title price_type price } } } } }

Response: { "data": { "customerCart": { "items": [ { "id": "25", "product": { "name": "Fusion Backpack", "sku": "24-MB02" }, "quantity": 2 }, { "id": "34", "product": { "name": "Push It Messenger Bag", "sku": "24-WB04" }, "quantity": 1 } ], "mw_applied_quote_fees": [ { "id": 3, "title": "Shipping Fee", "type": "SHIPPING", "customer_message": "", "date": "", "price": { "value": 10, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 4, "title": "option +10", "price": { "value": 10, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 4, "title": "Payment Fee", "type": "PAYMENT", "customer_message": "", "date": "", "price": { "value": 30, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 5, "title": "option +10", "price": { "value": 30, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 5, "title": "Cart Fee 2", "type": "CART", "customer_message": "", "date": "", "price": { "value": 19.56, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 7, "title": "op2", "price": { "value": 19.56, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 1, "title": "Cart Fee", "type": "CART", "customer_message": "", "date": "", "price": { "value": 90, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 1, "title": "option +10", "price": { "value": 30, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } }, { "id": 2, "title": "option +20", "price": { "value": 60, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ], "mw_applied_product_fees": [ { "quote_item_id": 25, "fees": [ { "id": 2, "title": "Product Fee", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 3, "title": "option +12", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] }, { "quote_item_id": 34, "fees": [ { "id": 2, "title": "Product Fee", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 3, "title": "option +12", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] } ], "mw_cart_fees": [ { "id": 1, "title": "Cart Fee", "description": "Cart Fee Description", "input_type": "checkbox", "is_required": false, "is_enabled_customer_message": false, "customer_message_title": "", "is_enabled_date_field": false, "date_field_title": "", "sort_order": 0, "options": [ { "id": 1, "field_label": "option +10-$30.00", "is_default": true, "position": 10, "title": "option +10", "price_type": "fixed", "price": 10 }, { "id": 2, "field_label": "option +20-$60.00", "is_default": true, "position": 20, "title": "option +20", "price_type": "fixed", "price": 20 } ] }, { "id": 5, "title": "Cart Fee 2", "description": "Description Cart Fee 2", "input_type": "radio", "is_required": true, "is_enabled_customer_message": true, "customer_message_title": "Customer Message Title 2", "is_enabled_date_field": true, "date_field_title": "Date Field Title 2", "sort_order": 10, "options": [ { "id": 6, "field_label": "op1-$10.00", "is_default": false, "position": 10, "title": "op1", "price_type": "fixed", "price": 10 }, { "id": 7, "field_label": "op2-12.00%", "is_default": true, "position": 12, "title": "op2", "price_type": "percent", "price": 12 } ] } ], "mw_shipping_fees": [ { "id": 3, "title": "Shipping Fee", "description": "Shipping Fee Description", "input_type": "radio", "is_required": false, "is_enabled_customer_message": false, "customer_message_title": "", "is_enabled_date_field": false, "date_field_title": "", "sort_order": 0, "options": [ { "id": 4, "field_label": "option +10-$10.00", "is_default": false, "position": 10, "title": "option +10", "price_type": "fixed", "price": 10 } ] } ], "mw_payment_fees": [ { "id": 4, "title": "Payment Fee", "description": "Payment Fee Description", "input_type": "checkbox", "is_required": false, "is_enabled_customer_message": false, "customer_message_title": "", "is_enabled_date_field": false, "date_field_title": "", "sort_order": 0, "options": [ { "id": 5, "field_label": "option +10-$30.00", "is_default": true, "position": 10, "title": "option +10", "price_type": "fixed", "price": 10 } ] } ], "mw_product_fees": [ { "quote_item_id": 25, "fees": [ { "id": 2, "title": "Product Fee", "description": "Product Fee Description", "input_type": "hidden", "is_required": true, "is_enabled_customer_message": true, "customer_message_title": "Customer Message Title", "is_enabled_date_field": true, "date_field_title": "Date Field Title", "sort_order": 0, "options": [ { "id": 3, "field_label": "option +12-$12.00", "is_default": true, "position": 12, "title": "option +12", "price_type": "fixed", "price": 12 } ] }, { "id": 6, "title": "Name for Default Store View", "description": "Description for Default Store View", "input_type": "drop_down", "is_required": false, "is_enabled_customer_message": false, "customer_message_title": "Customer Message Title for Default Store View", "is_enabled_date_field": false, "date_field_title": "Date Field Title for Default Store View", "sort_order": 0, "options": [ { "id": 8, "field_label": "op1-$1.00", "is_default": false, "position": 1, "title": "op1", "price_type": "fixed", "price": 1 }, { "id": 9, "field_label": "op2-$2.00", "is_default": false, "position": 2, "title": "op2", "price_type": "fixed", "price": 2 } ] } ] }, { "quote_item_id": 34, "fees": [ { "id": 2, "title": "Product Fee", "description": "Product Fee Description", "input_type": "hidden", "is_required": true, "is_enabled_customer_message": true, "customer_message_title": "Customer Message Title", "is_enabled_date_field": true, "date_field_title": "Date Field Title", "sort_order": 0, "options": [ { "id": 3, "field_label": "option +12-$12.00", "is_default": true, "position": 12, "title": "option +12", "price_type": "fixed", "price": 12 } ] }, { "id": 6, "title": "Name for Default Store View", "description": "Description for Default Store View", "input_type": "drop_down", "is_required": false, "is_enabled_customer_message": false, "customer_message_title": "Customer Message Title for Default Store View", "is_enabled_date_field": false, "date_field_title": "Date Field Title for Default Store View", "sort_order": 0, "options": [ { "id": 8, "field_label": "op1-$1.00", "is_default": false, "position": 1, "title": "op1", "price_type": "fixed", "price": 1 }, { "id": 9, "field_label": "op2-$2.00", "is_default": false, "position": 2, "title": "op2", "price_type": "fixed", "price": 2 } ] } ] } ] } } }

Additional data in ProductInterface

The following attribute for ProductInterface is added: mw_product_hidden_fees: [MwFee] @doc(description: "Product Hidden Fees")

Request: { products(filter: {sku: {eq: "24-MB02"}}) { items { __typename name sku mw_product_hidden_fees { id title description sort_order options { id field_label position title price_type price } } } } }

Response: { "data": { "products": { "items": [ { "__typename": "SimpleProduct", "name": "Fusion Backpack", "sku": "24-MB02", "mw_product_hidden_fees": [ { "id": 2, "title": "Product Fee", "description": "Product Fee Description", "sort_order": 0, "options": [ { "id": 3, "field_label": "option +12 - $12.00", "position": 1, "title": "option +12", "price_type": "fixed", "price": 12 } ] }, { "id": 8, "title": "prod fee 3 hidden", "description": "", "sort_order": 0, "options": [ { "id": 12, "field_label": "op1 - $3.00", "position": 1, "title": "op1", "price_type": "fixed", "price": 3 } ] }, { "id": 7, "title": "Product Fee hidden 2", "description": "Description for Product Fee hidden 2", "sort_order": 10, "options": [ { "id": 13, "field_label": "op1 - $12.00", "position": 1, "title": "op1", "price_type": "fixed", "price": 12 }, { "id": 11, "field_label": "op2 - 10.00%", "position": 2, "title": "op2", "price_type": "percent", "price": 10 } ] } ] } ] } } }

Additional data in CartItemInterface

The following attribute for CartItemInterface is added: mw_applied_product_fees: [MwAppliedFee] @doc(description: "Applied Product Fees")

Request: { cart(cart_id: "RCBVPrmgjDnNYin5RLhXxvHOp3sYTZkv") { items { id product { name sku } quantity mw_applied_product_fees { id title type customer_message date price { value currency } tax { value currency } options { id title price { value currency } tax { value currency } } } } } }

Response: { "data": { "cart": { "items": [ { "id": "47", "product": { "name": "Fusion Backpack", "sku": "24-MB02" }, "quantity": 1, "mw_applied_product_fees": [ { "id": 2, "title": "Product Fee", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 3, "title": "option +12", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 8, "title": "prod fee 3 hidden", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 3, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 12, "title": "op1", "price": { "value": 3, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 7, "title": "Product Fee hidden 2", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 17.9, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 13, "title": "op1", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } }, { "id": 11, "title": "op2", "price": { "value": 5.9, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] }, { "id": "48", "product": { "name": "Radiant Tee", "sku": "WS12" }, "quantity": 1, "mw_applied_product_fees": [ { "id": 2, "title": "Product Fee", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 3, "title": "option +12", "price": { "value": 12, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] }, { "id": 8, "title": "prod fee 3 hidden", "type": "PRODUCT", "customer_message": "", "date": "", "price": { "value": 3, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" }, "options": [ { "id": 12, "title": "op1", "price": { "value": 3, "currency": "USD" }, "tax": { "value": 0, "currency": "USD" } } ] } ] } ] } } }

Additional data in StoreConfig object

The following attributes for StoreConfig are added: mw_multi_fees_is_enabled: Boolean @doc(description: "Indicates whether the MultiFees functionality is enabled") mw_display_product_fee_on_product_page_is_enabled: Boolean @doc(description: "Indicates whether the product fee display is enabled on the product page") mw_fees_block_label_on_product_page: String @doc(description: "The label for the fees block that is displayed on the product page") mw_product_fees_position: MwHiddenFeePositionEnum @doc(description: "Either BELOW_ADD_TO_CART or ABOVE_ADD_TO_CART") mw_apply_fee_on_click_is_enabled: Boolean @doc(description: "Indicates whether to apply fee on click") mw_multi_fees_tax_calculation_type: MwFeeTaxCalculationTypeEnum @doc(description: "Either EXCLUDING_TAX or INCLUDING_TAX") mw_prices_type_in_additional_fees_block: MwFeeAmountTypeEnum @doc(description: "Either EXCLUDING_TAX, INCLUDING_TAX or INCLUDING_AND_EXCLUDING_TAX") mw_additional_fees_amount_type_in_cart_total: MwFeeAmountTypeEnum @doc(description: "Either EXCLUDING_TAX, INCLUDING_TAX or INCLUDING_AND_EXCLUDING_TAX")

Request: { storeConfig { store_code store_name mw_multi_fees_is_enabled mw_display_product_fee_on_product_page_is_enabled mw_fees_block_label_on_product_page mw_product_fees_position mw_apply_fee_on_click_is_enabled mw_multi_fees_tax_calculation_type mw_prices_type_in_additional_fees_block mw_additional_fees_amount_type_in_cart_total } }

Response: { "data": { "storeConfig": { "store_code": "default", "store_name": "Default Store View", "mw_multi_fees_is_enabled": true, "mw_display_product_fee_on_product_page_is_enabled": true, "mw_fees_block_label_on_product_page": "Additional Product Fees", "mw_product_fees_position": "BELOW_ADD_TO_CART", "mw_apply_fee_on_click_is_enabled": false, "mw_multi_fees_tax_calculation_type": "EXCLUDING_TAX", "mw_prices_type_in_additional_fees_block": "INCLUDING_AND_EXCLUDING_TAX", "mw_additional_fees_amount_type_in_cart_total": "INCLUDING_AND_EXCLUDING_TAX" } } }

Got Questions?

Need help with the extensions? Feel free submit a ticket from https://www.mageworx.com/support/ 



Mageworx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.