Magento2 admin grid: SQL error when sorting by specific field

Database table columns are displayed in custom grid in adminhtml. One of the field has name ‘precision’ and this causes SQL error when I sort the grid by this field (as this is mysql reserved word and must be used like this:

ORDER BY `precision` ASC

The question is: how to escape it or use an alias to avoid SQL error?

This field is defined in xml file like this:

    <column name="precision">         <argument name="data" xsi:type="array">             <item name="js_config" xsi:type="array">                 <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>             </item>             <item name="config" xsi:type="array">                 <item name="editor" xsi:type="array">                     <item name="editorType" xsi:type="string">text</item>                     <item name="validation" xsi:type="array">                         <item name="validate-digits-range" xsi:type="string">0-8</item>                     </item>                 </item>                 <item name="filter" xsi:type="string">text</item>                 <item name="dataType" xsi:type="string">text</item>                 <item name="align" xsi:type="string">left</item>                 <item name="label" xsi:type="string" translate="true">Precision (0 - 8)</item>                 <item name="sortOrder" xsi:type="number">60</item>             </item>         </argument>     </column> 

Magento2 : Error The “Is New” attribute value is empty. Set the attribute and try again

Getting error Magento2: Error The “Is New” attribute value is empty. Set the attribute and try again. when adding new product category

Warning: ltrim() expects parameter 1 to be string, array given in /home/magentoiknoortec/public_html/vendor/magento/module-catalog/Model/Category/FileInfo.php on line 136

enter image description here

How to get dropdown product attribute value Magento2

I have created a product drop-down attribute and assigned a value to it on the product.

I need them on product detail page.

$  _attributeValue = $  _product->getResource()->getAttribute('product_type')->setStoreId(0)->getFrontend()->getValue($  _product); echo $  _attributeValue; 

Output as

NO

On print($ _attributeValue) my output

Magento\Framework\Phrase Object ( [text:Magento\Framework\Phrase:private] => No [arguments:Magento\Framework\Phrase:private] => Array ( ) )

But for product text attribute I get the output.

Magento2 How do I see the raw files, I’m just on the admin

I’m very new to this, I’m doing this for a client. I see there is a content section where I can edit the blocks. I suppose I can edit the custom js to add a javascript file to call my API.

I’m try to send a success or thank you order details back to my order tracking app. (I need to read a cookie from the web page, so I have to do this on the js).

So, somewhere is there welt pixel source files, or is Magento2 all UI driven?

Tax/VAT field configuration is not working on multistore Magento2 Core

I have a multistory website as Retail-Website and Wholesale-Website

Configuration with fresh Magneto2.2 at Store >> Configuration >> Customer Configuration >> Show Tax/VAT Number

Retail-Website enter image description here

Wholesale-Website enter image description here

When I check the front-end of customer registration the configuration dint apply I did cache clean, I tried different combination of the setup dint work.

In Table customer_eav_attribute_website I can see the configuration is correctly added.

I tried this in version 2.2 and in 2.5 fresh project.

Magento2 Tax/VAT field not showing properly in customer registration based on admin configuration

I have Two Website in my magento2 webA & webB

I want “Tax/VAT number” field in different scenarios on my website

webA enabled and required

webB enabled and optional

I did the configuration on Store >> Configuration >> Customer Configuration >> Show Tax/VAT Number

webA >> required

webB >> optional

When in look to the front-end of my store under create customer I see both the stores have Required and when I do cache refresh it goes optional.

I don’t know why this happen, Everything seems to have malfunction.

Scenarios 1

Admin Input

webA >> required

webB >> optional

Store output

webA >> required

webB >> required

After flush cache storage Store output

webA >> optional

webB >> optional

Scenarios 2

Admin Input

webA >> required

webB >> required

Store output

webA >> required

webB >> required

After flush cache storage Store output

webA >> required

webB >> required

Scenarios 3

Admin Input

webA >> optional

webB >> required

Store output

webA >> optional

webB >> optional

After flush cache storage Store output

webA >> optional

webB >> optional

Please help me on this.