Frontend – To remove the "SKU" column from the order details on the "My Account" page

To do this, you must override two phtml files

module-sales / view / frontend / templates / order / items.phtml
module-sales / view / frontend / templates / order / items / renderer / default.phtml

Go over the following path,

app / design / frontend / Vendor / Theme / Magento_Sales / templates / order / items.phtml
app / design / frontend / Vendor / Theme / Magento_Sales / templates / order / items / renderer / default.phtml

PHP – Add custom checkout information to the confirmation page, emails, and order details

I'm trying to implement an offer where the user gets a free T-shirt when they place their first order.

I have managed to have the information displayed perfectly on the checkout page when the result is that it is the first order. However, this information will not appear on the confirmation page (thank you page), in the customer order info e-mails or in the order details of when I need to process the order.

All help grateful. I have so far:

// -----------------------------------------

add_action (& # 39; woocommerce_review_order_after_cart_contents & # 39 ;, & # 39; checkout_review_order_custom_field & # 39;);

Function has_bought ($ user_id = 0) {
global $ wpdb;
$ customer_id = $ user_id == 0? get_current_user_id (): $ user_id;
$ paid_order_statuses = array_map (& # 39; esc_sql & # 39; wc_get_is_paid_statuses ());

$ results = $ wpdb-> get_col ("
SELECT p.ID FROM {$ wpdb-> prefix} posts AS p
INNER JOIN {$ wpdb-> prefix} postmeta AS pm ON p.ID = pm.post_id
WHERE p.post_status IN (& # 39; wc- ". Implode (" & # 39 ;, & # 39; wc- ", $ paid_order_statuses)." & # 39;)
AND p.post_type LIKE # shop_order & # 39;
AND pm.meta_key = & # 39; _customer_user & # 39;
AND pm.meta_value = $ customer_id

// Count the number of orders and return a Boolean value, depending on whether it is greater than 0
Return number ($ results)> 0? true wrong;

Function checkout_review_order_custom_field () {
if (has_bought ())
echo & # 39; & # 39 ;;
echo & # 39;T-shirt × 1Free (1st order)& # 39 ;;

Ease of Use – UX Benchmarking: How Many Details Should a User Collect in a Business Product?

It is very valuable to collect benchmark data about a user's experience over time. The problem we come across is how much information we should ask our user to make informed decisions from the data we collect. We are working on a corporate product with many different functions in many different areas of the product. So I am not sure how much data beyond our few KPIs should be queried by our users when asked "Do you want to give feedback?" The survey model is displayed for the different types of users using the many different areas in the system. Does it make sense to create a system-wide benchmark without capturing the area where the user is most likely or most frequently used, as we capture the benchmark data in more detail for each feature of the product?

The concern is what we do with the data we collect from a user we do not know much about – the user could use multiple parts of the system and we can do some analysis, but there would be a lot of assumptions. Has anyone working on a company product collected benchmark data that could convey insights?

Crossbow, repeating details in 3.5E

I've recently covered 3.5E rules for crossbows that repeat themselves, which is a bit confusing. As the rules dictate "As long as it holds bolts, you can reload it by pulling the reload lever (a free action)." Does that mean that I can load a new one in the suitcase after a shot or with the other hand the next shot "finished" must do?

Thank you all.

Creating a blank Data View Web Part with Sharepoint Designer no longer allows data source details to be accessed

With SharePoint Designer 2013, I can no longer access a list data source
on SharePoint Online when creating a DVWP

Steps to Reproduce.

  1. Create a new Web Part Page in SPD.
  2. Edit the new page in advanced mode.
  3. Place the cursor in the ZoneTemplate tag.
  4. Click Insert -> Data View -> Blank Data View.
  5. Place the cursor in the newly created DataSources tag.
  6. Click on Insert -> Data Source -> and select a list.
  7. In the data source pane, click the Refresh Data Source link

The server returned a nonspecific error while retrieving data
from the data source. Check the format and content of your
Ask and try again. If the problem persists, contact the server

Did a fiddler session.
Get 500 responses.

soap: ServerException of type & # 39; Microsoft.SharePoint.SoapServer.SoapServerException & # 39; was triggered. An error has occurred.

An attempt was also made to update a data source on an existing DVWP with the same result.

Someone who has this problem?

Started within the last week

I emptied my SPD cache and tried two different clients.

Remove version details from PackageReference

I am writing performance tests for a .NET package. I have to compare the performance of the current build with the latest version. The test project is a test project in the .NET SDK format.

At the time of creation, the base version is used to develop the test and referenced by package Reference in .csproj.

At runtime, I try to force a specific version to load Assembly.LoadFrom before accessing all types in the package.

Unfortunately, it looks like this package Reference The item causes the test assembly to reference the package with an equivalent of true: Nevertheless, I invite the new build Assembly.LoadFromAs soon as I touch one of the package classes, another instance is loaded from the app directory, which corresponds to the version in NuGet.

When I analyze dependencies at runtime, I get

PerformanceTests, Version =, Culture = neutral, PublicKeyToken = null -> ReferencedPackageAssemblyName, Version =, Culture = neutral, PublicKeyToken = null

that confirms my theory. The new build has version 2.4.x.x,

The question is: how do I tell package Reference so as not to refer to a particular version, e.g. to like not correct would do for project reference?

Alternatively, is there a better setup to do a test experiment with a new build compared to baseline (please answer in a comment)?

magento2 – How do I create a separate log file to print the admin details that delete a customer profile?

In your di.xml

  1. app / code / vendor / modules / etc /di.xml

            Magento  Framework  Filesystem  Driver  File
            custom logger
                Manufacturer  Module  Logger  Handler
  1. Create a logger folder in your module and Logger.php file

app / code / vendor / module / logger / logger.php

<? php

Namespace Vendor  Module  Logger;

Class Logger extends  Monolog  Logger
  1. Create a … handler.php File in the logger folder

app / code / vendor / modules / logger / handler.php

<? php
Namespace Vendor  Module  Logger;

use monologue  logger;
Use Magento  Framework  Logger  Handler  Base.

class Handler extends  Magento  Framework  Logger  Handler  Base
/ **
* Logging level
* @ var int
* /
protected $ loggerType = Logger :: INFO;

/ **
* Filename
* @ var string
* /
protected $ fileName = & # 39; /var/log/custom.log&#39 ;;

Use this instead in your module use Psr Log LoggerInterface; Add your custom logger Use Vendor Module Logger Logger.

Use Vendor  Module  Logger  Logger.

class test
public function __construct (
Logger $ logger
) {
$ this-> logger = $ logger;

You can use it as

$ this-> logger-> info (& # 39; this is a custom logger);

I hope it helps.

Lost documents – Requesting (reclaiming) a French Schengen visa without my old passports and details of my old visa

I am a Chinese citizen currently living in the UK. My previous passport contained a valid French Schengen Tourism Visa stolen in June. After watching another thread, it seems that the only option I have left is to get a new visa through a brand new application (if you can confirm that kindly, that would be very grateful!).

However, when I tried to use the online application system to apply for a French visa, I had to enter my previous visa expenses, including the valid data. Unfortunately, I have no copies for them and the original visas were lost along with my stolen passport, so it seemed unlikely that I could complete this part. I'm just wondering what to do in this phase. Should I continue with the application, as if I had not received a Schengen visa in the last five years (although I actually have three)?

If not, since the online application system is rather unclear about the contact I can make, should I contact the TLS or the French Embassy to solve my application problem?

Plugin Development – Generate Static Page to display search results / details for API

I'm pretty new to WordPress, but well experienced in PHP. I've looked at other examples, and most code examples are about creating posts and searching the list of search results to customize the ad.

What I have is a web form in WordPress that I intercept and pass the query to an external API and get back a list of results. I do not want to use an IFRAME.

Currently, I have a form that appears when a short code is specified on a page. However, if someone clicks the search button, the form action is blank, so returning to the same page and being recognized. If the button is in the post-back vars, the results are retrieved and displayed by the API. If the button does not exist, the form is displayed.

This results in two things. I need a special results page. The search form can appear anywhere and be formatted arbitrarily, horizontally across the page, vertically in a sidebar or just big and bold in the body.

In addition, I need to be able to click on one of the entries in the results to get more detailed information.

What is the best way to achieve this? Because I'm PHP-oriented, I'm considering programmatically registering two URLs or pages that I can set my form action to. Or, as I've just come up with, I need to create two new dynamic pages with two new short codes, like "short_code_result_list" and "short_code_result_detail", register those short codes and then call the functions in the usual way. Check if the corresponding GET / POST variables exist and follow the appropriate steps to generate the list. Point the user to the previous page if these variables are not set.

How would you achieve that?