14. FAQ

1. Background tasks are not executed

The most frequent issues reason

You probably have a cron issue : this is the server cron that executes background tasks. First, check if all background tasks are executed from menu

See also

ERP > Tools > Background tasks

If not, wait a few minutes

If background tasks are still not executed, your cron is probably misconfigured or blocked.

Then, manually request URL  www.mywebsite.com/cron.php

Next check your cron settings at the server level.

To display cron information, please read “Settings” section

http://documentation.boostmyshop.com/embedded_erp/4_stock_management.html#cron Cron is really blocked please look at


Please find here strategy to find the reason :

You cron must be blocked:

1 - Because the cron job of Magento is not running anymore

Please check your crontab in linux

2 - By a specific task

The strategy is to go to ERP > Tools > Background task and identify the oldest task which is blocking (with the low priority)


Go in Magento database, in the table cron_schedule and look which cron job is blocking other cron job

3. Product availability statuses are wrong

If you just installed ERP, it is advised to first initialize product availability statuses

See also

ERP > Tools > Product availability statuses

Click on Refresh button

If the problem remains, check that your cron / background task works properly.

4. Bug when creating shipment

When you create a shipment, stocks are decreased.

However, to know what warehouse use for stocks updated, ERP needs to know which warehouse is associated to the current order.

For this, ERP uses assignments.

Please, check that the current order’s website owns a warehouse for “preparation” role.

This can be set in ERP > Stocks > Warehouse

5. Sales order containing bundle

In Order to Prepare screen, “Stockless” tab contains orders with at least one product missing.

If bundle or configurable products are displayed in red, it means that you didn’t disable stock management for this products.


Go in the product sheet, in “Inventory” tab and disable stock management for your bundle and configurable products.

Then, return in Order to Prepare screen and click on Refresh button.

6. Unknown column exclude_from_supply_needs

To fix this issue, you have to refresh Magento indexes in System > Index management.

7. All ERP are blank

You probably made a mistake during layout and templates installation.

Please, check that you copied files in the right directory


Also, think to look if you activated the module output for MDN modules in System > Configuration > Advanced > Disable

8. No ERP menus available

It means that Magento doesn’t recognize extensions

  • Did you refresh Magento cache ?
  • Do app/etc/modules files are properly uploaded ?

9. I want to sell my supplier stock as my stock

1- Create a warehouse called for example “supplier

  1. Set assignment “sales” for your Website and Admin, but don’t set assignment “order_preparation

2- Synchronize the supplier stock

  1. If you have only ERP, you can import the supplier stock using CSV file in System > import/export
  2. If you have ERP with Dropshipping extension,  you can also import supplier stock via FTP http://documentation.boostmyshop.com/drop_shipping/3_configuration.html#stock-price-import

3- When an order is placed, the product availability status is “In Stock” if both of your stocks qty are sufficient. Order will be associated to the main warehouse and a supply need will be created.

10. Credit memo

“When I create a credit memo, the item is not back in stock.”

ERP does not returns back a product in stock when you create a credit memo because there are many possibles reasons to generate a credit memo.

A credit memo is an administrative process, you pay back the consumer.

-> it’s not a stock process in 100% of the cases.

Ex :

  • The product can be back in stock later, for example the customer is payed back, and send back the product and you receive it 1 week after
  • The product is not saleable again, and you can’t put in back to stock directly, you have to transfer it into a non saleable warehouse, so you have to select it...


There are many use cases and many different reasons.

When you use ERP, this behaviour is disabled even if you check the magento option for that

You have to do the stock movement manually.

If You use our RMA extension :http://www.boostmyshop.com/english/product-return-rma.html

You can qualify a return process and this behaviour is enabled depending of the return process you select.

11. Deadlock after product or attribute update

If you encounter some MySQL Deadlock in background task like

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

Please Upgrade to ERP >= 2.9.3 and use the option System > Configuration > ERP > Advanced Stock > General > Deadlock protection

Please note this option

  • Exists since ERP 2.9.3.x
  • is compatible since magento 1.6
  • Is not necessary is you have magento Enterprise, because you must require the support of Magento enterprise to provide you a patch.


If you use M2EPro, please upgrade to The last version of ERP patch too

12. Update backorders status in mass

To allow or disable backorders for some products, there is no import for that but magento provides a tool to do it:

See also

Go in Catalog > Manage Products

Checks all the products you want to update

On the grid, on the top corner right, there is a drop down menu

Mass action > Action > Update Attributes > Submit

Then in Inventory tab,  on “Backorders” option, check the box “Change”, and set the value you want

Click on Save.

13. Quantity increments

Within ERP you have an option to allow quantity increments on products.

To activate it, you have to go in

See also

System > Configuration > ERP > Advanced Stock > General

Set “No” for “Replace magento inventory tab in product sheet” option.

Then click on Save.

Now, you can go in Catalog > Product > Select a product > Inventory tab and look at the options  “Qty Increments”.

15 . Supply need is empty


Please, follow this document step by step, and check every point.

First of all, you have to wait the next execution of the Magento Cron. If the ERP is installed correctly, the Cron should be executed every 1 or 2 minutes.

If no Supply needs come, you should check some settings into “System -> Configuration”

-> On the tab on the left -> “ERP” -> “Purchase”

-> On the main page -> “Supply needs” section -> “Manufacturer attribute”

-> select “manufacturer” in the drop down list-> click the “Save” button.

Then, wait for the cron.

Your supply needs is steel empty, so please think to check if you not unactivated the Supply needs management

  • for each Warehouse, into :

“ERP” -> “Stock Management” -> “Warehouse” -> select a warehouse

-> On the tab on the left -> “Information”

-> On the main page -> “Disable Supply needs” : NOT Checked.

-> Click on save button in all case to apply the settings.

  • for each product, into :

“ERP” -> “Products” -> select a product

-> On the tab on the left -> “Purchase settings”

-> On the main page -> “Exclude from Supply needs” : NOT Checked.


Please note, supply need appear only is current stock quantity is BELOW warning stock level. If you have set warning stock level to 0, you will never have any supply need.

Also, think to save the configuration

See also

System > Configuration > ERP > Advanced Stock : click on “Save” button

See also

System > Configuration > Catalog > Inventory : click on “Save” button

You have ERP v2.9.1 or higher

If you have restored your magento database, it’s possible that the restore script have created some Table instead of the 3 SQL View required for erp :

  • erp_view_supplyneeds_base
  • erp_view_supplyneeds_global
  • erp_view_supplyneeds_warehouse

In this case, you must delete them and recreate them using the ERP install script.

Tips: To check views structure in SQL :

SHOW CREATE VIEW  erp_view_supplyneeds_warehouse

You have ERP 2.9.3.x or higher

Go in System > Configuration > Erp info > Sql view statusThen click on fix button.

If it does not work or does not display any button, go in your database, delete the tables or View :

  • erp_view_supplyneeds_base
  • erp_view_supplyneeds_global
  • erp_view_supplyneeds_warehouse

and try again to click on fix

Don’t forget to :

  •  Rename the folder /var/cache in to /var/cache_old
  •  Deactivate all caches, except default magento caches
  •  Deactivate back office accelerator.

16. Barcode is not reading correctly

Datalogic Memor not scanning barcodes correctly

The Datalogic Memor has an issue where it will miss the last digit of some or all barcodes, rendering the barcode read incorrect.

This is due to misconfiguration and can be fixed by doing the following:

    1. Click on the green barcode icon in the task bar and go to capture.
    1. Scan a barcode, it will report the type.
    1. Close the capture window, click the green icon again and go to configure.
    1. Select Reader Parameters.
    1. Select the appropriate barcode type, ie. UpcEan for EAN.
    1. Check the see if both CheckEvaluation and CheckTransmission are enabled, if not enable them both.
    1. Go to File -> Save.

Note: UpcEan are the most common i have come across. Go into UpC ean and make sure CheckEvaluation and CheckTransmission and enabled in UpcA, Ean8 and Ean13.

If some barcodes are still not scanning, enable it in UpcE also. Be sure to test after enabling. Enabling these settings when not required can create other issues.

18. Adjustment stock movement

Embedded ERP uses stock movement each time stock level increase or decrease.

It is mandatory to get the stock level equal to the sum of stock movements.

When someone (or a program) manually changes stock level without creating a stock movement, ERP creates a stock movement titled “Adjustment” to ensure the synchronization between stock level and stock movements. This happens when :

  • You manually change stock level from mass stock editor screen
  • An extension change stock level programmatically

If you have “adjustment” stock movement created when an order is placed, it means that the option system > configuration > inventory > stock options > decrease stock when order is placed IS ENABLED : ERP requires to get this option disabled to work properly

To identify the reason of an adjustment stock movement, ERP provides a tool :

  • Enable magento logs from system > configuration > developer > log settings > enable = yes
  • When a new adjustment stock movement is created, open log file in magento_dir/var/log/erp_adjustment_stock_movement.log
  • This log file contains the stack trace (php code) that raised this stock movement

19. Product sheet - Get back to Magento inventory tab

Before installing Embedded ERP, the inventory tab of Magento product sheets looks like :


When you got ERP installed, it’s replaced by :


You can however get back to the Magento original inventory view, by doing the following :

  • Select menu System > Configuration, and then ERP > Advanced Stock
  • Set the option Replace magento inventory tab in product sheet to No
  • Click on Save

You’ll then be able to set again options like Maximum Qty Allowed in Shopping Cart or Minimum Qty Allowed in Shopping Cart from this tab.

20. Reset ERP data

Use this script to reset all ERP data, you must also delete orders placed on the website.

Last, it will reset all stock levels to 0

Truncate tables

update cataloginventory_stock_item


qty = 0,

shelf_location = ‘’,

stock_ordered_qty_for_valid_orders = 0,

stock_reserved_qty = 0,

stock_ordered_qty = 0;

TRUNCATE backgroundtask;

TRUNCATE backgroundtask_group;

TRUNCATE order_to_prepare;

TRUNCATE order_to_prepare_item;

TRUNCATE order_to_prepare_pending;

TRUNCATE organizer_task;

TRUNCATE organizer_task_category;

TRUNCATE organizer_task_origin;

TRUNCATE product_availability;

TRUNCATE purchase_contact;

TRUNCATE purchase_manufacturer;

TRUNCATE purchase_manufacturer_supplier;

TRUNCATE purchase_order;

TRUNCATE purchase_order_product;

TRUNCATE purchase_packaging;

TRUNCATE purchase_product_barcodes;

TRUNCATE purchase_product_manufacturer;

TRUNCATE purchase_product_serial;

TRUNCATE purchase_product_supplier;

TRUNCATE purchase_sales_order_planning;

TRUNCATE purchase_shipping_delay;

TRUNCATE purchase_supplier;

TRUNCATE purchase_tva_rates;

TRUNCATE stock_errors;

TRUNCATE stock_movement;

TRUNCATE supply_needs;

TRUNCATE erp_sales_history;

TRUNCATE erp_stock_transfer_products;

TRUNCATE erp_stock_transfer;

TRUNCATE erp_sales_flat_order_item ;

Refresh ERP caches

Once all truncates are done, go back in magento, and run these updates :

  • Menu ERP > tools > Stock errors : click on “refresh all” button, and once it’s complete, click on “Mass fix error” button
  • Menu ERP > Order preparation > prepare orders : click on button “Force refresh cache”

21. Understand the different costs

The goal of this article is to explain the different cost in magento and erp, and how to use them.

Magento default cost attribute

By default, Magento has a attribute “cost” that is visible in

See also

catalog > manage products > [select product] > “prices tab”.

This attribute uses your store base currency, and can not be set with different currencies.

It will enable ERP (and you) tu use it.

ERP update this cost based on the stock level and the purchase order history.

Example :

Initially you have

0 unit

0$ cost

you purchase 10 unit at 30$ per unit

-> cost per unit is now 30 $

you sell 5 units

So, you still have 5 units in stock

-> cost per unit is still 30 $

Then you purchase 6 units at 20$

Now you have 11 units in stock

Cost will be updated

Calculation will be

((5 x 30$) + (6 x 20$)) / 11

-> cost per unit will be 29,09$

you sell 7 units

So it remain 4 units in stock

We assume you sell the oldest product (FIFO)

Because 4 is less than last purchase order Qty (5), only this last one is use for the calculation

Calculation will be

(4 x 20$) / 4

-> cost per unit will be 20 $

etc ...

This cost attribute is not designed to be manually change, this is an average cost based on purchase orders history and remaining stock.


If you don’t want ERP to update this value, you can disable option in system > configuration > purchase > purchase order > store product cost

My Cost attribute is empty 

please check :

  • if you have a cost attribute in magento
  •  if the cost attribute is linked to the attribute set of your product
  •  if there is at least a value inside
  • Please note ERP can automatically update your cost attribute after each purchase order received using System -> configuration -> ERP -> Purchase -> Purchase order -> Store product cost

If you never see the cost attribute filled in order Margin Tab or neither in the Catalog view of a product look at that :

To use it, you need to enable it for the simple products. There is the problem on all magento default installation:

By default, the cost attribute is only enabled on virtual products.

To activate it : go in catalog > manage attributes > attributes

Search for cost and edit it and enable it for “All products types” at at least for simple products.

Then think to add it to the “attribute sets” you are using for your products

See also

catalog > manage attributes > attributes set

Saved them

Then do a full reindex of Magento product attribute index.

Buying prices in product supplier associations

With ERP, you can associate a product to one or several suppliers : it can be managed in erp > products > [select product] > suppliers tab (you can also mass import those data using Import product / supplier association advanced profile.

At the product / supplier association level, 3 costs are available :

  • Last Unit Price (store currency) : this is the gross buying price with your supplier, using your store base currency
  • Last Unit Price (supplier currency) : this is  gross buying price with your supplier, using supplier currency
  • Last Price + cost : this is the buying price + landing cost calculated from the last purchase order. This field uses your store base currency

ERP automatically update these 3 fields when Purchase Order status goes to “waiting for delivery” status.

Buying price in purchase order

When you add a product in a purchase order, ERP can automatically initialize the buying price depending of the configuration :

  • If option system > configuration > purchase > purchase order > Use product cost is enabled, buying price is initialized with the cost in the product view
  • If option system > configuration > purchase > purchase order > Automatically fill product price from history is enabled, buying price is initialized with the  Last Unit Price (supplier currency) setup in the product / supplier association

If you disable both options, buying price is not initialized.

In any case, you can change the buying price manually in a purchase order.

ERP also supports a second buying price in a purchase order : this is the buying price PLUS the landing costs, calculated from the shipping fees. This second buying price is displayed just under the buying price :


I want to update my cost in magento but i can’t find it

In ERP you can’t modify the cost attribute of a product manually.

The attribute name is “cost” You have a to set this “attribute” in each “attribute set” of your products

 In catalog -> attribute -> manage attribute set, When you do that you choose a group in the list of attribute of the attribute set to put the “cost” inside

This “group” match with one of the “tab” in catalog -> product -> select a product -> edit

It could be the tab “price”, it could be something else, it is teh one you have chosen

Also, In catalog -> attribute -> manage attribute, please check if the cost attribute is assigned to “all product”. on many installation the attribute Cost is not set to all tye of product

If you do any modification listed above please reindex

then you will se the possibility to modify the cost attribute in magento interface

23. Order Preparation - Download documents troubleshooting

In all case the strategy is :

  • to disable options one ny one to identify which document cause problem ( Invoice ? Shipment ?)

See also

System > Configuration > Order preparation > Download Document


  • Test in magento the printing of invoice  (Sales-> Invoices-> select an invoice -> button print) and shipment (Sales-> Shipment -> Shipment -> Select a shipment -> Button print) and heck if you have the same problem
  • Install Magento extension conflict from your Boostmyshop account and check if you have a conflict on any PDF model

Blank page

  1. if you have a blank page in Magento you need to activate the error display in the index.php file of magento : (at root folder of installation) : uncomment the following line :

//ini_set('display_errors', 1); -> ini_set('display_errors', 1);

  1. If you encounter an error with an “Error report Number”, think to look at error report in /var/report/.

You will find some files with the error number, edit them with a simple text to see the detail.

  1. If you get an error 500, To display the errors on screen directly, you can activate report display in /errors/local.xml -> set “print” in the action field.

Then post on the support the message you get.

Timeout error

If you select a look of order, think to check you php setting to allow a longer script execution (php max execution time)

Zend_Pdf_FileParserDataSource error

I get this error when trying to print/downloads the documents in ERP > order preparation :

Fatal error : Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in **/home/interior/public_html/lib/Zend/Pdf/FileParserDataSource/File.php**  on line **41**

Here the solution:

Since magento 1.8 the print invoice or shipment may display fatal error because of a missing code, follow this steps to fix it.

1 - in /lib/Zend/Pdf/FileParserDataSource.php

replace the line

public function __construct();

by :

public function __construct($filePath);

2 - save the file

Error allowed memory size

When you want to download document, you got an error of memory size, please do :

Open app/code/community/MDN/Orderpreparation/Helper

Do a backup of Document.php, then open the original file.

Comment into the for condition :

for ($i = 0; $i < count($CommentsModel->pages); $i++){
    $pdf->pages[] = $CommentsModel->pages[$i];

will become

/*for ($i = 0; $i < count($CommentsModel->pages); $i++){
      $pdf->pages[] = $CommentsModel->pages[$i];

There is 3 if like this in the files. Comment all 3.

Error empty PDF

You just have installed Global PDF and now your PDF is empty.

See also

Go to app/code/local/MDN/Orderpreparation/Helper

and rename the “Document.php” to “Document.php.old”

Compatibility issue

Check if there is are any extensions which override the Invoice and Shipment PDF In magento extension conflict

If it is the case, please disable them to test

Please note if you have Fooman PDFcustomizer installed you can get a fatal error.

Fooman_PdfCustomiser_Model_Shipment and Fooman_PdfCustomiser_Model_Invoice

are incompatible with ERP and must be replace by Boostmyshop Global PDF for example

If you want to keep in Fooman PDF, there is an option in the code that enable Fooman to use Zend PDF :

See also


See also

line 17 : set COMPAT_MODE to true

File name downloaded not usable

Check and test this two cases

See also


around line 182  in function   _prepareDownloadResponse

->setHeader('Content-Disposition', '**inline** ;filename=' . $fileName)


->setHeader('Content-Disposition', '**attachment** ;filename=' . $fileName)

25. Purchase Order - Customize PDF

If you get the boostmyshop extension “Global PDF” the purchase order PDF can be customized through the XML file (see Global PDF documentation).

If you don’t get it , the PDF can be customized in :

See also


The method drawTableHeader(&$page) will provide the table for the purchase product PDF.

The other element are drawn through the method getPdf()

26. Display greek or cyrillic character in ERP pdf

Since ERP (May 2014) there is a native option in each ERP module to use  native font if necessary.

See also

System -> configuration -> ERP -> Advanced Stock -> general -> PDF use truetype font

See also

System -> configuration -> ERP -> Order preparation -> Miscellaneous -> PDF use truetype font

See also

System -> configuration -> ERP -> Purchase -> PDF Options -> PDF use truetype font

If you have a older version of ERP

  1. Upload from windows the file times.ttf in your magento folder: /media/times.ttf

You can find this file in microsoft windows in :

See also


  1. Replace in the code all lines that look like
$page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 10);


$page->setFont(Zend_Pdf_Font::fontWithPath(Mage::getBaseDir('media').'/times.ttf'), 10);


For Purchase order



For Picking List


Mode Merged


Mode Order by order


27. Order Preparation - How to import tracking label

Lets take an example :

Here the content of your import file coming from your own carrier software (open it with notepad ) :

100000053|0|test jackson|5 Penhill Industrial Park|||Banbury|OX16 1RW|||X|WTL00000000000004H2

So let’s analyse it :

  • we have some value separated by a “|” and there is 11 columns

So ERP template we will apply the same mask in ERP > Order preparation > carrier templates :

  • File Format = delimiter

- Field Separator = |

- Field Delimiter = none

- Skip first record = none

  • then create the same number as the file number so 11
  • don’t forget the order column number 0 = first , 1 = second , etc ...

28. Magento Order Status and ERP

ERP process, do stock reservation and display orders in Order preparation depending of the Magento order state.

A magento Order have

  • a state (it is an internal state, you can’t customize it and ERP base his calculation on it)
  • a status (should  be customized like “waiting for paypal” ...))
  • a display status (usually the same as the Status, many tiers extension enable to customize it)

You can check that in the tab preparation of an order

Usually the state is reliable and the status and display status is widely customizable by sellers for they own need using tiers extensions.

Stock reservation & order preparation

ERP will reserve and display in order preparation all order not with a state

- complete

- cancelled

- closed

Understanding of Magento States (and default Status) :

  • pending : a order not invoiced, not shipped
  • processing : an order invoiced even partially, not shipped or partially shipped
  • complete : an order completely invoiced, and completely shipped OR an order invoiced and shipped by partially cancelled
  • cancelled : an order completely cancelled, not shipped
  • closed :  an order completely refunded
  • holded : the order is holded by the admin, could not be complete

To cancel an order

  • If the order is not yet Invoiced, you can just click on cancel on magento order view

To complete an order

  • Invoice and ship all the products using ERP or magento dedicated buttons

29. I want to move ERP in magento menus

When you install ERP, the ERP menu entry is at the left end of the Magento back office menu

How to change it :

If you have ERP version :

  1. Enable magento cache
  2. remove line 61 in app/code/community/MDN/SalesOrderPlanning/etc/adminhtml.xml
  3. modify the number in the sort_order flag in Line 16 :in app/code/community/MDN/AdvancedStock/etc/adminhtml.xml

A smallest number will move ERP menu to the left, a bigger to right

  1. refresh magento cache

If you have ERP version or > :

  1. Enable magento cache
  2. modify the number in the sort_order flag in Line 16 :in app/code/community/MDN/AdvancedStock/etc/adminhtml.xml

A smallest number will move ERP menu to the left, a bigger to right

  1. refresh magento cache

30. Report for orders return incorrect ordered qty values

Problem :

After ERP installation :  Reports/Products/Products Ordered return wrong values

Solution :

In your site’s PhpMyAdmin

  1. backup eav_attribute table
  2. Can you run this query :

delete FROM eav_attribute WHERE attribute_code = ‘ordered_qty’

Then, refresh magento caches and indexes

31. Barcode - I want to mass print barcode

How to to mass print barcode 1) To mass print barcode for 1 product  :  please look at http://documentation.boostmyshop.com/embedded_erp/4_stock_management.html#barcode-label 2) To mass print barcode for a supplier delivery  : http://documentation.boostmyshop.com/embedded_erp/6_purchase.html#products-arrival-purchase-order-delivery 3) to mass print barcode for all product of magento at once :You need : http://www.boostmyshop.com/english/barcode-label.html and look at http://documentation.boostmyshop.com/barcode_label/4_how_to_print_labels.html

32. Barcode - scanning troubleshooting

If you encounter issues to scan barcodes :

  1. Barcode options Understanding : http://documentation.boostmyshop.com/embedded_erp/4_stock_management.html#barcode-label
  2. Please check if - you store your barcodes in the attribute you use in ERP- if there is any space at begin or at end of the barcode saved.

34. Purchase Order - How change logo PO email

How to change the default logo email ?

You must change the default logo email for transactional email in /skin/frontend/default/default/images/logo_email.gif

look at :


35. How to handle broken products

Sometime, you supplier deliver you some broken products aor a customer send you back a broken product

1) Stock management

  1. create a dedicated warehouse called “Non valuable”
  • check “exclude from supply needs”
  • remove all sales and order preparation assignments


  1. then you will be able to do stock movement to this warehouse to keep trace of theses broken products
  2. you can have listing of them using the export function of the  warehouse (ERP -> stock management -> warehouse -> select the warehouse -> export) :


2) Purchase

  1. enable defect delivery and set the defect delivery to the “Non valuable” warehouse using :

System -> configuration -> ERP -> Purchase -> Purchase order -> Use defect Delivery

System -> configuration -> ERP -> Purchase -> Purchase order -> warehouse for defect Delivery

  1. Then whe you will receive a product from a supplier, you will have the choice to choose in which warehouse you can receive the products


36. Fatal Error getBackend()

Fatal Error :

When you want to go to ERP -> Products, you got this error :

Fatal error: Call to a member function getBackend() on a non-object in /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 514

Go to Catalog -> Attribute -> Manage Attribute and search attribute :

  • name
  • manufacturer
  • cost

If one or more is missing, create it and associated it with all attribute set.

37. Grids goes to dashboard

If, when you use the ERP, you want to apply a filter on a grid and you are redirected to the dashboard, please follow this instructions.

Add to the file grid at the end of the file : (example the product grid : /app/code/community/MDN/AdvancedStock/Block/Product/Grid.php )

public function getGridUrl(){

$params = Mage::app()->getRequest()->getParams();
   if(isset($params['filter']) && $params['filter'] === ''){

      $params['filter'] = " ";

return $this->getCurrentUrl($params);

38. Supplier edit failed

Supplier edit failed

When you are on ERP > Purchase > Supplier and you want to save some updates on a supplier you got an error : “Item (MDN_AdvancedStock_Model_Catalog_Product) with the same id “77428” already exist”

Go to ERP > Product, on the grid ID# type the item ID of the error (in ou case it’s 77428). Copy this ID in “From and To”.

You will have a product, click on it. You are now in the ERP view of the product, click on supplier tab on the left.

Now you will see there is twice(or more) the same supplier. Remove duplication.

You can now save your supplier. If there is always the error, do the same thing with the new product id.

39. Order preparation - screen is slow

  1. Think to complete or cancelled your old orders. This screen si not design to keep permanently thousands orders. It must reflect the reality, the order you have not yet shipped.
  2. Don’t select too much orders at once, the screen si not design for that. The idea is to select a bunch of order then to ship them, then to select another lot etc ...
  3. If you have a lot of orders and you can”t cancel/complete them :

please comment

See also

in app/code/community/MDN/Orderpreparation/Block/Adminhtml/Widget/Grid/Column/Renderer/ContentToShip.php

line 31

$name .= mage::helper('AdvancedStock/Product_ConfigurableAttributes')->getDescription($productId)

and in

See also

app/code/community/MDN/Orderpreparation/Helper/Dispatcher.php in getRemainToShipForOrder()

40. Expiration dates with ERP

I . Expiration date

ERP does not manage the expiration date of your products, but we can propose you an alternative to have an historic.

  1. Purchase Orders

The first way is with purchase orders. When you receive your products from your supplier, you can fill the serial number with the expiration date like this : 10x : 2015-12-15

10x The quantity received
2015-12-15 . The expiration date of your product.

Then you can retrieve this date in ERP > Product > [your product] > Barcode Tab > Serial Numbers part.

Here an example :

_images/9eeb993bc26b0a4c0cff473d78dbf358.png _images/e787e6f5a89d5f350fc4ac70755070e0.png
  1. Packing

The second way is when you packing your orders, at the moment of packing you can fill the serial number by the same way with purchase order.

Here an example :

_images/8456862d8816ba881415ac97e1831450.png _images/6dcc9a96473f1ea8f1c8079dae38ac19.png

41. Change decimals settings in Magento

You want to change the decimal setting in Magento, you want price like :

  • 1,450.2500


  • 1450.00


  • 1450

Please follow this step with accuracy.

  1. Changes in Magento Core

First you will have to go to : /app/code/core/Mage/Directory/Model/

Here you can find a file called “Currency.php” DO A BACKUP OF THIS FILE and copy the backup in this folder.

Now you can edit the original file, open it and in function format there is a 2 hardcoded, you can modify it to the number of decimal you want.

  1. in you locale file of the language you selected

Now go to : /lib/Zend/Locale/Data/

And search for a file called XX.xml where XX = Your code language (en = English, fr = French, de = German ...)

DO A BACKUP OF THIS FILE  and copy the backup in this folder.

Open the original file, and search for :

  • decimalFormats
  • currencyFormats

And change the pattern according to your need

for example : #,##0.####

  1. Cleaning the Caches

Once you have done all of this, go to /var you will see a folder called “cache” rename it to “cache_old” or what you want.

Log out from your Magento back office then log in.

The modifications are applied.

42. Product Creation in magento

If you run a product creation script you have to go

in System -> configuration -> ERP -> ERP Info -> Product stock qty different from the Sum of stock movements

and the use the button :

- Update Stock Movements using stock quantity -

It will generate the missing stocks movement,

Do a force stock update and refresh the product availability status

43 . Stock movement not created

Stock movement are not created

When you create a shipment in magento, ERP will automatically create stock movement. If you don’t get new stock movement during shipment, it is probably due to a conflict with another extension.

TO check that point, follow these steps :

  • Install magento extension conflict (available for download in your customer account)
  • Once it is installed, go in menu system > extension conflict, and click on the “refresh” button

Then, check the conflicts : if you see a conflict on Core module = sales, core_class = models_order_shipment

Fix the conflict following instructions available with the “Display fix” link and try again

In case you do not see any conflicts, please go in your FTP in the following folder : var/log/erp_create_shipment.log

if you get an error message, please open a ticket and post the detail of your problem with the log file.

44. How to move ERP menu position in magento menu

If you want to move the ERP menu in the magento’s navigation bar, you have to change the value of ** attribute in:

  • app/code/community/MDN/AdvancedStock** /etc/adminhtml.xml ( line 16 )
  • app/code/community/MDN/Purchase /etc/adminhtml.xml ( line 228 )
  • app/code/community/MDN/SalesOrderPlanning /etc/adminhtml.xml (line 61 )

These three values must have the same value.

What value ?

To place ERP menu in first position after Dashboard —> 10

To place ERP menu in second position after Dashboard —> 20

To place ERP menu in third position after Dashboard —> 30


Don’t forget to refresh the cache

45. Column preparation_warehouse is ambiguous

If you get

SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘preparation_warehouse’ in where clause is ambiguous, query was: SELECT COUNT(*) FROM sales_flat_order AS main_table

Plays in SQL :

ALTER TABLE 'sales_flat_order_item'      DROP `comments`,       DROP `reserved_qty`,      DROP `preparation_warehouse`;

46. Backup database with ERP

When you make a backup or a restore of your magento database with ERP installed, it is possible to have an error message referring to the view of ERP. 

You have to exclude of backup these following views if you want make a backup / restore your database :

  • erp_view_supplyneeds_global
  • erp_view_supplyneeds_base
  • erp_view_supplyneeds_warehouse


This is not a problem because ERP views have not any data.

for example, to exclude them from your backup script :

mysqldump -u username -p database --ignore-table=database.table1 > database.sql

After your restore :

you must recreate these views using ERP > system > configuration > ERP > ERP Info > Sql view status

Then click on fix button of each View.

47. After a product creation in magento

Stock management of new products : 

If you create a new product creation in Magento, using the interface or an import.

The key point to understand is that you need to initialize the history of stock movement in ERP

If the product is a simple product , it must be stock managed,  else, please read :


Then go in :

System -> configuration -> ERP -> ERP Info -> Product stock qty different from the Sum of stock movements

and the use the button :

  • Update Stock Movements using stock quantity

48. Supply need - Screen crash because of MAX_JOIN_SIZE setting


SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay, query was: SELECT `erp_view_supplyneeds_global`.* FROM `erp_view_supplyneeds_global` WHERE (`erp_view_supplyneeds_global`.`product_id`=’XXX’)

It’s a problem of MYSQL configuration

Please, can you apply the solution in this link :

If you can access your MySQL settings, fix it directly in MySQL conf

Set directly in “app/etc/local.xml” like this:


49. Edit An Order In Magento and ERP stock Management

By default, when you hit the “Edit” button on a Magento Order, Magento does :

  1. Cancel the initial order
  2. Create a new Order

See also

This process is compatible with ERP.

ERP detects that the order has been cancelled and release all stock reservations.

The new order is created by Magento

The Magento Cron pass and ERP detect this new order and reserve stock and assign warehouse. DOC :


50. FilterSelected issue

If you get a fatal error on the order preparation screen

“Fatal error: Undefined class constant ‘filterSelected’ in ...

See also


It happend usually after upgrading to ERP or upper

Please remove the file

See also


52. Item (MDN_AdvancedStock_Model_Catalog_Product) with the same ID “XXX” already exists

This message can happen on the front or the back and the cause is the multiple warehouse system of ERP.

Technically speaking, without ERP, Magento has only 1 entry per product_id in the table cataloginventory_stock_item.

When you use ERP and you begin to add warehouses, ERP create more entries for a given product_id, and the unique key of this table become “product_id+stock_id”, where stock_Id is the warehouse_id.

When ERP is installed, it override some class of magento a add a join that prevent to see duplicate Item in the Catalog_Product collections.

So this problem can happen

  • when you disable ERP and you keep in the table cataloginventory_stock_item some multiple entries.
  • When you add some Extension that modify, usually on the front- the products collections.

Examples :

  • Mirasvit_SearchSphinx_Model_Observer , function singleResultRedirect
  • AYG_OutOfStockLast_Model_Observer , function catalogProductCollectionLoadBefore
  • Amasty_Conf_Helper_Data , function getSimpleProductWithMinPrice

etc ...

The solutions are

  • To modify the code of the function and to add a join with the cataloginventory_stock_item table to add a condition for stock_id = 1.
  • Or to remove the call of the function if possible

How to find such functions ?

  1. You can see them in the stack trace of the error you get initially
  2. Use out Extension Magento Extension conflict to search for
  • An event that is listened by an extension which is relative to “where you find the error” : ex : displaying a category, displaying a product ...
  • A conflict by an extension which is relative to “where you find the error” : ex : displaying a category, displaying a product ...

53. Order Preparation - Unable to add order

When you select an order to move in the ‘selected orders’ tab, you may get the “Unable to add order” error message.

This message occurs when :

  • The order is already added.
  • If the order does not exists because it was deleted.
  • If product in the order does not exists because it was deleted.
  • If there is 0 quantity to ship, may occur if stock is not reserved.

54. In ERP or - there are too much background tasks

There is a knwon issue regarding the fact to have too much background tasks in these 2 version. It has been fixed in 2.9.7.x and above.

Here the solution:

Issue 1 :

Too much “Update planning for order #XXXXXX (on planPlanningUpdate)” in app/code/community/MDN/SalesOrderPlanning/Helper/Planning.php in public function planPlanningUpdate($orderId) Line 29 to line 41, comment the function that plan a background task to refresh the planning

Issue2 :

Too much “‘Update product availability status for product #XXX (because of child refresh)” in app/code/community/MDN/SalesOrderPlanning/Model/SalesOrderPlanning.php in public function refreshAllPossibleParents() Line 403


mage::helper('BackgroundTask')->AddTask('Update product availability status for product #' . $parentId . ' (because of child refresh)',


mage::helper('BackgroundTask')->AddTask('Update product availability status for product #' . $parentId . ' (because of child refresh)',

55. Purchase Order - I can’t add products anymore

It is possible after an ERP upgrade that you are unable to add product(s) to a purchase order.

The solution is to clear your browser caches and to try to add a product again.