GeekShop admin dashboard always shows 2 products

Posted In General
  • stantyan 2 years ago
    Hi Admin,
    
    GeekShop admin dashboard always shows 2 products no matter how many products are added. Not a big deal for me to be honest. and I'm really afraid to change something inside backend/admin files.
    
    ![](https://app.box.com/representation/file_version_164476495569/image_2048/1.png?shared_name=g6zgnisrhmgucb7w8yjmztznnjx6lm57)
    
    [https://app.box.com/s/g6zgnisrhmgucb7w8yjmztznnjx6lm57](https://app.box.com/s/g6zgnisrhmgucb7w8yjmztznnjx6lm57)

    Hi Admin,

    GeekShop admin dashboard always shows 2 products no matter how many products are added. Not a big deal for me to be honest. and I'm really afraid to change something inside backend/admin files.

    https://app.box.com/s/g6zgnisrhmgucb7w8yjmztznnjx6lm57

  • devdojo 2 years ago
    Hey Stantyan,
    
    Wow, thanks for catching this and thanks for bringing this to my attention. I'll be sure to include this in the next update as well. For the meantime you can change line `23` inside of `app\Widgets\Products.php` from:
    
    ```
    $count = Voyager::model('Page')->count();
    ```
    
    to:
    
    ```
    $count = \App\Product::count();
    ```
    
    And you should be good to go. Thanks again for bringing it to my attention. 
    
    Talk to you soon.
    

    Hey Stantyan,

    Wow, thanks for catching this and thanks for bringing this to my attention. I'll be sure to include this in the next update as well. For the meantime you can change line 23 inside of app\Widgets\Products.php from:

    $count = Voyager::model('Page')->count();
    

    to:

    $count = \App\Product::count();
    

    And you should be good to go. Thanks again for bringing it to my attention.

    Talk to you soon.

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!