小编Ver*_*rse的帖子

要启用扩展,请验证它们是否已在这些.ini文件中启用 - Vagrant/Ubuntu/Magento 2.0.2

通过composer安装Magento 2.0.2时出现此错误:

Problem 1
 - Installation request for magento/product-enterprise-edition 2.0.2 -> satisfiable by magento/product-enterprise-edition[2.0.2].
 - magento/product-enterprise-edition 2.0.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.

To enable extensions, verify that they are enabled in those .ini files:

- /etc/php5/cli/php.ini
- /etc/php5/cli/conf.d/05-opcache.ini
- /etc/php5/cli/conf.d/10-pdo.ini
- /etc/php5/cli/conf.d/20-curl.ini
- /etc/php5/cli/conf.d/20-imap.ini
- /etc/php5/cli/conf.d/20-json.ini
- /etc/php5/cli/conf.d/20-mcrypt.ini
- /etc/php5/cli/conf.d/20-pdo_pgsql.ini
- /etc/php5/cli/conf.d/20-pgsql.ini
- /etc/php5/cli/conf.d/20-pspell.ini
- /etc/php5/cli/conf.d/20-readline.ini

You can also run `php --ini` inside terminal to see which files are used by …
Run Code Online (Sandbox Code Playgroud)

php ubuntu composer-php magento2

28
推荐指数
10
解决办法
9万
查看次数

Vagrant up - 找不到盒子“ubuntu/vivid64”

在 vagrant up 上不断收到此错误:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/vivid64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'ubuntu/vivid64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message …
Run Code Online (Sandbox Code Playgroud)

ubuntu virtualbox vagrant

6
推荐指数
1
解决办法
6981
查看次数

多个虚拟主机 - 无法访问此站点 Vagrant/Virtualbox

我在设置多个虚拟域时遇到问题。尝试了很多解决方案,没有任何效果。我只是错过了一些东西,但不知道是什么。至少可以说,这是一段令人沮丧的旅程。我设置了 2 个虚拟盒子:一个用于 Laravel 环境,一个用于 Magento 环境。他们都有同样的问题,域不起作用。这是magento的:

  • 文件夹:magento
  • 虚拟域:magento.box
  • 配置文件
  • ip: 192.168.10.10

当我在浏览器 192.168.10.10 中输入时,它运行良好,但如果我输入magento.box它,则说明:

This site can’t be reached 
magento.box’s server DNS address could not be found.
Run Code Online (Sandbox Code Playgroud)

对于 Laravel 也是一样。

Magento 虚拟机

提供-ubuntu-15.10.sh:

#!/usr/bin/env bash

# Ubuntu 15.10 (GNU/Linux 4.2.0-34-generic x86_64) / ubuntu/wily64

# Update Ubuntu
# apt-get update

# Apache
echo "----- Provision: Installing apache..."
# apt-get install -y apache2 apache2-utils

echo "ServerName localhost" > "/etc/apache2/conf-available/fqdn.conf"
a2enconf fqdn
a2enmod rewrite
a2dissite 000-default.conf

# Folders
echo "----- …
Run Code Online (Sandbox Code Playgroud)

ip dns virtualbox hosts vagrant

4
推荐指数
1
解决办法
6088
查看次数

将用户自定义字段值添加到订单项详细信息

与供应商(WC供应商)一起开发WooCommerce网上商店.

我需要显示我在供应商资料中创建的自定义字段.它应显示在项目和供应商名称下order-details.php.

如何按卖家/供应商ID显示个人资料字段?
有人可以帮帮我吗?

这是我将要撒谎的屏幕截图:

订单详细信息

配置自定义字段

向用户个人资料页面添加自定义字段

add_action( 'show_user_profile', 'wp_added_user_profile_fields' );

function wp_added_user_profile_fields( $user ) {

    ?>

    <table class="form-table">

        <tr>

            <th><label for="billing_enumber"><?php _e( "eNumber", 'woocommerce' ); ?></label></th>

            <td>
                <input type="text" 
                       name="billing_enumber" 
                       id="billing_enumber" 
                       class="regular-text"
                       value="<?php echo esc_attr( get_the_author_meta( 'billing_enumber', $user->ID ) ); ?>"/>

                <span class="description"><?php _e( 'Please enter your eNumber.', 'woocommerce' ); ?></span>
            </td>

        </tr>

    </table>

    <?php
}
Run Code Online (Sandbox Code Playgroud)

将更新功能添加到用户配置文件的自定义字段

add_action( 'edit_user_profile', 'wp_added_user_profile_fields' );

    function wp_save_added_user_profile_fields( $user_id ) {

        if ( current_user_can( 'edit_user', $user_id ) ) {

            update_user_meta( $user_id, 'billing_enumber', …
Run Code Online (Sandbox Code Playgroud)

php wordpress custom-fields orders woocommerce

3
推荐指数
1
解决办法
2943
查看次数

无法在Linux guest虚拟机中挂载文件夹 - mesg:ttyname失败:设备的ioctl不合适

Vagrant不会挂载文件夹.尝试了这么多解决方案,没有任何效果.

版本:Vagrant 1.8.1/Ubuntu 15.10/Virtualbox 5.0.16

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/wily64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: …
Run Code Online (Sandbox Code Playgroud)

virtualbox hosts vagrant vagrantfile ubuntu-15.10

1
推荐指数
1
解决办法
7367
查看次数