Skip to content

Commit

Permalink
Update Router.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoducnhuiit committed Feb 3, 2023
1 parent 8c42a1b commit 864b85e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Controller/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ public function match(\Magento\Framework\App\RequestInterface $request)
$url_key .= ($key == 1) ? $value : "/".$value;
}
$model = $this->_brand->create();
$model->load($url_key, 'urlkey');
$brandLoad = $model->load($url_key, 'urlkey');


if (!empty($model->load($url_key, 'urlkey'))) {
$id = $model->load($url_key, 'urlkey')->getData('shopbrand_id');
if (!empty($brandLoad)) {
$id = $brandLoad->getData('shopbrand_id');
if($id){
$request->setModuleName('shopbrand')
->setControllerName('brand')
Expand Down

0 comments on commit 864b85e

Please sign in to comment.