小编Ash*_*war的帖子

如何在magento中提交表单后获取后期数据变量

如何获取帖子变量的数据?就像我使用post方法发布表单然后我可以使用$ _REQUEST或$ _POST获取它.我怎么能在mgento做到这一点?

magento

15
推荐指数
3
解决办法
4万
查看次数

docker 客户端必须提升运行才能连接

当我尝试构建 docker 应用程序时,出现以下错误。我正在运行的命令是docker build -t node_curd_exe .

error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=h3q9gxeprezyco28agiqe9jp2&shmsize=0&t=node_curd_exe&target=&ulimits=null&version=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

我还能做什么?

docker

14
推荐指数
2
解决办法
2万
查看次数

如何在 jest/enzyme React 中的表单提交处理程序之后测试函数和内部语句

我正在使用具有表单的 React 功能组件。我创建了一个表单处理程序,它触发并onSuccess关闭模型。onFailureonSuccess

现在我需要为、函数和模式结束语句编写测试。onFailureonSuccess

组件的代码是:

export const TestUpdateModal = function( props ) {

  const onSuccess = () => {
    MiModal.close( 'AccUpdate' );
  }

  const onFailure = ( message ) => {
    // show error message
  }

  const { handleSubmit } = updateFormHandler({
    onSuccess: onSuccess,
    onFailure: onFailure
  });

  return <form onSubmit={ e => handleSubmit( e ) }/>
}  

----------------------------

updateFormHandler is

    import { useMutation } from '@apollo/react-hooks';
    import UpdateProfile_MUTATION from '../../../graphql/mutations/updateProfile/updateProfile';

    export const updateFormHandler …
Run Code Online (Sandbox Code Playgroud)

reactjs jestjs enzyme

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

如何使用jquery ajax magento调用控制器

我已经在magento中创建了自定义模块,我想使用jquery ajax访问控制器,但我找不到正确的方法来执行此操作.
模板中的Ajax代码是

 jQuery(".deleteAttrKeyId").on("click",function(){
      var baseUrl="<?php echo Mage::getBaseUrl();?>";
      var idArr=this.id.split("-");
      attrKeyId=idArr[1];
      alert(this.id);
      jQuery.ajax({
        type: "POST",
        dataType: "JSON",
        data :{'id':attrKeyId},
        url :baseUrl+"groupprice/adminhtml_grouppricebackend/index",
        complete:function(){alert("completed");
          },
        success:function(result){
          alert(result);
          }

        });
    });
Run Code Online (Sandbox Code Playgroud)

布局中的块代码是

<groupprice_adminhtml_grouppricebackend_index>
<reference name="content">
<block type="groupprice/adminhtml_grouppricebackend" name="grouppricebackend"  template="groupprice/grouppricebackend.phtml"/>
</reference>
</groupprice_adminhtml_grouppricebackend_index>
Run Code Online (Sandbox Code Playgroud)

控制器代码是

<?php
class Group_GroupPrice_Adminhtml_GrouppricebackendController extends     Mage_Adminhtml_Controller_Action
{
public function indexAction()
{      
 echo  __FILE__;
}
}
Run Code Online (Sandbox Code Playgroud)

ajax magento

3
推荐指数
2
解决办法
2万
查看次数

在管理面板magento中显示模板路径

我正在使用magento管理面板,我想在模板路径上就像我们为前端做的那样,我通过安装扩展来尝试它,但它不起作用.请让我知道我该怎么做?

magento

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

使用带有magento的角度js有什么优势吗?

Angular js在市场上是新的,所以使用带有magento的角度js有什么优势 吗?

如果是,那么任何人都知道我们如何在一个项目中同时使用它们?

magento angularjs

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

如何解构ES6 JavaScript嵌套对象

我想在es6中构造对象,但没有得到结果。

let animal ={
      data:{
          typee:{
              title: "Cow",
              legs:4
          }
      }
} 

let {data:{typee:{title,legs}}}=animal;
Run Code Online (Sandbox Code Playgroud)

现在console.log(data)输出Error: data is not defined。我做错了什么?

javascript destructuring ecmascript-6

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

类型错误:(0,_reactTestRenderer.act)不是一个函数

renderHook我在测试用例中使用时遇到此错误。不确定是什么问题。

TypeError: (0 , _reactTestRenderer.act) is not a function

  13 | 
  14 |   it('allows to upload photos through the mutation', async () => {
> 15 |     const { result, nextUpdate } = renderHook(() =>
     |                                    ^
  16 |       usePhotosUpload({
  17 |         photosUploadMutation,
  18 |       }),

  at renderHook (../../../node_modules/react-hooks-testing-library/lib/index.js:151:30)
  at Object._callee$ (__test__/hooks/usePhotosUpload.test.js:15:36)
  at tryCatch (../../../node_modules/regenerator-runtime/runtime.js:62:40)
  at Generator.invoke [as _invoke] (../../../node_modules/regenerator-runtime/runtime.js:296:22)
  at Generator.prototype.(anonymous function) [as next] (../../../node_modules/regenerator-runtime/runtime.js:114:21)
  at asyncGeneratorStep (__test__/hooks/usePhotosUpload.test.js:13:103)
  at _next (__test__/hooks/usePhotosUpload.test.js:15:194)
  at __test__/hooks/usePhotosUpload.test.js:15:364
  at Object.<anonymous> (__test__/hooks/usePhotosUpload.test.js:15:97)
Run Code Online (Sandbox Code Playgroud)

jestjs enzyme

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