Categories
CMS Magento Mastering Development

Magneto2.3-How to make product category mandatory in Magento 2

I am using Magneto 2.3. I want product category field mandatory. see below my code: [![enter image description here][1]][1] escapeHtml(__(‘Product Category’)) ?>: getProductHintCategory()) : ?> escapeUrl($this->getViewFileUrl(‘Webkul_Marketplace::images/quest.png’)); ?>” class=’questimg’ title=”escapeHtml($helper->getProductHintCategory()) ?>”/> getIsAdminViewCategoryTree()) { ?> { “*”: { “Magento_Ui/js/core/app”: { “components”: { “sellerCategory”: { “component”: “Webkul_Marketplace/js/product/seller-category-tree”, “template” : “Webkul_Marketplace/seller-category-tree”, “filterOptions”: true, “levelsVisibility”: “1”, “options”: getCategoriesTree()?>, “value”: } […]

Categories
Database Development

SQL Server – Why am I getting TCP connections without sessions?

I enabled SSL with Forced Encryption enabled, using a self-signed certificate. Then I’ve set up automated monitoring to detect not secured connections (seems redundant, I know, but bear with me here), using the following T-SQL query: SELECT CONCAT(‘Not secured connection(s) detected of ‘ , ISNULL(QUOTENAME(COALESCE(ses.original_login_name, ses.nt_user_name, ses.login_name)), ‘an unknown login’) , ‘ from ‘, ISNULL(QUOTENAME(client_net_address), […]

Categories
Mastering Development

ERROR: Found input variables with inconsistent numbers of samples: [rows, columns]

i dont know what to do. I want to print out the classifier score but its not working. Can someone Help me? I really dont know what is the Problem maybe its something with the Numpy Array (numpy.arrange). Traceback (most recent call last): File "C:/Users/Maximilian.Grinik/PycharmProjects/Augenbewegung/main.py", line 27, in <module> xG_train,xG_test,yG_train,yG_test = train_test_split(xG,yG,test_size=0.33) File "C:\Users\Maximilian.Grinik\PycharmProjects\Augenbewegung\lib\site-packages\sklearn\model_selection\_split.py", line […]

Categories
CMS Mastering Development Wordpress

504 Gateway Time-out after custom plugin inserts data into mysql database

I have a custom plugin that inserts multiple rows into a custom table in the wordpress database. After about 50 seconds I get a 504 Gateway Time-out error. The 50 seconds is around about the time it takes to insert ~400 rows. Anything less, and the script completes just fine. I’ve added the usual things […]

Categories
Mastering Development

std::getline does not works inside a function

I have the following function:- void my_func(std::string b){ std::string name; std::cout << "Please enter the name\n"; std::getline(std::cin, name, ‘,’) b = name; std::cout << "b = " << b << "\n"; } The problem with this function is when I put it in a header file, the std::getline(std::cin, name, ‘,’) line of the code does […]

Categories
Mastering Development

How to call stored procedure in php using parameters

I need to call function in stored procedure mysql using php and return blank The stored procedure (function) on mysql kind like this: The procedure with parameters IN CREATE DEFINER=`multicahaya`@`%` PROCEDURE `mg_rtonner`( IN thn int(11), IN bln int(11), IN cabang VARCHAR(25) ) BEGIN #Routine body goes here… SET group_concat_max_len = 8192; SET @sql = NULL; […]

Categories
CMS Mastering Development Wordpress

Adding a column with multiple checkboxes to quick_edit_custom_box

sorry for my really long question. I have custom post-type called wp-music. This CPT holds a track title, song artist(s) and a few other columns. I wish to add this list of artists to the Quick Edit menu, and so I did the following: Step 1: Added the custom column to my artist post type […]

Categories
CMS Mastering Development Wordpress

Ajax filter – show all results that contain at least one filter

For a project I use Timber (TWIG) with WordPress. I’m trying to implement ajax filter with tags on a video template. But it doesn’t work like I would like. For the moment my system is too strict. Filters combine in the wrong way. Example : Video 1 tags : media // digital // health Video […]

Categories
Mastering Development

How to output blank spaces for missing attributes in CSV file from multidimensional array in PHP

I’m having a bit of an issue with outputting blank spaces AND making sure all my CSV data is outputted in the right spot, and was wondering how I could do this. I’m trying to format the outputs of my LDAP server search into a CSV format, but the issue is that some entry’s attributes […]

Categories
CMS Magento Mastering Development

magento 2 in category multi select attribute in option is not show?

:InstallData <?php namespace Vender\Extension\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Catalog\Model\Category\Attribute\Backend\Sortby as SortbyBackendModel; use Magento\Catalog\Model\Category\Attribute\Source\Sortby; class InstallData implements InstallDataInterface { private $eavSetupFactory; public function __construct(EavSetupFactory $eavSetupFactory) { $this->eavSetupFactory = $eavSetupFactory; } public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $eavSetup = $this->eavSetupFactory->create([‘setup’ => $setup]); $eavSetup->addAttribute( \Magento\Catalog\Model\Category::ENTITY, ‘choosesubcategoryslider’, [ ‘group’ => ‘Choose […]