vanilophp/demo

Not able to see shop main menu

Closed this issue · 14 comments

Hi I was trying my hand on Vanilo admin application, I followed as it in the documentation and also took the demo I am not able to see the shop drop down menu but in the screenshot I can see the shop main menu, please help in regards with the same. I am using

vanilo/admin - 3.0
vanilo/framework - 3.1

Am I missing anything here?
Please help
Screenshot 2023-04-10 at 4 21 11 PM

Did you add the module to concord.php?

Did you add the module to concord.php?
Hi @fulopattila122 thank you for your response

<?php

return [
    'modules' => [
        Konekt\AppShell\Providers\ModuleServiceProvider::class => [
            'ui' => [
                'name' => 'AmyShop', // Your app's name to display on admin
                'url'  => '/', // Base/Home URL after login (eg. dashboard)
            ],
        ],
        Vanilo\Foundation\Providers\ModuleServiceProvider::class => [
            'image' => [
                'taxon' => [
                    'variants' => [
                        'thumbnail' => [
                            'width'  => 250,
                            'height' => 188,
                            'fit' => 'contain'
                        ],
                        'header' => [
                            'width'  => 1110,
                            'height' => 150,
                            'fit' => 'contain'
                        ],
                        'card' => [
                            'width'  => 521,
                            'height' => 293,
                            'fit' => 'contain'
                        ]
                    ]
                ],
                'variants' => [
                    'thumbnail' => [
                        'width'  => 250,
                        'height' => 188,
                        'fit' => 'fill'
                    ],
                    'medium' => [
                        'width'  => 540,
                        'height' => 406,
                        'fit' => 'fill'
                    ]
                ]
            ],
            'currency'    => [
                'code'   => 'INR',
                'sign'   => 'Rs.',
                'format' => '%2$s%1$g' // see sprintf. Amount is the first argument, currency is the second
            ],
        ],
        Vanilo\Admin\Providers\ModuleServiceProvider::class,
    ],
    'register_route_models' => true
];

I have attached my concord.php for reference

What is the output of php artisan concord:modules -a?

This is the output of the above command

Screenshot 2023-04-11 at 6 58 09 AM

AppServiceProvider

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Konekt\Menu\Facades\Menu;


class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        $this->app->concord->registerModel(\Konekt\User\Contracts\User::class, \App\Models\User::class);
        if ($menu = Menu::get('appshell')) {
            // $menu->addItem('sales', __('Sales')); // <- New root level header
            // $menu->addItem('product', __('Product'), ['route' => 'vanilo.product'])->data('icon', 'product')->allowIfUserCan('list product');
            // $menu->addItem('funnels', __('Funnels'),
            //     ['route' => 'app.funnel.index'])
            //      ->data('icon', 'funnels')
            //      ->allowIfUserCan('list funnels');

            $stats = $menu->addItem('stats', __('Statistics')); // Root level group
            $stats->allowIfUserCan('view monthly revenues');

            // Add an item in the stats group
            // $stats->addSubItem('monthly_revenue', __('Monthly Revenue'), ['route' => 'statistics.monthly_revenue.index'])
            //       ->data('icon', 'chart')
            //       ->activateOnUrls('/statistics/monthly_revenue/*')
            //       ->allowIfUserCan('view monthly revenues');
        }
    }
}

Also it is laravel 10 that I am using, is that causing any trouble ?

No Laravel 10 is not an issue, but the Admin module definitely isn't properly loaded since it's not in the module list as seen on the command's output. I take a look...

»» OFF TOPIC but I find it funny, that we have exactly the same two lines in one of our private applications 😃

image

«« OFF

Ok thanks a lot @fulopattila122 is there any work around for this ? For the time being?

The above snippet I got it from one of your links from the documentation

What is the output of this command if you run it from your application's root folder?

php -r 'require "vendor/autoload.php";$c=require "config/concord.php";foreach ($c["modules"] as $key=>$val) {echo "$key: " . (is_array($val) ? "array" : $val) . "\n";}'

Another tip: try running migrations.

If it doesn't help, please show me what do you see on the page in the Settings -> Permissions -> "admin" role

Also, what is the output of this:

composer show vanilo/admin|head -11

?

Would you like any more help? If you managed to solve the issue, please consider briefly summarizing the problem and how it got solved. The community will appreciate it :)

Please also close the issue in that case. If you still need help, please answer my questions above 🙇

Hi @fulopattila122 I need to still try it I am currently out and not able to access my workstation I will try these steps once I am back to my workstation thank you for the help

It's all good, no rush 👍

@fulopattila122 it worked after doing migrations, thanks a lot for your help