Version 4.0 MageB2B Pricesystem ReadMe AIRBYTES GmbH


Full text


Table of Contents

1. Introduction ... 2

1.1 Notice of license ... 2

1.2 Instructions for setup ... 2

1.3 Frequently asked questions ... 3

1.4 Compatibility ... 4

2.Description and functionality ... 4

2.1. Overview ... 4 2.2 Price index ... 6 2.8 System configuration ... 7 2.8.1 General settings ... 7 2.8.2 Categoryprice ... 7 2.8.4 Customer ... 7 2.8.5 Project settings ... 7 3. Database structure ... 7 4. Availability of prices ... 8 5. Available pricetypes ... 9 5.1 Normal price ... 9 5.2 Tier price ... 9 5.3 Group price ... 9 5.4 Special price ... 9 5.5 Customer discount ... 9

5.6 Customer group discount ... 10

5.7 Customer specific price / discount ... 10

5.8 Category specific price / discount ... 10

5.9 Pricelist ... 10

6. Price Select Rule ... 10

6.1 Lowest ... 11

6.2 Highest ... 11

6.3 Custom sort order ... 11

7. Exclude customers from price types ... 11

8. Exclude products from price types ... 11

9. Using the pricesystem index functionality ... 12

10. Interfaces (CSV, SOAP API, REST API) ... 12

10.1 CSV Import ... 12

10.1.1 Preparing csv file ... 12

10.1.2 Import customer specific prices & discounts ... 13

10.1.3 Import price list ... 13

10.1.4 Import category specific prices & discounts ... 13

10.2 SOAP API ... 13

10.2.1 Introduction ... 13

10.3 REST API ... 13

10.3.1 Introduction ... 13

10.3.2 REST API resources ... 13

10.3.3 REST API Example ... 16

11. Service & Support ... 17


Konrad-Adenauer-Str. 12 31139 Hildesheim • Germany Phone: 0049 5121 2892542 Fax: 0049 5121 2892504

1. Introduction

1.1 Notice of license

Please note, that you have purchased a time unlimited license for one Magento installation / system.

All copyrights and rights of source code of these and other extensions are property of AIRBYTES GmbH, Germany. This is also the case if you need custom development of this extension.

Distribution, sales and donation are strictly prohibited and will be prosecuted.

Only through a fair use of the extension a further development is secured.

Also refer to our license terms in case you have any questions which aren't answered here:

1.2 Instructions for setup

Please don't setup this extension on your live environment. The installation is at your own risk. You can use our professional installation service for 199,00 € to go safety at the installation. MageB2B_PricesystemMeasureUnit fix when clean install

when installing it together with pricelist on a clean magento the measure_unit field was not added to pricelist_product table this is because it will load all modules in alphabetical order 1: MageB2B_PricesystemCustomerprice

2: MageB2B_PricesystemMeasureUnit 3: MageB2B_PricesystemPricelist


Another possible fix would be to rename this module to MageB2B_PricesystemZMeasureUnit

This fix has one disadvantage, when a customer does not have CustomerPrice or Pricelist an error will be thrown.. But I think this is better than no error and later hard debugging what went wrong


Please copy all files contained in the ZIP archive to your root folder. If you don't use modman, you should delete the modman file before uploading. If you are using modman, create folder

beneath .modman folder with the extension name (MageB2B_Pricesystem).

Please note that this extension isn't built for installing over MagentoConnect, as you only use this for community extensions, which are free available.

Theme related information:

If you are using a custom theme, make sure you copy all theme related files to your theme interface directly (the default one or the theme directly).

In that case, you have to copy these files:

app/design/frontend/default/default/layout/pricesystemcore.xml app/design/frontend/default/default/template/pricesystemcore/* to your current template directory.

Please make also sure that you have the correct language files for your Magento system ready. In most cases we are offering german and english language package, including email templates (if there are any). Please note, that you need to copy all files in app/locale/en_US/ to the language used by your system, if it's not german or english.

Secondly, clear all caches (if not in admin, under var/cache) and logout and login again in the administration area of Magento.

Under system -> configuration you should now see a tab "MageB2B -> Sublogin". Notice in case you use modman:

If you are using modman, please also make sure symlinks are enabled under System -> Configuration -> Dev -> Enable Symlinks.

1.3 Frequently asked questions

Why is the source code encoded?

We opted for this step to counter the unauthorized copying and distribution contrary. We kindly ask for your understanding.


When uploading the installation process failed due to an error There are several reason why an installation might fail.

We are observing in many cases customers are using more than 30, up to 60 extensions in their environment.

Please not that we can not give a guarantee that the extension works in every circumstances when you have a customized installation.

We give a guarantee that our extensions are working on a clean Magento environment. If you have rewrite conflicts with other extensions, you can refer to our installation service. I'm getting 404 while accessing the system configuration values of this extension

This is a common issue of Magento. Just log out and log in the admin area again.

1.4 Compatibility

This extension is compatible to the following versions: – Magento Commerce Community Edition 1.7 – 1.9 – Magento Enterprise Edition 1.1.x

If you are encountering an error, which is probably caused by an interception of your current Magento version, please write us an email.

2.Description and functionality

2.1. Overview

Customer individual / customer specific prices per product per customer

• Assignment of customer individual / customer specific prices per product per customer • Various tier prices possible


• Easy management including auto suggest search of products / customers to "automatically" assign the data

• Using the option "percent" it's possible to change the given value (e.g. 20 USD) as

percentage value of the original price of this product (instead of just using an end-price per customer / per product

• Therefore, it's possible to manage customer individual / customer specific discounts • CSV adapter interface for automatically import customer specific prices per file

• REST API interface for automatically create, update, delete customer specific prices per HTTP • Easy system integration to your ERP system, e.g. WinLine, SAP, Business One, SAGE

OfficeLine, Microsoft Dynamics Category specific prices per customer

• Assignment of customer individual / customer specific prices per category per customer • Also you can use tier prices for this price type

• Easy support including auto suggest of products / customers • You can convert the price value also being a discount

• Therefore it's possible to have category specific discounts per customer • CSV adapter included

• REST API interface included

• Integrate your ERP, CRM or SCM system with our extension - using CSV adapter or REST API over HTTP

Global customer discounts / Global discounts per customer

• You can apply a global discount per customer which is valid for all products in your catalog • The discount will be calculated from original price of the specific product

Global customer group discounts / Global discounts per customer group • Equivalent function as above logic of global customer discounts • The discount will be applied to all products in your catalog

Create price lists with our Magento extension

Create price lists and combine products, customers and customer groups - even product attributes! • With price lists you can make complex connections between products, customers, customer

groups and product attribute options (e.g. you have summer and winter season and have 2 price lists for this, you only need to change the attribute values of every product to apply another price list)

• The price lists can be restricted using valid from - to date time (so price lists won't be applied beside these restriction dates)

• In addition, price lists can be combined with attribute options, to just consider these options while applying a specific price list


Price ranges - ranges for price types

As our extension is adding various price types to your Magento system, you can assign a specific price range and this determines which price (per customer / product) is being applied, if this price type is valid for this combination.

• The function price range can be applied on three different configuration areas (global - system configuration, per customer group, per single customer) and is therefore very individual configurable

• This function ascertains the view of specific prices in the frontend, impartial which price types are available beside

• Configuration settings are: apply highest price, apply lowest price, using a special price range which can be configured

Extensive import functionalities

We are offering extensive import and export functionalities for the following price types: • customer indidividual prices / customer specific prices / customer specific discounts • category specific prices / category specific discounts

• price lists


2.8 System configuration

Following system configuration values are available under System -> Configuration -> MageB2B -> Pricesystem

2.8.1 General settings

Enable Priceindex table

This greatly increases frontend performance but requires some memory and backend

calculation. Please note that you need to immediately update index after activating to show the correct prices.

2.8.2 Categoryprice

Search the category tree upwards

Looks at all direct categories a product is in - when no price, looks at all parents of those..

and so on, until a price is found

2.8.4 Customer

List special price in my account area

Define if the "My prices" link should be shown under my account in frontend.

2.8.5 Project settings

If you have a customized extension (so you bought individual development from us), you can find here the installation button (to install sql scripts) and activate your customization for this extension. If you have not ordered a customized version, this tab will not be displayed at all.

3. Database structure

Although our extension is obfuscated and we totally protect our source code, you should know what kind of sql (attributes and even tables) we are installing during the installation process.


This should give more security while deciding to use and install our extension. This might also be helpful in case you need to remove our extension somehow. MageB2B_PricesystemCore • • pricesystem_priceindex_todo • pricesystem_prices_index_idx MageB2B_PricesystemCategoryprice • pricesystem_categoryprice • pricesystem_categoryprice_customergroup MageB2B_PricesystemCustomerprice • pricesystem_customerprice MageB2B_PricesystemPricelist • Table pricesystem_pricelist • pricesystem_pricelist_group • pricesystem_pricelist_product • pricesystem_pricelist_user

Please note that this information is just for internal use. Do not insert values via mysql directly from outside, as this may cause issues while calculating the end price for the customer in frontend or even backend. Use our awesome import technologies (CSV, SOAP, REST) instead to operate from outside.

4. Availability of prices

All prices which are calculated / rendered by our extension are available on following sections in Magento.


• Product Search List • Product Compare List • Wishlist

• Product List • Product View Page • Checkout / Cart


• Checkout / Onepage • My Orders

Even if you use a special theme, or e.g. using another checkout extension, the prices are normally not being overwritten by another extension.

If you use other extensions for price calculation before, there might be the reason to remove these extensions and they may causing issues with ours.

5. Available pricetypes

This paragraph is about all available pricetypes which either are coming from our extensions (delivered by it) or which are interacting with our extension (like tier price). Every pricetype has it's own section and explainations.

5.1 Normal price

The normal price is just the product price which can be setup per product. In case of a multistore environment, we are also watching for the website price, if there is any. So website price is taken if It's different to the global normal price.

5.2 Tier price

Tier price functionality is to give special prices for customer groups, within tier qtys.

5.3 Group price

Group price is something similar to tier price, but in difference to that, you can not setup tier qtys on the specific customer group prices.

5.4 Special price

A special price can be set up per product to e.g. make a special promotion on that. In addition, you can define how long the special price should be applied (from – to). Please note, that using the special price e.g. In case of custom formula, the special price should be in date range (if from – to is set up). You can even define a special price without a date.

5.5 Customer discount

The customer discount is used to set up a global discount of the whole product collection of Magento for a specific customer.


5.6 Customer group discount

The customer group discount is used to set up a global discount of the whole product collection of Magento for a specific customer group.

5.7 Customer specific price / discount

With this price type you are able to define special prices per customer. So for example, a product with a special SKU "myproduct" should only have USD 5 for the customer with the ID 233. Then you can achieve this by applying this price type. It's also possible to define a tier qty. Please note, that at min. Qty 1 has to be setup, all further tier qtys are optionally.

If you need, you can use the "is percent" dropdown to decide, that this should not be the end price (in our case the USD 5) rather than the percentage value of the normal price. So this setting might be useful in case your product prices are changing from time to time, but you need to individually set up a discount which is connected / linked with the normal price. You can also define a validation date (from – to date).

5.8 Category specific price / discount

This price type is for setting up prices or even discounts on whole categories including all containing products. Over the system configuration you can decide, if the subcategories of the category which has the prices / discounts should also being applied.

It's prices are internally matched for the customer groups / customers. As you can set up prices / discounts per category seperatly for customers and customer groups, the price with the higher order (which is always the specific customer) will be taken.

5.9 Pricelist

A pricelist is a construction maintaining a collection of products, customers / customer groups. You can define a name for that pricelist, also a validation date and configure, if this pricelist should be active or not. When our system calculates the prices for the frontend or even the backend, make sure this pricelist is active to also compare this price with others (for example, you have set up a lowest price for a special customer).

6. Price Select Rule

The price calculation basically works on price select rules, as there may the problem that there is more one price for a customer, product and qty available. For example, that could happen in case you set up customer specific price with 50 EUR for the product A5001, and this product has a normal price of 100 EUR. Even this is known by our system and could arrange what to do with that prices and how they should be calculated at all.

For a specific customer there is only one rule applied at the end you decide how to define them. You are able to setup the price select on a global configuration (system configuration).


Please note, that also the price select rule has a select rule itself how it's being applied what the customer gets as a price select rule.

6.1 Lowest

This setting allows to get always, in any case, the lowest price available. Even the normal price can be the lowest price in that case.

6.2 Highest

This setting allows to get always, in any case, the highest price available. Even the normal price can be the lowest price in that case.

6.3 Custom sort order

A custom sort order can be setup to achieve that once the customer has e.g. no customer discount, the normal price should be applied. Or for example, one customer should have a category price, but if he hasn't it (not inserted), the pricelist price should be applied.

For a combination of different prices use "Custom Formula".

This setting only make sense when you need a specific custom sort order where only one price from one price type should be taken effect.

10. Interfaces (CSV, SOAP API, REST API)

10.1 CSV Import

We developed a csv import interface where sublogins can be imported. Following the instructions beneath how to use this tool.

10.1.1 Preparing csv file

First, we need to prepare the csv file which contains the sublogins data. Make sure your csv file fits the following requirements:

• csv file (coma seperated file) • Value seperator: ; • Encloser: " "


10.1.2 Import customer specific prices & discounts

10.1.3 Import price list

10.1.4 Import category specific prices & discounts


10.2.1 Introduction


10.3.1 Introduction

For this extension, an own REST API was built by us. Read the following instructions carefully in case you want to use our REST API interface to manage pricetypes via REST API.

Magento is usually using the Oauth authentication procedure to securely get a connection over HTTP.

How you can connect through Oauth authentication is mentioned here:

10.3.2 REST API resources

If you have to client side running to test the functions correctly, it's recommend to use firefox or chromse extension for REST API. You can find it here:


We will exercise an example on how to use this:

Firstly, we need to install the above plugin. After that, we are opening the browser including this plugin. Now, type in Method "GET" and URL is your Magento host URL, combined with our REST API URL, as a result it would be e.g.:

Also make sure you add a correct Content-Type to your request. Therefore, go to "Headers", "Custom Header" and add e.g.:

Content-Type application/xml

This will be used in case our request body is XML language, which will be used for our example. You can either use application/xml, application/json and text/plain – that's common for Magento's



Following HTTP methods are commonly available: GET: Retrieve data

POST: Create data PUT: Update data DELETE: Delete data

In order to find out the attributes which you can use via REST API, you can go to app/code/local/MageB2B/Pricesystem*/etc/api2.xml

That's a definition file where allowed attributes are stored. Please see the examples below to know how to handle REST APIs for this extension. All examples are made in JSON format, but you can also use plain-text and XML allowed by Magento.

PricesystemCore provides following methods / URLs.

GET: PUT: Following attributes are available: id, discount

GET: PUT: Following attributes are available: id, discount

PricesystemCustomerprice provides following methods / URLs.


Following attributes are available: value_id, entity_id, customer_id, qty, value, from_date, to_date, is_percent

PricesystemCategoryprice for customers provides following methods / URLs. GET: GET: POST: PUT:



Following attributes are available: id, entity_id, customer_id, qty, value, website_id, to_date, from_date, is_percent

PricesystemCategoryprice for customer groups provides following methods / URLs. GET: GET: POST: PUT: PUT: DELETE: DELETE: Following attributes are available: id, entity_id, group_id, qty, value, website_id, to_date, from_date, is_percent

PricesystemPricelist provides the following methods / URLS. GET: GET: POST: PUT: PUT: DELETE: DELETE:

Following attributes are available: name, id, active, fromDate, toDate, website_id PricesystemPricelist for products provides the following methods / URLS.



Following attributes are available: id, pricelist_id, product_id, price, qty, is_percent, start, end, comment, option

PricesystemPricelist for customers provides the following methods / URLS. GET: GET: POST: PUT: PUT: DELETE: DELETE: Following attributes are available: id, pricelist_id, user_id,

PricesystemPricelist for customer groups provides the following methods / URLS. GET: GET: POST: PUT: PUT: DELETE: DELETE: Following attributes are available: id, pricelist_id, group_id

Notice: If using POST method, you should get a entity ID (which was created by that request) in the URL. To further work with that entry, you need to save that ID which automatically was created (primary key of that table).

10.3.3 REST API Example

This example is JSON-based POST to create a new customerprice.

POST { "entity_id" : "554", "customer_id" : "27", "qty" : "1", "value" : "15.00", "from_date" : "2015-04-23", "to_date" : "2015-12-31", "is_percent" : "0"



11. Service & Support

If the error is a software error, please report to us the version and all the data so that we can verify the error. We will check this as soon as possible and then provide you with a new version. Please inform us when a support request the following data:

• your Magento version • Magento URL

• Magento Backend access • FTP and database access • a detailed error description

As we are a friend of quickly communication simply write an email to us at

12. Release Notes

Rev. Date Comment

4.0 05.01.15 Added display of all available price types in customer frontend area 4.0 01.01.15 Updated manual completly

3.9 15.09.14 Added SOAP APIs for all price types 3.8 20.07.14 Huge Rewrite of Some Classes 3.7 29.06.14 Changed Internal Class Behavior

3.6 19.06.14 Added CSV Import interface for all price types 3.5 15.05.14 Added REST API for all price types

3.4 10.05.14 Deleted old Dataflow Profiles (too old, not supported, too slow) 3.3 07.04.14 Categoryprice as pricetype now available

3.2 05.04.14 Speed up js autocomplete filter for searching customers / products 3.1 17.03.14 Added some useful helper functions

3.0 15.02.14 Added Indexer functionality


2.8 23.12.13 Added price selct rule for normal price 2.7 10.11.13 Fixed issue with empty customer discounts

2.6 25.10.13 Pricelist: change the way they where loaded (faster now) 2.5 08.10.13 Changed table names

2.4 28.09.13 Speed up customer prices

2.3 13.09.13 Added possibility to add attributes to price lists 2.2 02.09.13 Optimize grid functionalities, added multi selections 2.1 25.08.13 Normalization of pricelist tables

2.0 09.08.13 Added customer specific prices: Now you can choose if value is percent or not 1.9 07.07.13 Added ability to create

1.8 20.05.13 Added price list functionality

1.7 18.05.13 Added customer specific prices: from to values 1.6 15.03.13 Added price select rule for special price

1.5 04.02.13 Added customer discount

1.4 02.01.13 Performance optimization, added possibility to setup price select rule per customer and customer group

1.3 10.10.12 Make price select rule working

1.1 09.06.12 Changed the way the extension is loading prices internally 1.0 03.03.12 Initial version



Related subjects :