Shopware6: Plugin configuration is missing - shopware

I'm writing my first Shopware 6 plugin and following this howto
But the navigation entry for Plugins will not show up. (URL: admin#/sw/settings/index) and the menu looks like this:
but it should look like this:
My plugin is active (checked in backend), the tables were created, so I guess it is loaded.
I copied the config.xml file from the tutorial into my plugin and validated it (just to be sure).
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/master/src/Core/System/SystemConfig/Schema/config.xsd">
<card>
<title>Basic Configuration</title>
<title lang="de-DE">Grundeinstellungen</title>
<input-field>
<name>email</name>
<copyable>true</copyable>
<label>eMail address</label>
<label lang="de-DE">E-Mailadresse</label>
<placeholder>you#example.com</placeholder>
<placeholder lang="de-DE">du#beispiel.de</placeholder>
<helpText>Please fill in your personal eMail address</helpText>
<helpText lang="de-DE">Bitte trage deine persönliche E-Mailadresse ein</helpText>
</input-field>
<input-field type="single-select">
<name>mailMethod</name>
<options>
<option>
<id>smtp</id>
<name>English smtp</name>
<name lang="de-DE">German smtp</name>
</option>
<option>
<id>pop3</id>
<name>English pop3</name>
<name lang="de-DE">German pop3</name>
</option>
</options>
<defaultValue>smtp</defaultValue>
<label>Mail method</label>
<label lang="de-DE">Versand-Protokoll</label>
</input-field>
</card>
<card>
<title>Advanced Configuration</title>
<title lang="de-DE">Erweiterte Einstellungen</title>
<input-field type="password">
<name>secret</name>
<label>Secret token</label>
<label lang="de-DE">Geheimschlüssel</label>
<helpText>Your secret token for xyz...</helpText>
<helpText lang="de-DE">Dein geheimer Schlüssel für xyz...</helpText>
</input-field>
</card>
So what is the precondition to show the Plugin navigation entry?

Ok, the problem is, I'm looking at the wrong place.
for the settings tab, you will need an own module with an settingItem
-- Shyim
If one is using a config.xml as I do, you can configure it within the plugin configuration hidden behind the three dots.

Related

How to create reusable Components in .NET MAUI?

I have just recently started using .Net MAUI. But now I'm wondering how to use a piece of code, e.g. a self-made navigation bar on all my pages, because it doesn't make sense to write the same code on all 10 pages. I like to know if there is a way to create a component that can be reused like in React or Angular?
PS: This question is not specific to a navigation bar but to the general reuse of code in .NET MAUI.
I have so far watched various videos & articles on this topic, however, it is more about custom controls and did not help me. Most articles corresponded to what was conveyed in this video. I also came across this article, but it didn't help me either.
Thanks for your help :)
First, you can create a new .xaml file named Name.xaml. You can write some codes in it.
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CusComponents.Name">
<ContentView.Content>
<StackLayout Padding="10">
<Label Text="Name" FontAttributes="Bold" />
<Label Text="First name" />
<Entry x:Name="FirstName" Placeholder="First name" />
<Label Text="Last name" />
<Entry x:Name="LastName" Placeholder="Last name" />
</StackLayout>
</ContentView.Content>
</ContentView>
Second, you can use it in the page you want like this. You need to add an xmlns reference to the top of the XML file– this is like a using statement in a C# file. Using the namespace structure for the sample project, this will be xmlns:custom_components="clr-namespace:CusComponents".
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:custom_components="clr-namespace:CusComponents"
x:Class="CusComponents.MainPage">
<custom_components:Name />
</ContentPage>
Here is the view of the code:

How to add custom form group inside the product.twig(catalog/view/theme/default/template/product/) in Opencart 3.0.2.0 using Ocmod

I am planning on adding custom option which can input steel dimension the customer wants and can purchase. But I am not able view this on the product end and there is no error in the log. Even in the product view page am not getting errors on the console and this code was not visible after using inspect on the page.
snippet of the code I used:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Module Steel Display</name>
<version>1.0</version>
<author>JD</author>
<link></link>
<code>product_steel_display</code>
<file path="catalog/view/theme/default/template/product/product.twig">
<operation>
<search><![CDATA[<div id="product">]]></search>
<add position="after"><![CDATA[<div class="form-group">
<label class="control-label" for="input-option">{{ diameter_option }}</label>
<select name="diameter" id="diameter" class="form-control">
<option value="0">8mm</option>
<option value="1">10mm</option>
<option value="2">12mm</option>
<option value="3">16mm</option>
<option value="4">20mm</option>
<option value="5">25mm</option>
<option value="6">32mm</option>
</select></div>]]>
</add>
</operation>
</file>
</modification>
In modification file ,your script is added after the and there is a {% if options %} condition,when you slect option form admin panel then this will be visible.enter image description here
see this image , you need to select a option to enable this script

Google Custom Search results includes html with “nocontent” tag

Our site have Google Custom Search set up. Instructions from Google have been followed, including downloading the CSE.xml file and adding “a new attribute enable_nocontent_tag="true" to the CustomSearchEngine tag”. The rest of the CSE file is left to default. The Search engine keywords field have been left empty. The “nocontent” class have been added to the menu and the underlying menu items which exists on all pages. The page have been running with the “nocontent” class on the menu for 2 weeks.
The problem is that if the searchterm occurs in the menu it will then appear in the results.
This is an example of our menu html:
<header class="nocontent page-head">
<nav class="main-nav-section">
<ul>
<li class="nocontent">
###
</li>
</ul>
</nav>
</header>
When we go to Google Search Console under the menu item “Crawl” and use Fetch as Google, then the html comes up as expected with the “nocontent” class on the menu.
This is our cse.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<CustomSearchEngine id="###" creator="###" language="da" encoding="UTF-8" enable_suggest="true" enable_nocontent_tag="true">
<Title>###</Title>
<Description>###</Description>
<Context>
<BackgroundLabels>
<Label name="_cse_hinwieyku6m" mode="FILTER" />
<Label name="_cse_exclude_hinwieyku6m" mode="ELIMINATE" />
</BackgroundLabels>
</Context>
<LookAndFeel nonprofit="false" element_layout="1" theme="7" custom_theme="true" text_font="Arial, sans-serif" url_length="full" element_branding="show" enable_cse_thumbnail="true" promotion_url_length="full" ads_layout="1">
<Logo />
<Colors url="#008000" background="#FFFFFF" border="#FFFFFF" title="#0000CC" text="#000000" visited="#0000CC" title_hover="#0000CC" title_active="#0000CC" />
<Promotions title_color="#0000CC" title_visited_color="#0000CC" url_color="#008000" background_color="#FFFFFF" border_color="#336699" snippet_color="#000000" title_hover_color="#0000CC" title_active_color="#0000CC" />
<SearchControls input_border_color="#D9D9D9" button_border_color="#666666" button_background_color="#CECECE" tab_border_color="#E9E9E9" tab_background_color="#E9E9E9" tab_selected_border_color="#FF9900" tab_selected_background_color="#FFFFFF" />
<Results border_color="#FFFFFF" border_hover_color="#FFFFFF" background_color="#FFFFFF" background_hover_color="#FFFFFF" ads_background_color="#fff7f5" ads_border_color="#FFFFFF" />
</LookAndFeel>
<AdSense />
<EnterpriseAccount />
<ImageSearchSettings enable="false" />
<autocomplete_settings />
<sort_by_keys label="Relevance" key="" />
<sort_by_keys label="Date" key="date" />
<cse_advance_settings enable_speech="true" />
</CustomSearchEngine>
Note: I'm assuming that your question is the following statement:
The problem is that if the searchterm occurs in the menu it will then appear in the results.
I think you might be misinterpreting the purpose of the nocontent class. The documentation says:
When Google Custom Search sees this tag, we'll ignore any keywords it contains and won't take them into account when calculating ranking for your Custom Search engine.
At the end of that document is also the following section:
Using nocontent won't impact your site's performance in Google Web Search, or our crawling of your site, in any way. We'll continue to follow any links in tagged content; we just won't use keywords to calculate ranking for your Custom Search engine.
So, the purpose of nocontent is not to prevent the included content from appearing in your CSE results but just to prevent any keywords in the included content from influencing the ranking of the results.
You can find some more discussion on this topic in the Google Custom Search support forums, for example in this thread.
P.S. There is a different product, the Google Search Appliance, which does support excluding content from indexing via googleoff/googleon tags.

How to make sections in Xpages look like this

I am baffled. In the oneUI 3 documentation page there is a nice section. It looks like this:
I create a new db and set the theme to 3.0.2 and put in the code below, and it looks nothing like what I am trying to produce.
How can I use the OneUI documentation to reproduce what I see there?
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:section id="section1" header="Header"
headerStyle="lotusSectionHeader2">
</xp:section>
</xp:view>
Good point. It looks like this:
Note, the "Widget Container" control (xe:widgetContainer) in the XPages Extension Library is roughly equivalent to the OneUI Section control. You can see that in Extension Library Demo App at: XPagesExt.nsf/OneUI_WidgetContainer.xsp
It might be a better fit to design the page using that control rather than the xp:section control.
Also, in the OneUI 3 doc that you link to, on the right of the page, 25% down the page, there's a Theme dropdown where you choose "default" or "gen2".
The behavior you're asking for looks like the "gen2" behavior (seems like OneUI 2),
while your screenshot of what it looks like is closer to the "default" (OneUI 3) behavior.
You may want to investigate how to enable the gen2 appearance.
If you paste this code from the documentation does it work? If it does then you need to move the standard html elements to xpage elements.
<!-- section is an HTML5 element. Use div if you are using HTML4. -->
<section class="lotusSection2">
<!-- header is an HTML5 element. Use div if you are using HTML4. -->
<header class="lotusSectionHeader"><div class="lotusInner"><a class="lotusArrow" role="button" aria-expanded="true" aria-controls="sectionBodyID" href="javascript:;" title="Collapse section"><img class="lotusTwistyOpen" src="../../css/images/blank.gif" alt="" aria-label="Collapse section" /><span class="lotusAltText">▼</span></a><h2 class="lotusHeading">Section Header</h2><a class="lotusIcon lotusActionIcon" href="javascript:;" role="button" aria-haspopup="true" aria-owns="[menuID]"><img src="../../css/images/blank.gif" alt="" /><span class="lotusAltText">Actions</span></a></div></header>
<div id="sectionBodyID" class="lotusSectionBody">
<div class="lotusChunk">Data goes here....</div>
<header class="lotusSubheader"><a class="lotusArrow" role="button" aria-expanded="true" aria-controls="subsectionID" href="javascript:;" title="Collapse section"><img class="lotusTwistyOpen" src="../../css/images/blank.gif" alt="" aria-label="Collapse section" /><span class="lotusAltText">▼</span></a><h3 class="lotusHeading2">Subsection</h3></header>
<div id="subsectionID" class="lotusSubsection">
More data goes here....
</div>
</div></section><!--end section-->
As Maire points out, the Widget Container control does what you want using the following code:
<xe:widgetContainer id="widgetContainer1"
titleBarText="Section Header" collapsible="true"
style="width: 300px;">
<xe:this.dropDownNodes>
<xe:basicLeafNode label="test1"></xe:basicLeafNode>
<xe:basicLeafNode label="test2"></xe:basicLeafNode>
<xe:basicLeafNode label="test3"></xe:basicLeafNode>
</xe:this.dropDownNodes>
More data here...
</xe:widgetContainer>
But as she points out, the look & feel you posted is for the Gen2 theme, which isn't implemented in XPages. So what you get is this:

How do I enable userpics in Movable Type

On the user management admin page I can assign userpics to users, but I can't work out how to enable users to set them themselves.
The following code is in the Profile Edit Form template of my System Overview, but the userpic field doesn't appear on the form itself (all the other fields seem to be fine).
<mt:SetVarBlock name="field-content">
<mt:If name="userpic">
<div id="userpic-preview">
<$mt:Var name="userpic"$>
</div>
<input type="file" name="file" id="file" />
<mt:else>
<input type="file" name="file" id="file" />
</mt:If>
</mt:SetVarBlock>
<$mt:Include module="Form Field" id="file" class="" label="Userpic"$>
I'm a complete novice when it comes to Movable Type, having muddled my way through customising the default theme to get a layout I'm satisfied with, so it's quite possible that I'm missing something obvious.
Profile Edit Form is part of the community pack. it will only be used if you are creating a blog with community blog theme.

Resources