我有一个名为“MyMenu”的 PrestaShop 模块,我想通过 AJAX 调用调用此菜单。我的模块显示在hookFooter()方法中:
public function hookFooter()
{
$display = $this->display(__FILE__, 'megamenu.tpl', $smartyCacheId);
Tools::restoreCacheSettings();
return $display;
}
Run Code Online (Sandbox Code Playgroud)
我想用这个脚本显示:
<div class="load_menu"></div>
<script>
$(document).ready(function (e) {
$.ajax({
method: "POST",
url: "../modules/MyMenu.php",
data: {},
success: function (data) {
$('.load_menu').html(data);
}
})
});
</script>
Run Code Online (Sandbox Code Playgroud) 我想创建一个自定义本机组件,它呈现一行文本.此文本的长度是动态的,字体和大小是可配置的.
当我将自定义组件放置在标准<View />中时,View.onMeasure(本机)中提供的大小约束对于高度为零,这是MeasureSpec.EXACTLY.返回任何非零高度View.onMeasure都没有.
class App extends React.Component<{}, undefined> {
render() {
return (
<View style={{
flex: 1,
}}>
<CustomComponent />
</View>
)
}
}
Run Code Online (Sandbox Code Playgroud)
如何允许我的自定义本机视图测量自身并在测量和布局期间将其提供给React Native?
我ERR_TOO_MANY_REDIRECTS在 prestashop 管理面板上只收到模块和产品页面的错误。当我尝试连接页面时 url 是 contains ...security/compromised...。我更改了禁用的所有模块名称。但它对我没有帮助。
我该如何解决?我可以尝试哪些方法?
谢谢
我想删除prestashop中bo列表视图工具栏中的添加按钮有什么办法,(仅针对我作为单独模块创建的页面)
require_once(_PS_MODULE_DIR_.'addsocialmedia/addsocialmedia.php');
require_once(_PS_MODULE_DIR_.'addsocialmedia/classes/SocialMedia.php');
class AdminAddSocialMediaController extends ModuleAdminController
{
public $module;
public $html;
public $tabName = 'renderForm';
public function __construct()
{
$this->tab = 'socialmedia';
$this->module = new addsocialmedia();
$this->addRowAction('edit');
$this->explicitSelect = false;
$this->context = Context::getContext();
$this->id_lang = $this->context->language->id;
$this->lang = false;
$this->ajax = 1;
$this->path = _MODULE_DIR_.'addsocialmedia';
$this->default_form_language = $this->context->language->id;
$this->table = _DB_KITS_PREFIX_.'social_media';
$this->className = 'SocialMedia';
$this->identifier = 'id_social_media';
$this->allow_export = true;
$this->_select = '
id_social_media,
name_social_media,
social_media_url,
status
';
$this->name = 'SocialMedia';
$this->bootstrap = true;
$this->initList();
parent::__construct(); …Run Code Online (Sandbox Code Playgroud) 我正在使用hookDisplayAdminProductsExtra挂钩.这是1.6 prestashop版本的工作.但对于1.7不起作用.
这是我的代码
public function hookDisplayAdminProductsExtra($params)
{
$this->smarty;
$id_product = Tools::getValue('id_product');
$get_values = $this->getProductCurrencyRow($id_product);
$this->smarty->assign('get_values',$get_values);
$this->smarty->assign('id_product',$id_product);
$currencies = $this->getDefaultRates();
$this->smarty->assign('currencies',$currencies);
return $this->display(__FILE__, '/views/templates/admin/productcurrency.tpl');
}
Run Code Online (Sandbox Code Playgroud)
但是,当我安装我的插件prestashop版本1.7我有一些关于管理产品的问题额外钩这里是从1.7截图
新选项卡是模块选项名称,它不会听到产品选项菜单.hookDisplayAdminProductsExtra更改了新版本?我该怎么办?
谢谢.
我无法在HelperForm PrestaShop中设置输入类型编号.只有文本和密码类型正常工作.设置为数字类型时,输入框将消失.
$fields_form[0]['form'] = array(
'legend' => array(
'title' => $this->l('Settings'),
),
'input' => array(
array(
'type' => 'number',
'label' => $this->l('Number Input'),
'name' => 'NumberInput',
'required' => true
)
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'btn btn-default pull-right'
)
);
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 ubuntu 17.04 上安装 Rails,但出现错误。然后我尝试运行其他安装,但错误是相同的。
E: dpkg 被中断,您必须手动运行“sudo dpkg --configure -a”来纠正问题。
当我尝试执行sudo dpkg --configure -a时,我面临以下输出:
设置 python-crypto (2.6.1-7) ...
回溯(最近一次调用最后一次):
文件“/usr/bin/pycompile”,第 35 行,来自 debpython.version import SUPPORTED、debsorted、vrepr、\
文件“/usr/share/python/debpython/version.py”,第 24 行,来自 ConfigParser import SafeConfigParser ImportError:没有名为“ConfigParser”的模块 dpkg:处理包 python-crypto (--configure) 时出错:
子进程安装的安装后脚本返回错误退出状态 1
设置 python-sqlparse (0.2.2-1) ...
回溯(最近一次调用最后一次):
文件“/usr/bin/pycompile”,第 35 行,来自 debpython.version import SUPPORTED、debsorted、vrepr、\
文件“/usr/share/python/debpython/version.py”,第 24 行,来自 ConfigParser import SafeConfigParser
导入错误:没有名为“ConfigParser”的模块
dpkg:处理包 python-sqlparse 时出错(--configure):子进程安装的安装后脚本返回错误退出状态 1
设置 python-wheel (0.29.0-2) ...
回溯(最近一次调用最后一次):
文件“/usr/bin/pycompile”,第 35 行,来自 debpython.version import SUPPORTED、debsorted、vrepr、\
文件“/usr/share/python/debpython/version.py”,第 24 行,来自 ConfigParser import SafeConfigParser … prestashop ×5
module ×2
overriding ×2
php ×2
ajax ×1
android ×1
dpkg ×1
hook ×1
linux ×1
measure ×1
react-native ×1
redirect ×1
ubuntu ×1