我是Magento的新手,想要有效地学习Magento.我知道Maegnto是基于zendframe的工作.我之前没有在Zend框架中工作过.在学习Magento之前是否有必要学习Zend Framework?
我的magento存储区正在占用巨大的磁盘空间,并且已超过7.5 GB磁盘空间。我有超过12k的产品。
我已经完成了以下操作,但是并没有产生明显的效果
在类别页面上,当用户点击"添加到购物车"按钮时,我想在poupup中显示与特定产品相关的销售产品,以便用户可以选择在购物车中添加产品和产品.
<script>
jQuery(function() {
jQuery(".single_add_to_cart_button, .add_to_cart_button").click(function(evt) {
//evt.preventDefault();
var product_id = jQuery(this).attr("data-product_id");
jQuery.ajax({
type: "POST",
url: "<?php echo get_site_url(); ?>/wp-admin/admin-ajax.php",
data: {action: 'myajax-submit', id: product_id},
cache: false,
success: function(data) {
jQuery("#result").html(data);
}
});
//return false;
})
})
Run Code Online (Sandbox Code Playgroud)
在functions.php中,我编写了以下代码
add_action( 'wp_ajax_nopriv_myajax-submit', 'myajax_submit' );
add_action( 'wp_ajax_myajax-submit', 'myajax_submit' );
function myajax_submit(){
$product_id = $_REQUEST['id'];
}
Run Code Online (Sandbox Code Playgroud) 嗨,我正在尝试构建简单的目录浏览器浏览文件夹和子文件夹uing php RecursiveDirectoryIterator ..我需要如何创建这个的帮助.我已经开始使用以下代码.
$dir = dirname(__FILE__); //path of the directory to read
$iterator = new RecursiveDirectoryIterator($dir);
foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {
if (!$file->isFile()) { //create hyperlink if this is a folder
echo "<a href=". $file->getPath().">" . $file->getFilename() . "\</a>";
}else{ //do not link if this is a file
$file->getFilename()
}
}
Run Code Online (Sandbox Code Playgroud)