小编Ref*_*lon的帖子

在magento自定义模块中自定义电子邮件发送

我正在开发一个模块,该模块将在订单完成7天后发送电子邮件.我一直在发送电子邮件.我可以在管理员中看到交易电子邮件中的电子邮件模板.但是电子邮件没有发送.

这是我的confix.xml部分,包括电子邮件模板.

<template>
        <email>
            <recurring_order_email_template translate="label">
                <label>Recurring order email</label>
                <file>coeus_recurring_order_email.html</file>
                <type>html</type>
            </recurring_order_email_template>
        </email>
    </template>
Run Code Online (Sandbox Code Playgroud)

这就是我在控制器操作中发送电子邮件的方式

 $emailTemplate = Mage::getModel('core/email_template')
            ->loadDefault('coeus_recurring_order_email');

    $emailTemplateVariables = array();
    $emailTemplateVariables['var1'] = 'var1 value';
    $emailTemplateVariables['var2'] = 'var 2 value';
    $emailTemplateVariables['var3'] = 'var 3 value';

    $emailTemplate->getProcessedTemplate($emailTemplateVariables);

   $emailTemplate->setSenderName('sender name');
    $emailTemplate->setSenderEmail('sender@test.com');
    try {
        $emailTemplate->send('myemail@gmail.com', 'bla bla',$emailTemplateVariables);
    } catch (Exception $e) {
        echo $e->getMessage();
    }  
Run Code Online (Sandbox Code Playgroud)

我不知道为什么它不起作用.

email magento

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

CSS:悬停目标而不是点击

我有一个滑块,效果很好。但是,我有一个小问题。当我将鼠标悬停在其中一个<li>s 上时,我想更改滑块图像,而不是单击它们时。

这可能吗?我找到了这个链接,但也许已经有一些新的样式可用?

.slide {
  position: absolute;
  display: none;
  left: -150;
}

.next {
  font-size: 50px;
  height: 50px;
  line-height: 50px;
  position: absolute;
  top: calc(50% - 25px);
  right: 0;
}

.prev {
  font-size: 50px;
  height: 50px;
  line-height: 50px;
  position: absolute;
  top: calc(50% - 25px);
}

.slider .slide:target {
  transition: 1s;
  left: 0;
  z-index: 999;
  display: block;
}

ul {
  padding-top: 250px
}

ul li:hover>a:target {
  left: 0;
  transition: 1s;
  z-index: 9999;
}
Run Code Online (Sandbox Code Playgroud)
<div class='slider'>
  <div class='slide' id="slide1" …
Run Code Online (Sandbox Code Playgroud)

html css pure-css

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

Strapi v4 抛出 cors 异常

我是 Strapi 的新手,我已经下载了 Strapi v4,并且我使用 vue.js 作为前端。

\n

现在我创建了类别,并尝试使用我的 vue 应用程序获取这些类别,但我\xe2\x80\x99m 收到 cors 错误。

\n
Access to XMLHttpRequest at \'http://localhost:1337/api/categories\' from origin \'http://localhost:8080\' has been blocked by CORS policy: The value of the \'Access-Control-Allow-Origin\' header in the response must not be the wildcard \'*\' when the request\'s credentials mode is \'include\'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.\n
Run Code Online (Sandbox Code Playgroud)\n

文档中中,我看到我可以覆盖 cors 中间件上的原点,但我不知道怎么做。

\n

我\xe2\x80\x99已经尝试过解析,然后设置配置,但这破坏了cms。

\n
  {\n    resolve: \'strapi::cors\',\n    config: {\n …
Run Code Online (Sandbox Code Playgroud)

javascript cors strapi

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

库存设计数据库的颜色和大小

我正计划进行库存数据库设计,以便跟踪我们店里的产品.我正在考虑在数据库中存储一个具有所有大小和颜色的数组,如:

array('S-groen' => 6,'M-groen' => 0,'L-groen' => 2,'S-zwart' => 9,'M-zwart' => 0,'L-zwart' => 3);
Run Code Online (Sandbox Code Playgroud)

S是大小,而groen是颜色.

但这样做是好的做法,还是有更好的方法?

所以我的数据库将是:ID - product_id - aantal.在aantal将是阵列.

php database database-design inventory

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

新声明前面的Java关键字

我想学习一些Java.

当我运行以下代码时,它的工作原理:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

/**
 *
 * @author me
 */
public class Test {

    int myAge;

    public getAge( ){
        system.out.println(myAge);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Test Tester = new Test();
        Tester.myAge …
Run Code Online (Sandbox Code Playgroud)

java

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

Yii样式与CActiveDataProvider或CListView分页

我想改变Yii分页的类.看起来很糟糕.但我不知道如何改变班级.我已经尝试了很多不同的东西,这就是我现在所拥有的:

控制器代码:

$dataProvider=new CActiveDataProvider('Producten',array(
         'criteria'=>array(
         'condition'=>'categorie=:cat AND subcategorie=:subcat',
         'params'=>array(':cat'=>$cat,':subcat'=>$subcat),
     ),
     'sort'=>array(
        'attributes'=>array(
        'naam', 'prijs'
     ),
     ),
    'pagination'=>array(
        'pageSize'=>1,
     ),
));
Run Code Online (Sandbox Code Playgroud)

查看代码:

$this->widget('zii.widgets.CListView', array(
    'dataProvider'=>$dataProvider,
    'itemView'=>'_view',
    'htmlOptions' => array('class' => 'pag'), //<---------- THIS DOES NOT WORK
));
Run Code Online (Sandbox Code Playgroud)

分页工作,但造型是令人敬畏的.目前的课程是:yiiPager

请帮忙 :)

php pagination yii

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