magento2 – Magento 2 Rest APIs return multiple interface classes

on magento 2, i want to return a custom object on my custom id, i have a code like this on the file Hz Clients Api TransactionInterface.php

so when on the api method rest I select the first option then it will come back HzClientsApiDataFirstOptionDataInterface object and if i select the second option then it will come back HzClientsApiDataSecondOptionDataInterface, is it possible to do this at rest api magento 2?

NOTE: I can not use the projection exception because the output format of the projection exception is different from the required one.

magento2 – Add a custom field in the form of Checkout for Magento 2 shipping address?

Below, I have a shipping address form of the payment page and I would like to add another field. (P.O. Box) under this form. I tried searching all the forums and most of the answers were based on passing.

MagentoCheckoutBlockCheckoutLayoutProcessor.
I checked app/code/company/Checkout/etc/di.xml but did not refer layoutprocessor.

I'm still confused from where this form pulls the values ​​of MagentoQuoteApiDataAddressInterface or MagentoCheckoutviewfrontendlayoutcheckout_index_index.xml

enter the description of the image here

How can I add a custom field to this form?

magento2 – How to change the number of items in a row Magento 2

I've covered topics like this one:
Magento 2 change the number of articles per line

All claim that if I want to change the line of my articles to display 4 instead of 5, then I should change to a file named _listings.less.

It seems pretty simple, but my problem appeared when I found out that this file was missing.

In fact, the structure of my files is very different. I did a search on my FTP to find the file but it did not find it.

I miss the web folder in / public_html / app / design / frontend / Outline / outline6 / Magento_Catalog

I have looked around me, but it seems to me that I have to find this file to do it officially, and not in a way not recommended.

How can I move from here?

I appreciate your time.

magento2 – Code Sniffer Results: The use of the exec () function is forbidden

I have downloaded the new version of the Magento market extension. And I have a sniffer code error during technical tests:

The use of function exec() is forbidden
severity : 10
Line : 441
Column : 17
Source : Magento2.Security.InsecureFunction.Found

How should I replace exec ()?

I'm using the server command and I can not just delete exec ().

magento2 – How to format the date and price in the grid of the ui Magento 2 component

I want the date format start and end at dd-mm-y, offer price at xxx, xxx.xx

My column


        
            
                dateRange
                dd-MM-y
                asc
                Start Date
                1
            
        
    
    
        
            
                dateRange
                dd-MM-Y
                asc
                End Date
                1
            
        
    
    
        
            
                textRange
                asc
                Offer Price
                1
            
        
    

Help me, please.

magento2 – Where can I restructure the HTML code for the magento 2 product introduction page?

I'm trying to thematize my product view page, but I can not find the correct file to replace to extract all the data where I want it.

in my /app/design/frontend/theme/Magento_Catalog/templates/product/view I can see a lot of different template files for some imported items, like Add to cart and details.

What I'm looking for is a file in which these are extracted, so that if I wanted, I could wrap the details.phtml and addtocart.phtml files in two side-by-side divs.

After migrating magento 1 to magento2 while trying to reindex, I had an error

Unknown error in the client grid indexing process:

SQLSTATE (42000): Syntax Error or Access Violation: Column & # 39; created_in & # 39; of the BLOB / TEXT 1170 column used in the key specification without key length, the query was: CREATE TABLE IF NOT EXISTED customer_grid_flat (
entity_id int UNSIGNED NOT NULL COMMENT & # 39; entity ID & # 39 ;,
name text NULL COMMENTARY & # 39;
email varchar (255) NULL COMMENTARY & # 39; Email & # 39;
group_id int NULL HOW & # 39; Group_id & # 39;
created_at default NULL timestamp NULL COMMENTARY & # 39; Created_at & # 39;
website_id int NULL COMMENTARY & # 39; Website_id & # 39;
confirmation varchar (255) NULL COMMENT & # 39; Confirmation & # 39;
created_in text NULL COMMENTARY & # 39; Created_in & # 39 ;,
dob date NULL COMMENTARY & # 39; Dob & # 39;
gender int NULL COMMENTARY & # 39; Genre & # 39;
taxvat varchar (255) NULL COMMENT 'Taxvat',
lock_expires NULL timestamp by default NULL COMMENT 'Lock_expires'
shipping_full text NULL COMMENT & # 40; Shipping_full & # 39;
billing_full text NULL COMMENTARY & # 39; Billing_full & # 39;
billing_firstname varchar (255) NULL COMMENT & # 39; Billing_firstname & # 39;
billing_lastname varchar (255) NULL COMMENT & # 39; Billing_lastname & # 39;
billing_telephone varchar (255) NULL COMMENTARY & # 39; Billing_telephone & # 39;
billing_postcode varchar (255) NULL COMMENTARY & # 39; Billing_postcode & # 39;
billing_country_id varchar (255) NULL COMMENT & # 39; Billing_country_id & # 39;
billing_region varchar (255) NULL COMMENTARY & # 39; Billing_region & # 39;
billing_street text NULL COMMENTARY & # 39; Billing_street & # 39;
billing_city varchar (255) NULL COMMENTARY & # 39; Billing_city & # 39;
billing_fax varchar (255) NULL COMMENTARY & # 39; Billing_fax & # 39;
billing_vat_id varchar (255) NULL COMMENTARY & # 39; Billing_vat_id & # 39;
billing_company varchar (255) NULL COMMENT & # 39; Billing_company & # 39;
PRIMARY KEY (entity_id)
INDEX CUSTOMER_GRID_FLAT_GROUP_ID (group_id)
INDEX CUSTOMER_GRID_FLAT_CREATED_AT (created_at)
INDEX CUSTOMER_GRID_FLAT_WEBSITE_ID (website_id)
INDEX CUSTOMER_GRID_FLAT_CONFIRMATION (confirmation)
INDEX CUSTOMER_GRID_FLAT_CREATED_IN (created_in)
INDEX CUSTOMER_GRID_FLAT_DOB (dob)
INDEX CUSTOMER_GRID_FLAT_GENDER (gender)
INDEX CUSTOMER_GRID_FLAT_LOCK_EXPIRES (lock_expires)
INDEX CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID (billing_country_id)
FULL TEXT FTI_76EE125693165A11F2D49A0116049156 (name, email, taxvat, shipping_full, billing_full, billing_firstname, billing_lastname, billing_telephone, billing_postcode, billing_region, billing_city, billing_fax, billing_vat_id, billing_company)
) HOW = = customer_grid_flat = ENGINE = INNODB charset = utf8 COLLATE = utf8_general_ci

magento2 – In the API, call get data How to restrict the extraction of certain attributes?

By default, all attributes are obtained using API calls. It is therefore sufficient to restrict certain attributes. It is not possible to extract via an API call. How can we get the same thing? How to send only the attribute select in the API call?

E.g http://localhost.com/index.php/rest/V1/products/:sku

above API call give all the details about the product, so I want to restrict some attributes and these attributes are not included in the result

How is an idea possible?

magento2 – How to make the content inside the "gift options" open by entering the basket?

Hi, I'm trying to edit this file: vendor / magento / gift-message-module / view / frontend / web / template / gift-message.html

Is there a way to make content inside the div with the default open "gift-item-block" class?

Here is the code:


 

Thank you!

magento2 – I want to add a new template when I click on the send button

Battery Exchange Network

The Stack Exchange network includes 175 question-and-answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange