OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Menu Not Showing please explain me on this

This topic contains 7 replies, has 3 voices, and was last updated by  Ingole Avinash 3 months, 2 weeks ago.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #38013
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi Avinash,
    Please specify, which version of orocommerce are you using and share the code.

    #38017

    Ingole Avinash
    Participant
    #38026
    Michael
    Michael
    Keymaster

    Well, if you can archive the contents of src/Acme/Bundle/NewBundle directory and provide it, it would be much easier for other forum members to help you find the problem.

    #38027

    Ingole Avinash
    Participant

    Hi Michael
    My Bundle name is TestBundle- > drectory :-> Src/Acme/TestBundle

    Src/Acme/TestBundle

    Controller/DefaultController.php
    <?php

    namespace Acme\TestBundle\Controller;

    use Symfony\Bundle\FrameworkBundle\Controller\Controller;
    use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
    use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

    class DefaultController extends Controller
    {
    /**
    * @Route(“/hello”, name=”acme_link”)
    * @Template()
    */
    public function indexAction()
    {
    return array(‘name’ => “John Doe”);
    }
    }

    Code in Resources/config/oro/navigation.yml

    navigation:
    menu_config:
    items:
    acme_tab:
    label: Acme label
    uri: ‘#’
    extras:
    position: 300
    acme_tab_link:
    label: Acme link label
    route: acme_link
    tree:
    application_menu:
    children:
    acme_tab:
    children:
    acme_tab_link: ~

    titles:
    acme_link: My link page title

    Code in Resources/config/oro/routing.yml
    acme_test_bundle:
    resource: “@AcmeTestBundle/Controller”
    type: annotation
    prefix: /acme

    Code in Resources/config/routing.yml
    acme_test_homepage:
    path: /
    defaults: { _controller: AcmeTestBundle:Default:index }

    Code in Resources/config/services.yml

    services:
    acme_test.example:
    class: Acme\TestBundle\Example
    arguments: [“@service_id”, “plain_value”, “%parameter%”]

    Code in Resources/views/Default/index.html.twig
    {% extends “OroUIBundle:Default:index.html.twig” %}
    {% block content %}
    <h1>Hello, {{ name }}!</h1>
    {% endblock content %}

    code in TestBundle.php
    <?php

    namespace Acme\TestBundle;

    use Symfony\Component\HttpKernel\Bundle\Bundle;

    class AcmeTestBundle extends Bundle
    {

    }

    Please find the error and let me know where i am wrong

    #38033
    Michael
    Michael
    Keymaster

    I do not see src/Acme/TestBundle/Resources/config/oro/bundles.yml
    Without this file the system will not know that your bundle exists.

    #38035
    Michael
    Michael
    Keymaster

    Please follow all the steps described in https://oroinc.com/b2b-ecommerce/doc/current/dev-guide/extend-and-customize/how-to-create-new-bundle to create a new bundle first and verify that it is recognized by the application (using Symfony profiler, like described in this article) before trying other things like adding menus, etc.

    #38036

    Ingole Avinash
    Participant

    Hi Michael

    I have created this
    src/Acme/TestBundle/Resources/config/oro/bundles.yml
    bundles:
    – Acme\TestBundle\AcmeTestBundle

    But still custom menu not showing

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No