Jump to content

Export to csv button from Stock movements form not working


mihaiww

Recommended Posts

Hi again everyone.

Somebody can tell me why Export to csv button from Stock movements form not working!

I choose the warehouse and after this button is available.I click it page is refresed but nothing, not save automaticaly , not appears the dialog form with save as options.

 

Many thanks.

Link to comment
Share on other sites

Hi and thanks for reply

No error , after click the csv button prestashop icon turn (like waiting) and after this the page refresed without any exported file or dialog file for "save as option".

I use 1.6.1.4

Link to comment
Share on other sites

  • 2 years later...

Hi @mihaiww,

 

I've encountered the same issue even in 1.6.1.10.

Looking into it I found that the bug was in the export button itself - entities were escaped twice: https://i.imgur.com/hgZkbgJ.png

I fixed this by overriding the method initToolbar() method in AdminStockMvtControllerCore:

<?php

public function initToolbar()
{
	parent::initToolbar();
	if (isset($this->toolbar_btn['export-stock-mvt-csv'])) { // fix export link
		$this->toolbar_btn['export-stock-mvt-csv']['href'] = $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId();
	}
}

 

Hope it helps.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...