diff --git a/library/Class/CriteresRecherche.php b/library/Class/CriteresRecherche.php index 9d9c102d648b6e3154992e634dcea5daaab12a05..0cbf7424009f1cc998b30028b6a9acdfa9ec16f5 100644 --- a/library/Class/CriteresRecherche.php +++ b/library/Class/CriteresRecherche.php @@ -332,11 +332,11 @@ class Class_CriteresRecherche { public function getPanier() { $panier = null; - $id_panier=$this->getParam('id_panier',''); + $id_panier = $this->getParam('id_panier',''); if ($id_user=$this->getParam('id_user')) $panier = Class_PanierNotice::getLoader()->findFirstBy(['id_user' => $id_user, - 'id_panier' => $id_panier]); + 'id' => $id_panier]); return $panier ? $panier : Class_PanierNotice::find($id_panier); } diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php index 696fcb1603019fcb182a41d03787ef8679859b46..472d25295e132c9a3a1a59fda0e5b9b047878613 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php @@ -1627,7 +1627,7 @@ class RechercheControllerSimpleActionWithListeFormatVignettesTest extends Recher /** @test */ public function linkAddToCartShouldBePresent() { - $this->assertXPath('//div[@class="vignette_lien_panier"]//a[contains(@href, "/panier/ajout-ajax/id_notice/")][@data-popup="true"]'); + $this->assertXPath('//div[@class="vignette_lien_panier"]//a[contains(@href, "/panier/add-record-ajax/id_notice/")][@data-popup="true"]'); }