Forums › 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 5 years, 2 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- January 31, 2019 at 1:21 am #38011
Hi This is Avinash
I Followed this link and created bundle and copied all code but not able to find Menu at admin side
https://oroinc.com/b2b-ecommerce/doc/current/dev-guide/extend-and-customize/how-to-create-and-customize-application-menu - CreatorTopic
- AuthorReplies
- January 31, 2019 at 2:52 am #38013
Hi Avinash,
Please specify, which version of orocommerce are you using and share the code.January 31, 2019 at 4:12 am #38017I am using orocommerce 3.0
i copied exact code by reffering this
https://oroinc.com/b2b-ecommerce/doc/current/dev-guide/extend-and-customize/how-to-create-and-customize-application-menuJanuary 31, 2019 at 6:11 pm #38026Well, 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.
January 31, 2019 at 8:50 pm #38027Hi Michael
My Bundle name is TestBundle- > drectory :-> Src/Acme/TestBundleSrc/Acme/TestBundle
Controller/DefaultController.php
<?phpnamespace 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 titleCode in Resources/config/oro/routing.yml
acme_test_bundle:
resource: “@AcmeTestBundle/Controller”
type: annotation
prefix: /acmeCode 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
<?phpnamespace Acme\TestBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AcmeTestBundle extends Bundle
{}
Please find the error and let me know where i am wrong
January 31, 2019 at 11:08 pm #38033I do not see src/Acme/TestBundle/Resources/config/oro/bundles.yml
Without this file the system will not know that your bundle exists.January 31, 2019 at 11:10 pm #38035Please 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.
January 31, 2019 at 11:29 pm #38036Hi Michael
I have created this
src/Acme/TestBundle/Resources/config/oro/bundles.yml
bundles:
– Acme\TestBundle\AcmeTestBundleBut still custom menu not showing
- AuthorReplies
The forum ‘OroCommerce’ is closed to new topics and replies.